DotoBot

DotoBot

2018, Jan 01    

As I couldn’t beat my flatmates in playing Dotowheel, I programmed a bot to do this.

This project is hosted at GitHb.

Dotowheel

Dotowheel is a fun game with simple rules:

Place dots on the wheel. When at least three dots with the same number are next to each other they merge to the next higher number. Get as high as possible!

If you run out of empty space on the wheel you lose.

Joker: Every 5th move you have the possibility to swap two dots.

DotoBot

DotoBot is based on reinforcement learning.

In reinforcement learning an agent learns to solve a problem in a complex environment. Based on the performed actions it can get a reward or a penalty. While in the beginning the actions are random, by maximizing the reward the agent can develop sophisticated strategies to solve a problem.

In this case, DotoBot has the goal to maximize its score and therefore reach the highest number as possible on the wheel. It gets a reward if dots are merged and is penalized if the game is lost. Besides the valid possibilities for the current move, DotoBot does not know anything about the game.

More specifically, DotoBot’s strategy is based on Q-Learning which is implemented with a two layer convolution network.

Setup

Dotobot is based on Python 2.7 and tensorflow 1.14.

As there is no open-source version of Dotowheel available, a browser window with the online game is loaded. DotoBot is then analyzing the current state of the game based on what is displayed on the screen. DotoBot controls the mouse in order to place the new dots on the wheel. The positions within the wheel are hard-coded.

Further Information

If you wanna learn more about reinforcement learning, have a look at this introduction by Pathmind.