Advertisement

An AI for Dominos (and other stuff)

Started by August 21, 2011 12:40 AM
-1 comments, last by RishiRamraj 13 years, 3 months ago
Hi All,

I wrote an AI for dominos and thought I should share. Feedback greatly appreciated!

https://github.com/RishiRamraj/Dominos

How the Game Works

The game is fairly simple; it works like a card game. You play the game with a partner and there are four players; your partner sits on opposite. There are a number of distinct tiles and you have to match up your tile with a tile on the ends of the board to be able to play. If you can't play, you pass. The first team to get rid of all of their tiles wins.

How the AI Works

The AI tries to track what tiles a player has in their hands based on how they play. If a player passes, the AI knows that that player has none of the tiles of that number in their hand. If a player plays, the AI knows that no one has that tile in their hand.

The AI then tries to guess what the most probable move would be that would cause the player on the right to pass. It calculates all of its moves, and then chooses the best.

Why I Wrote It

My relatives play this game a lot in Venezuela. Whenever I go there, they thoroughly mop the floor with me. So I spent two nights with my netbook and made this thing.

Results

Surprisingly, it worked! I won 3 games in a row. Then they started cooperating and the AI failed.

Other Stuff

I wrote this Python library to help me with my Poker game. Give it a hand and a flop and it'll tell you the probability of a number of different hands:

https://github.com/RishiRamraj/Poker

I'm also in the process of trying to solve this problem:

http://wiki.dropbox.com/Drew

You can find my current attempt here:

https://github.com/RishiRamraj/Megaman


Thanks,
- Rishi

This topic is closed to new replies.

Advertisement