News for hackers. Stuff that matters.
Re:2048 by jsmthrowaway on Tuesday March 11, 2014 @12:59AM (#7377521)
This is inaccurate, because you have a 10% chance of getting a 4 tile added instead of a 2. That part makes the game tricky, because otherwise you could optimize every solution like an algorithm without ever losing.

    var value = Math.random() < 0.9 ? 2 : 4;
https://github.com/gabrielecirulli/2048/blob/master/js/game_...
Re:2048 by duskwuff on Tuesday March 11, 2014 @08:33PM (#7383193)
Oh, huh, I didn't even realize it was doing that. Even so, the move count will still be roughly proportional to the sum of the board (plus or minus some random variation), won't it?