In this series of posts, I consider how algebra can be used to answer a question about the 2048 game: From looking at a screenshot of the final board, can I figure out how many moves were needed to reach the final board? Can I calculate how many new 2-tiles and 4-tiles were introduced to the board throughout the course of this game?

(The above board is the only picture I currently have of reaching 4096 without using an undo — the version of the game that I had at the time permitted two undos per game. I have also reached 8192 in game mode — I was really lucky that day — but I sadly don’t have a screenshot to memorialize the occasion.)

In the previous post, I used two insights to develop of a system of two equations in two unknowns. Let and denote the number of 2-tiles and 4-tiles, respectively, that were introduced by the game. The sum of the tiles on the final board must also be the sum of the 2-tiles and 4-tiles that were introduced during the course of the game. Therefore,

Next, we consider how the total of 44,148 points was reached by looking at the final tiles.

- Each 8-tile was formed by joining two 4-tiles (for 8 points). Some of those 4-tiles were added by the computer; others were formed by joining two 2-tiles (for 4 points each). So each 8-tile is worth points, plus 4 times some undetermined number.
- Each 16-tile was formed by joining two 8-tiles (for 16 points). Each of those two 8-tiles was formed by joining two 4-tiles (for 8 points for each 8-tile, or more points). Again, some of those 4-tiles were added by the computer; others were formed by joining two 2-tiles (for 4 points each). So each 16-tile is worth points, plus 4 times some undetermined number.
- There are no 32-tiles on this board. However, to continue the pattern, any 32-tiles are formed by joining two 16-tiles (for 32 points). Each of those two 16-tiles was formed by joining two 8-tiles (for 16 points for each 16-tile, or more points). Each of those four 8-tiles was formed by joining two 4-tiles (for 8 points for each 8-tile, or more points). Again, some of those 4-tiles were added by the computer; others were formed by joining two 2-tiles (for 4 points each). So each 16-tile is worth points, plus 4 times some undetermined number.
- By now, the pattern should be clear. Any 64-tile on the board would contribute points, plus 4 times some undetermined number (as a reminder, the number of 4-tiles formed by adding in the course of making the 64-tile).
- Any 128-tile on the board would contribute points, plus 4 times some undetermined number.
- And, in general, a -tile would contribute points, plus 4 times some undetermined number.
- In particular, when , a 4096-tile would contribute points, plus 4 times some undetermined number.

In summary, for the above board, there are:

- Three 4-tiles (for 4 times some undetermined number),
- Two 8-tiles (for points plus 4 times some undetermined number),
- One 16-tile (for points plus 4 times some undetermined number), and
- One 4096-tile (for points plus 4 times some undetermined number).

Adding, this board will have , plus 4 times some undetermined number.

What is this undetermined number? It is the number of 4-tiles that are formed by combined two 2-tiles throughout the course of the game thus far. Since is the number of 2-tiles that have appeared and there are three 2-tiles on the board above, we conclude that 2-tiles have been combined into 4-tiles throughout the course of the game, resulting in points. Therefore, we have the second equation

Let’s start solving:

Substituting into the first equation:

So we conclude that 1573 2-tiles and 250 4-tiles were introduced to the board. Stated another way, about 86.3% of the new tiles were 2-tiles, while about 13.7% of the new tiles were 4-tiles. Also, since two tiles were on the board before any moves were made, a total of moves were needed to reach the above board.

## 1 Comment