Project 2: Guess my Hand

In this game, there are four players whom we'll call North, South, East and West. Like in the card game Bridge, North and South are partners, and East and West are partners. Both members of a partnership will be running instances of the same group's code, although those different instances are not allowed to communicate (e.g., via shared data structures) except as described below.

Every player in the game is randomly dealt 13 cards at the beginning, from a regular card deck. The game proceeds in turns as follows:

Each player in sequence (North, East, South, West) exposes one of their cards that all players can see. When South decides which card to expose, South has already seen the exposed cards from North and East, for example. Once each player has exposed a card, each of the four players makes a best guess as to the make-up of their partner's hand. On turn i partner has 13-i unexposed cards, and so a guess is a set of 13-i candidate cards. Guesses are private, not seen by the other players. The simulator calculates how many of the guesses are correct, a number we'll call c. c is reported back to the guesser, and also added to the total partnership score. Players don't see the total partnership score during the game because that would leak information about their partner's c value.

The goal is to maximize the partnership score at the end of the game. Towards the end of the game each player has more information, but fewer opportunities to score points because hands are decreasing in size.

The main way that you hope to do better than random guessing is to be selective about which card you expose on each turn. Hopefully the choice of card gives your partner some information about the remaining hidden cards in your hand. Because partners are known to be running the same code as the player, players can make inferences based on the played card. For example, if partner plays the seven of hearts, and the player knows that the eight of spades would have been played rather than the seven of hearts in the particular game situation according to the player's algorithm, then the player can infer that partner does not hold the eight of spades.

Some things to think about:

Ken Ross 2024-09-09