Sign in to follow this  
RishiRamraj

An AI for Dominos (and other stuff)

Recommended Posts

RishiRamraj    100
Hi All,

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

[url="https://github.com/RishiRamraj/Dominos"]https://github.com/RishiRamraj/Dominos[/url]

[b]How the Game Works[/b]

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.

[b]How the AI Works[/b]

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.

[b]Why I Wrote It

[/b]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.

[b]Results[/b]

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

[b]Other Stuff[/b]

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:

[url="https://github.com/RishiRamraj/Poker"]https://github.com/RishiRamraj/Poker[/url]

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

[url="http://wiki.dropbox.com/Drew"]http://wiki.dropbox.com/Drew[/url]

You can find my current attempt here:

[url="https://github.com/RishiRamraj/Megaman"]https://github.com/RishiRamraj/Megaman[/url]


Thanks,
- Rishi

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this