Each tile's value is a certain power of 3. The game is based on the fact that any positive or negative natural number can be created uniquely using one or more powers of 3. To include a tile in the calculation, flip it up or down to make it green (positive) or red (negative). To exclude a tile that is already included, flip it sideways to make it gray (neutral).
The value of a Green tile gets added to while that of a Red tile gets subtracted from the initial value. When the initial value matches the target value in both number and color, you win. You are awarded points as well as stars for each win depending on how many moves it takes you to win.
There are several different levels with increasing difficulty and you can play as many games as you wish in each level. However, as soon as you earn either 2 green stars, 3 blue stars or 5 yellow stars, you automatically level up. You can still go back to earlier levels if you wish.