views:

813

answers:

10

I would like to start building/developing a game AI that will allow me to play games like: Chess, domino, poker, and Texas hold'em against computer opponent.

What are some of the books/resources are recommended to achieve that goal?

Please give me the link with the books cover or something

+9  A: 

There are three main books on AI.

  1. AI: A Modern Approach (Norvig, Russel, etc)
  2. AI Application Programming (Jones)
  3. AI Game Programming Wisdom (Rabin)

The first one is an standard for AI classes. The second one I found really useful for an brief, easy to understand introduction to the topics. The third one is more geared to game programming. Its helpful but I didn't like it as much as the previous books.

monksy
..............?
Noldorin
whoever voted this one down - can you explain ?
Dani
This answer was originally just text with no links, and thus made zero sense.
Noldorin
oh... ok :-) I though I was missing something here ....
Dani
I removed my downvote now that you have added a real answer with links.
mquander
"Three shall be the number thou shalt count, and the number of the counting shall be three." (Corrected "two main books")
SingleShot
I do appreciate it. Singleshot: Thanks... there were a few revisions and I attempted to do the entry really fast. [hince the multiple edits on my part... yes I was trying to beat Jon Skeet]
monksy
Thanks for quick response and links to the books,will be reading them soon
madicemickael
Have fun with the AI: Modern Approach... it is very thorough, but it is very dry as well.
monksy
+3  A: 

Well, you will need different AI strategies for different games. A chess engine is going to be very different from a Texas Hold'em engine. First of all, chess is a game of perfect information whereas poker games have chance.

You should first pick a game you'd like to work on; there will be different solutions. Also, think about what goals you have. For instance, in chess, what level of difficulty would be satisified with?

One SO user has built a "chess engine kit" that targets the .NET framework:

http://www.chessbin.com

A great example of a good simple chess engine is Tim's Simple Chess Program (tscp)

http://www.tckerrigan.com/Chess/TSCP

There are hundreds and hundreds of documents that provide useful reading just for chess alone.

BobbyShaftoe
I almost gave this answer +1 just because of the submitter's username. :)
csl
It does seem like a worthy cause.
monksy
So why all the downvoting? Is this incorrect?
BobbyShaftoe
+2  A: 

I would recommend trying to implement a game of matches. Where you play against a computer.

You select if you or the computer should start. You can take x matches and the person that takes the last match wins.

The simple AI that's needed for the computer turn there is great practice in the math needed and how to create a simple AI.

If you're still interested (even if you can do this project or not) then I'd recommend looking for a book.

Ólafur Waage
This game is called Nim in some parts of the world.
Bill the Lizard
Wasn't Nim where you had 2 or more heaps of matches?
Ólafur Waage
@Ólafur: There are variations with different numbers of heaps, but you're right, Nim is normally played with two heaps. Also, in Nim, the player to take the last object *loses*, so it is a fundamentally different game. That will teach me to try and be helpful without verifying my "facts." :)
Bill the Lizard
Hehe it's ok, what is possible is to expand the original game into Nim.
Ólafur Waage
+1  A: 
csl
+5  A: 

I'd recommend the book Artificial Intelligence for Games. It's a little bit more general than what you're after (there are chapters on movement and pathfinding), but there are chapters on tactical and strategic AI, and on board games.

Bill the Lizard
+1  A: 

Chellapilla and Fogel created a checker program that was a minimax program whose evaluation function was an artificial neural network. The ANNs were created using evolutionary algorithms.

The 3 papers below give a great overview of their work. The book "Blondie24" is a great read though. They tell the story of them exploring the problem space and what they had to do to create a master level checkers game.

Depending on how much time you have this could be the basis of a great project.

wikipedia

  • Chellapilla K and Fogel DB (1999) "Evolution, Neural Networks, Games, and Intelligence," Proc. IEEE, Vol. 87:9, Sept., pp. 1471-1496. (.pdf)
  • Chellapilla K and Fogel DB (1999) "Evolving Neural Networks to Play Checkers without Expert Knowledge," IEEE Trans. Neural Networks, Vol. 10:6, pp. 1382-1391. (.pdf)
  • Chellapilla K and Fogel DB (2001) “Evolving an Expert Checkers Playing Program without Using Human Expertise,” , IEEE Transactions on Evolutionary Computation, Vol. 5:4, pp.422-428. (.pdf)
  • "Blondie24: Playing at the Edge of AI", Fogel DB, (2002) Morgan Kaufmann Publishers, Inc., San Francisco, CA. ISBN 1-55860-783-8
AllenSanborn
+9  A: 

The games that you mention present very different problems. Chess is a game of perfect information - you know exactly where all of your opponent's pieces are positioned so you can anticipate the moves that they might make. The problem with getting a computer to play chess well is not so much one of determining the best move to take (this can be done with Minimax), but being able to get the answer in a timely fashion. Looking ahead at all the possible outcomes that might follow from a given move is extremely expensive, which is why chess programs typically only look ahead a certain number of moves when evaluating options, rather than all the way to the end of the game. This ensures that decisions are made promptly but may result in sub-optimal play. In theory, chess could be solved, just as Draughts/Checkers has been. It's just a question of resources (it won't happen any time soon).

Poker, on the other hand, is a game of imperfect information. A player does not know which cards his or her opponents have and therefore can not reliably predict their decisions. There is also an element of deception in poker - so the "right" move in any given situation is debatable and will often depend on the nature of the players involved (poker players are usually classified on two axes - tight/loose and passive/aggressive). The strongest hand does not always win. A good player can win with a weaker hand by bluffing to induce an opponent to fold.

To my mind, these characteristics of poker make it a much more interesting (and difficult) AI problem than chess. There are a lot of people working on poker bots. Some are academics and some are just trying to make some money from the online poker sites. The Coding the Wheel blog covers a lot of topics about poker botting. You may also find the book The Theory of Poker useful.

If you're going to attempt to write a poker-playing AI, it's probably best to start with fixed limit games since the AI only has to decide whether to call, raise or fold and not worry about how big each bet should be. Likewise, heads-up (2-player) games are much simpler than full 9- or 10-player games.

Opponent-modelling is likely to feature in any successful poker AI, since the best move in any given situation likely depends on the strategies employed by your opponents. Here are a couple of papers that might help:

Dan Dyer
+1, I just wanted to say great post, and to add a link to the University of Alberta Poker Research group http://poker.cs.ualberta.ca/, whose paper on Opponent Modeling is linked to. Anyone interested in game-playing should check this work out - it demonstrates how to incorporate both domain knowledge and machine learning in a rigorous way
Andrew Walker
+1  A: 

While not an AI text, Schaeffer's One Jump Ahead is a great read to get an overview of the challenges. Schaeffer created a program that became the world champ in checkers, and the book describes the story of how he went about it.

binil
+1  A: 

I would recommend Artificial Intelligence for Games by Ian Millington and AI for Game Developers by Bourg and Seemann...

They cover a wide range of topics and the algorithms work pretty nice.

davidrobles
this book is very nice, I also found many good books in a torrent about 4.91 gb when i searched for this one
madicemickael
A: 

Have you considered perusing the GameDev.net website? It's pretty much the largest online community of game developers around. In addition to loads and loads of articles (including on AI), there are multiple heavily-trafficked forums on the site which cover what you're looking for.

Nathan Ridley