next up previous
Next: Project2: Picture This Up: W4444 Programming and Problem Previous: Group Membership for Projects

Project1: The Poker Market

From 2 to 10 players play in a game, seated in a circle. Each player is dealt 5 cards from a single deck of regular playing cards. All players see all cards. Each player X in turn is given an opportunity to suggest exchanging a card with a particular card (chosen by X) belonging to another player Y. X proposes the swap, and Y has the option of accepting or declining the proposal. So, for example, if X needs a 3 and has a J that is not important to him, and Y is holding a 3, then X may propose a swap of X's J for Y's 3. Y can take it or leave it. (Thus, a good rule of thumb for X is to propose swaps that improve both X's hand and Y's hand.) If X is happy with his hand, he can elect to pass, and not propose a swap.

If the swap is agreed, the cards change hands; otherwise there is no change. Then play proceeds to the next player after X, who is given the same opportunity, and so on. When each player has been given a turn, that is the end of a round. There are $r$ rounds, where $r$ is a parameter known in advance to all players. After the end of $r$ rounds, all hands are ranked according to a standard ranking of poker hands. If there are $p$ players, then the top-ranked player scores $p$ points, and the bottom-ranked player scores 1 point. Ties are likely to be rare, but when they occur they are broken according to the following rule: The player who has the earlier turn in each round is ranked below players with later turns in each round.

Your aim is to program a player that decides which cards to propose to swap with whom, and whether to accept swapping proposals from other players. The goal is to maximize the player's final rank.

See http://www.pagat.com/vying/pokerrank.html for poker hand ranking. Note that there is no ranking between suits, so that a heart flush and a spade flush are equivalent if they are made of cards of corresponding rank.

We will provide interface specifications and a game coordinating program for this project at the beginning of the project.

Some items to consider:

A set of tournaments will be run at the end of the project.


next up previous
Next: Project2: Picture This Up: W4444 Programming and Problem Previous: Group Membership for Projects
Ken Ross 2001-09-28