For my artificial intelligence practicum course I decided to write a game bot for the popular Facebook game Bejeweled Blitz. The most challenging part of the project was that I had no trivial API to work with so I had to write a screenscraper and use emulated mouse/key actions to communicate with the game.
The AI strategy is a pretty simple BFS expansion of the full game tree to a specified depth but I plan on improving it in the future (maybe by moving away from Python for performance reasons). The vision system is wonky as well.
The bot is on github, so if you’re on OS X 10.7+, download the listed dependencies and give it a shot! It actually works better for Bejeweled 3 because the vision system has an easier time recognizing Bejeweled 3 jewels than Bejeweled Blitz ones.
