Hacker News new | ask | show | jobs
by sdflhasjd 1151 days ago
I can't think of a particularly polite way of putting this, so I apologise, but did you take some liberties with that title, or are you just not very good at 2048? Random inputs may get you a higher score than that.

I looked at the code to see the prompt, and I think it's a very limited way of having GPT play, the context has no board history or information on how and where the game inserts piece, the AI won't be able to execute any strategy.

2 comments

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.
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.
OP might be my little brother. Years back, I destroyed him in 2048, and then he called me a virgin. Then he wrecked me at a round of chess.

(I was engaged then, currently married now)

Ahh, good times.