I improved the script, using standard search methods like expectimax. Now it goes easily to 2048, but not really further, the difference with the highly efficient answer highly efficient answer is that they represent the whole board in an integer, then they can go to further depth in the search (10 million of moves, likely they can go to depth=5). While I can't go above depth=3 (~104 moves) it's already deadly slow with depth=3. I use it only when there is 2 or less free tiles left, and depth=2 with 6 or less free tiles, otherwise, depth=1.
I improved the script, using standard search methods like expectimax. Now it goes easily to 2048, but not really further, the difference with the highly efficient answer is that they represent the whole board in an integer, then they can go to further depth in the search (10 million of moves, likely they can go to depth=5). While I can't go above depth=3 (~104 moves) it's already deadly slow with depth=3. I use it only when there is 2 or less free tiles left, and depth=2 with 6 or less free tiles, otherwise, depth=1.
I improved the script, using standard search methods like expectimax. Now it goes easily to 2048, but not really further, the difference with the highly efficient answer is that they represent the whole board in an integer, then they can go to further depth in the search (10 million of moves, likely they can go to depth=5). While I can't go above depth=3 (~104 moves) it's already deadly slow with depth=3. I use it only when there is 2 or less free tiles left, and depth=2 with 6 or less free tiles, otherwise, depth=1.
Follow-up of 2048 (game) solver 2048 (game) solver
Follow-up of 2048 (game) solver
Follow-up of 2048 (game) solver