Why does 2048 give you a 4? The 1 in 10 rule, tested

Why does 2048 give you a 4 when you were expecting a 2? Because the game rolls a die for every new tile, and about 1 roll in 10 comes up 4. It is not a bonus and it is not a punishment: it is one line of code. This guide shows that line, what 1 in 10 looks like over a real game, a test that ran a 2048 game's own tile code 10,000 times, and a way to count how many 4s you got in your own game.

Why does 2048 give you a 4? The one line of code

The original 2048's code is public, so you can read its rules. In its game manager file on GitHub, the new tile's value is set by this line:

var value = Math.random() < 0.9 ? 2 : 4;

In plain words: pick a random number between 0 and 1. If it is under 0.9, the new tile is a 2. Otherwise it is a 4. The tile then goes in a random empty square. The same file starts every game with two tiles made this way.

Wikipedia's 2048 article) describes the same rule: the game begins with two tiles of 2 or 4, another appears after each turn, 2s appear 90% of the time and 4s 10% of the time.

What 1 in 10 looks like in a real game

One in ten sounds rare, but it adds up fast:

  • At the start: two tiles, each with a 1 in 10 chance of being a 4. The chance that at least one is a 4 is 1 minus 0.9 times 0.9, which is 19 in 100. Both being 4s is 1 in 100.
  • Over a game: one new tile per move. Over 100 moves you should expect about 10 fours, though rarely exactly 10.
  • In streaks: chance has no memory. Two 4s in a row happen 1 time in 100, and long runs of 2s with no 4 happen too.

That last point is why 4s feel unfair. You remember the two that came together, not the long run of moves before them with none.

How 3D 2048 picks its new tiles

3D 2048 puts the 2048 puzzle on a cube like a Rubik's cube: six faces of nine squares, 54 in all. Every slide or twist adds a new tile, on the front face when it has room.

Its page script uses the same 1 in 10 rule, with one difference in where the random numbers come from. The game keeps a seed, a starting number saved with the game. Each new tile takes two numbers from it: one picks the square, and one picks the value, a 2 when it is under 0.9 and a 4 otherwise. The same seed always gives the same tiles. The square is a random empty square on the front face, or any empty square once the front is full.

A new game of 3D 2048 with a 2 tile and a 4 tile on the front face of the cube and Score 0

A new game of 3D 2048 that opened with a 2 and a 4.

The game in this screenshot is one of the roughly 19 in 100 that start with a 4.

We ran the game's own tile code 10,000 times

To see the rule at work, we copied 3D 2048's random number code word for word from its page script and ran it outside the page. Two tests:

  1. 10,000 new tiles in a row. 1,001 were 4s, almost exactly 1 in 10. The longest stretch with no 4 at all was 81 tiles.
  2. 10,000 new games, one for each seed from 0 to 9,999. 1,909 started with at least one 4, close to the 19 in 100 the odds give. 87 started with two 4s, close to 1 in 100.
Diagram of nine 2 tiles and one 4 tile, with the test results 1,001 fours in 10,000 tiles and 1,909 of 10,000 games starting with a 4

The 1 in 10 rule, and what 10,000 draws of the game's own code gave.

So the rule really is 1 in 10 on average, and it still leaves room for long dry spells and sudden pairs. Our post on whether 2048 is luck or skill sets out what chance decides and what you decide.

Is a 4 good or bad for you?

Both, in different ways.

  • It saves a move. A 4 is a merge of two 2s you did not have to make. Our post on how many moves 2048 takes shows the range: 1,022 moves if every new tile were a 2, 510 if every tile were a 4, and about 930 with the usual mix.
  • It costs points. Your score only goes up when two tiles merge, by the value of the tile they make. Two 2s merging into a 4 earn 4 points. A 4 that arrives as a new tile earns nothing, so each new 4 leaves your score 4 points lower than the same board built from 2s.
  • It can land badly. A 4 next to a lone 2 cannot merge with it, and on a small board one stuck tile matters.

A worked example: count the 4s in your own game

Because a new 4 costs exactly 4 points, you can work out how many 4s a game gave you from the board and the score alone. In 3D 2048, only slides that merge add points, so the rule holds there too.

  1. Give each tile its built value: what it would have scored if it were built only from 2s. A 2 is worth 0, a 4 is worth 4, an 8 is worth 16, a 16 is worth 48, a 32 is worth 128. Each step up doubles the tile and adds one more round of merges.
  2. Add up the built values of every tile on the board.
  3. Take away your score.
  4. Divide by 4. That is the number of new tiles that came as 4s.

Here it is on a real game, played signed out by a simple script that only slid the tiles. At move 31 the front face read 8 4 2 / 16 8 4 / 2 16 8 and the Score box read 148. The built values are three 8s (16 each), two 16s (48 each), two 4s (4 each) and two 2s (0 each): 48 + 96 + 8 = 152. Then 152 minus 148 is 4, and 4 divided by 4 is 1. The game had given exactly one 4, which matches what the script recorded.

Our post on how 2048 scoring works explains the built values in more detail.

Frequently asked questions

How often does 2048 give you a 4?

About 1 new tile in 10. In the original game's code, a random number under 0.9 makes a 2 and anything else makes a 4.

Is the 4 in 2048 random?

Yes. It depends only on a random number, not on how well you are playing. In 3D 2048 the random numbers come from a seed saved with the game.

Can you turn off the 4s?

Not in 3D 2048. Its settings cover volume, sound effects, music and reduced motion, not the tiles.

Does getting a 4 lower your score?

A little. Each new 4 earns no points itself, so your score ends 4 points lower than the same board built from 2s. It also saves you one move.

Get started

Play a game, stop when you get stuck, and run the four-step count above. Then see whether your 4s came one at a time or in a bunch.

Play 3D 2048: it is free and plays in your browser on a computer or a phone.

0 likes

Comments

No comments yet.

Sign in or make an account to comment.