Dominion Assistant: An AI sidekick for Dominion

Summer 2016 — iOS app and backend

Screenshots from the Dominion Assistant iOS app.

In this project, I developed an AI for the card game Dominion. The algorithm is based on two approaches: a probabilistic graph search for computing optimal moves for individual rounds, and a genetic algorithm to decide optimal moves for the entire game.

The result of this project is an iOS app that users can use while they play Dominion. Users enter in actions taken by other players, and on their turn the app tells them what moves to make. The app queries a backend that handles the game logic and AI.

To train the AI, the code simulates entire games between bots in a population. Each bot is given a “gene”, namely an ideal card distribution, that it uses to determine which cards to acquire throughout the game. In each round, the bots use a probabilistic search in order to determine which set of moves brings it closest in expectation to the ideal card distribution described by its gene. After a fixed number of games, the population evolves into the next generation by mutating genes of high-fitness bots, and occasionally combining genes of high-fitness bots. Mutations occur by altering the bots’ card distributions. After many generations, the resulting population contains bots that are much better at playing Dominion than the bots in the original population. Results can be verified by checking that the resulting bots value cards like Provinces and Gold very highly, while valuing Curses very negatively.

The backend was written in Scala and can be found on GitHub.


2023 © Alex Sekula