Hacker News new | ask | show | jobs
by jxf 1151 days ago
There shouldn't need to be any board history, just like you don't need to know the board history to know the next move in checkers.
1 comments

2048 spawns new numbers randomly on the board. A human player uses that information to determine the best move.
Yes, but that's _state_, not _history_.
Board history does not matter.

    Grid.prototype.randomAvailableCell = function () {
      var cells = this.availableCells();

      if (cells.length) {
        return cells[Math.floor(Math.random() * cells.length)];
      }
    };
Besides that you need to predict where the next number can and should spawn. If you don't figure out the strategy for that you will never get a decent score.
That relies on the board state but not the board history.