# An AI for Dominos (and other stuff)

This topic is 2647 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

1. 1
Rutin
42
2. 2
3. 3
4. 4
5. 5

• 9
• 27
• 20
• 14
• 14
• ### Forum Statistics

• Total Topics
633384
• Total Posts
3011598
• ### Who's Online (See full list)

There are no registered users currently online

×