A Little Coding Project: Dominion AI


as part of my ongoing paranoia about future employment prospects, I’ve decided to work a bit on my coding skills, and building something that shows off some of my machine learning knowledge. I’m going to start with building an AI for the card game Dominion. The game itself is pretty simple (the Wikipedia article explains the rules, so I won’t explain it here), with two main decisions to make each turn:

  • Which action card(s) should I play from my hand. This is fairly self-contained for the most part, as the default hand size is five cards, so there is a pretty small number of options. And, at least with the action cards I’ll be coding up to start with, the goal will simply be to maximise the amount of money in hand at the end of the action phase.
  • Which card(s) to buy this turn? This is probably the central mechanic (it being a deck building game and all), as there are more options (26 decks to choose from in a full game), and the card that you buy will then feed into your deck for future shuffles. Also, the weights on which cards to buy will change as the game progresses

My current work plan currently involves the following:

  1. Implement a reduced set of action cards. I’ll pick the simplest three decks and limit myself to those for the time being [ie, smithy]
  2. Code up a quick and dirty interface so people can play.
  3. Finish implementing “Random AI” behaviour as a baseline.

Once I’ve got the these basics in place, I’m going to start messing around with different learning and tree search methods. I have two basic approaches I’d like to try out: learning weights for cards, and an implementation of the Monte-carlo tree search algorithm which has been so successful in computer Go in recent years.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: