2048 Solver
github.com
2048 Solver
1–10 of 41 posts
Re: 2048 Solver
#2Question that I didn't understand the answer to:
> There are implemented 3 cost functions:
> 1. sum of all tiles in the playing field
is this a useful cost function at all? Surely the sum of the tiles is not affected by strategy played, only by whether a 2 or 4 was randomly received.
> 2. number of all unassigned tiles in the playing field
> 3. average value of an occupied tile
Then, for similar reason, I would be surprised if these were not equivalent.
Re: 2048 Solver
#3Re: 2048 Solver
#4Re: 2048 Solver
#5Any remarks on average number of rounds to get to 2048?
So I think it can win all games?
Re: 2048 Solver
#6Re: 2048 Solver
#7Secondly, the implementation doesn't perform the combination of current state score and proposed state score that lies at the heart of the A* algorithm. Instead it takes the current state for granted (which, again, it must given the inability to backtrack) and chooses the available move with the largest score.
Thirdly, and I'm reaching a little here, I can't find any place where any heuristic is used to optimize search performance by pruning the search tree. The search space is brute forced on each iteration, and the entire tree is scored.
At the expense of seeming pedantic I suggest this is a greedy play algorithm rather than A*. You can be even more precise and call it a single-ply minimax.
Now that that's out of the way, I should temper my criticism with the fact that this implementation works. It's not algorithmically complicated because it doesn't have to be. It doesn't use any of the typical performance tricks because it doesn't need to. What it lacks in sophistication it makes up in "good enough."
Re: 2048 Solver
#8I would be curious to see a more detailed writeup of this, as I haven't understood how this algorithm is applied. Question that I didn't understand the answer to: > There are implemented 3 cost functions: > 1. sum of all tiles in the playing field is this a useful cost function at all? Surely the sum of the tiles is not affected by strategy played, only by whether a 2 or 4 was randomly received. > 2. number of all un…
So in the end you are right these approaches are more or less the same.