Then I started thinking about writing a bot that will solve it for me. Apparently, 2048 AI is pretty popular. I decided to try creating a 2048 bot. Problem is, I have no idea if I can make a Java desktop app that can load http://gabrielecirulli.github.io/2048/ and pass keyboard input to it. (anyone?)
So I'm forced to create my own 2048 for the desktop. Oh well. It's a good learning experience for me since this will be my first puzzle game that relies on a 2d array.
I usually split these puzzle game solver bots into two categories: brute force and human strategy. I've made a Sudoku solver before using the strategy method. Unfortunately, I suck at Sudoku, therefore my bot sucks, since it's only as good as I am. Obviously, writing a brute force solver would finish the Sudoku puzzle easily, but where's the fun in that?
Most of what I've seen on 2048 AI uses the brute force method. Minimax, expectimax, etc. Basically, searching through possible scenarios for the best evaluation. I'm going to go the other method. I will impart my limited knowledge to my bot, and hopefully this thing will be able to solve it like I would.
UPDATE:
Ahhhahahaha . I can't stop working on my damn bot. Again, it doesn't use any brute force recursive searching. It's a decision bot, and it makes decisions that I would make. I've managed to get my bot to create the damn 2048 tile. Average score is ~6000. Highest score is ~28000. Wins 5% of the time.
It still doesn't make the exact same choices I would make, since I haven't put all of my thought process into it yet, but it's enough to actually beat the game. My personal best is ~58000, close enough. Hell yeah
I would love to play the game
ReplyDelete