views:

1557

answers:

7

What would be strategies for writing a good computer opponent for a card game? Most card games are games of incomplete information, so simply mapping out and traversing the game tree as one could do with a board game does not seem too promising.

Maybe one could track what open cards are in the game (as soon as they are revealed) and assign probabilities to certain events (e.g. opponent still has 2 cards of clubs).

Does anyone have experience with this? Links and directions greatly appreciated.

Thanks! -Mark

+4  A: 

What you describe using probabilities is basically how poker AI (or a human poker expert) works. There's been an ongoing series on Coding the Wheel about creating a Poker Bot that you might be interested in reading.

Bill the Lizard
+3  A: 

Another good read is the http://aigamedev.com/ site. It's very detailed and goes into code examples where it applies.

Ólafur Waage
+1  A: 

a concrete answer: implement the min-max algorithm with random events like drawing of cards containing propabilities instead of hard decisions.

Andreas Petersson
A: 

use common sense: let the computer play by the same rules a human would (logic), and change difficulty level by changing parameters such as quality of AI memory.

I implemented a memory game which is maybe a simple case compared to what you are looking for, but it worked pretty well.

csmba
+2  A: 

Again it's a blog, but an interesting one in this area is Computer Programming and Magic: The Gathering. If nothing else it's notable because of the very complicated programming, MTG has a sea of rules for the cards and because the author actually completed his first version of the program three years ago. Tons of game projects get no further than the planning stage.

The project he describes in his blog is open source so you can see if there's anything interesting to you there and he's very prolific about posting to his blog.

John Munsch
A: 

The University of Alberta has a Poker-playing program named Polaris that competes against professionals in tournaments. Their web site has a lot of information.

Dour High Arch
A: 

You're right that traversing 'the' game tree won't work because you don't have enough information but if you generate several potential game trees and look at what options are more likely to result in better outcomes then you'll have an AI.

If you have the time you can do it exhaustively and generate every possible scenario but in reality you don't have 10mins to play a card so just do a small portion of the whole space.

I wrote a poker bot that did this and it played an ok game but I lost interest in it before I got around to handling positional implications so it was never strong.

Daniel