Currently I'm working on implementing a spanish card game called Briscas, or Briscola,http://en.wikipedia.org/wiki/Briscola
In a nutshell, it's a card gam开发者_运维问答e where two teams of 2 players play against each other (they can't see each others hand, not even team members), only at the beginning cards are shuffled, then three cards are handed to each player. In a clockwise manner everyone throws one card to try to win that turn. Who ever wins that turn take the points. Then, still in a clockwise manner, the player who won the last round, takes a card from the top of deck, and the player next to his/her left, and so on. Then you will keep playing rounds until the deck is empty. Who ever team has more points wins.
Details:
Deck Size: 40
Players: 4 (2 teams of 2) Cards have specific value. (from 0 to 11)The Question
I know that straight MiniMax would be to expensive. What algorithms are typically used for these kind of card games? Also any literature that you can point to will also be beneficial.
Thanks
This depends on how ambitious you want to get, but as a start you need a fast engine for simulating play.
Then you need a fast, and thus probably simple, model player.
This model player will not have time to calculate forward. It can only react on a pre-defined state. So your first step is to construct a good enough game state. The game state should include your hand and some statistics of the history of which cards have been discarded and maybe how players have played their hands.
Next you construct a model player that acts on the state. Either
A) write one by hand, that plays according to some heuristics that you define. But remember - no heavy calculation yet!
B) write a general player, but leave out constants and cut-off values. Use your simulation engine and genetic algorithms with tournament selection to evolve good parameters for said values. For bonus points, evolve your players in teams of two, so that they complement each other nicely.
C) use even more AI and let a genetic programming system (there are a few mature ones. Find one that can do tournaments. You can even implement one yourself, but let's not get carried away :) write the entire player for you, using your state as input.
The next step:
Either you already have a great player and can consider yourself done, or you want to make it better. If you want to make it better your in luck!
Use Monte Carlo simulation to play out a large amount of hands, with each of your choices in a certain situation (there are always three choices if I understand correctly). Let your model player make the decisions each time you have a choice, and let your Monte Carlo simulation shuffle the deck randomly between each time that you play out a simulation.
Now you should have a great card player!
精彩评论