We use logic agents to model the game thirty-one, a simple card game where players compete to obtain a good set of cards. Every turn they need to choose which hand cards they exchange, getting a good hand while preventing other players from winning. The changing set of cards they can choose from make it a dynamic game, such that the agents may change the cards their specific objective. We try to model it with BDI architecture.
Thirty-one game can be played with two (2) or more players. At the beginning of the game, each player gets three (3) cards (hidden from other players) and three cards are put on the table faced up. The shown cards are known as “Widow’s cards”. Players will take turns such that at each turn a player can exchange a card from his/her hand with one of the widow’s cards; however, the card that player puts on table should be faced up and added to the widow’s cards so that another player could exchange with it on next turn. In this game; only aces and cards with more value than six (6) will be used. The value of ace is eleven (11), face cards are counted as ten (10) and other cards count their face value.
The game will continue until a player guesses that the value of the cards he holds (in same suite) can beat other players. In this case; he can call for evaluation by knocking on the table. Once all players showed their hand; the player that got higher value cards from same suite will be the winner. If any player’s card combination of same suite cards adds up to 31, he can call and be the winner. There is also another possibility that the player holds three cards with same values (e.g. three Queens) which is known as “Three-of-a-Kind”. In this case the value of the cards would be 30.5 regardless of cards’ suites.
Players playing 31 can reason about their opponents hand from the actions they take. If a player was to exchange a card from his hand with a S10 from the widow everyone would be able to reason about their strategy. One reason could be to increase his score with spades but he might also be going for a three-of-a-kind with 10’s. Using this information can help players decide which cards the others likely have and which cards they can safely exchange with the widow without helping their opponents.
Every time someone exchanges a card with the widow the knowledge of which cards are in the game increases. If a player exchanges a card which was in his starting hand the other players now know this card is in the game, but if the card was not in their starting hand it was taken from the widow earlier on and now new knowledge about the cards in the game is obtained. The other players can infer what objective a player has by observing what cards he exchanges. They can use the knowledge about which card they prefer to infer knowledge about the possible goals they have. The goals are getting high cards of the same suite, or three of a kind.
We plan to simulate the card game for more than 2 players to avoid having short rounds. With more players, it is more likely that two players are going for three cards the same suit. When these two players both want the same high cards, they can use their knowledge of the opponents actions to evaluate the strength of their hand. And plan a strategy of their own.These are the most interesting cases to apply the use of logic.
Please use the following guideline for understanding the symbols and acronyms :
CD={s7, s8, s9, s10, sj, sq, sk, sa, c7, c8, c9, c10, cj, cq, ck, ca, d7, d8, d9, d10, dj, dq, dk, da, h7, h8, h9, h10, hj, hq, hk, ha}