Project 4: Wedding gossip

Wedding receptions bring together people who may not have seen each other in a long time. As a result, there is plenty of gossip to share! You will write code to simulate a person at a wedding trying to share the juiciest gossip. 90 people arrive at the reception, each with a single unique piece of gossip, which we encode as a positive integer between 1 and 90. The larger the gossip's numerical value, the more interesting it is to everybody.

At the reception, people sit around circular tables. There are 10 tables (numbered 0 to 9, we're computer scientists!) each seating up to 10 people (positions 0 through 9), and 90 guests, so at any moment 10 seats will be empty. People can speak to (or hear) others who are seated at most 3 people away. On a turn, a person can do one of the following:

When a talker and a listener are within three people of one another, and are talking/listening in the appropriate directions, the listener may learn the item of gossip being spoken by the talker (with an exception below). If so, and if the listener has not heard this piece of gossip before, then the listener adds this gossip to their database of gossip and nods their head to the speaker to indicate that this is novel information. This new gossip can then be shared with others if desired on future turns. If the listener has heard this piece of gossip before, and this is the only piece of gossip being communicated this turn, then the listener does not add to their database, and the listener communicates to the talker via a shake of the head that they have heard this gossip already. In the event that multiple talkers are within hearing range, then the listener is sophisticated enough to automatically tune in to the highest value gossip item that they have not already heard and tune out all of the other items. Only one talker gets feedback from a listener: this would be the provider of the highest value new information, or if there is no new information, the provider of the highest value old information. A talker can receive anywhere between 0 and 3 units of feedback on a turn, depending on who was listening. Players can recognize the identity of other players, but do not know anything at the start of the game about what other players know. Players' data structures and internal memory are not visible to other players, even if they are running the same group's code.

Players observe (and can choose to remember) the complete interaction sequence for all people at their table. In other words, players at a table know who at that table talked and who listened, and in which directions. Players also can observe who is sitting where at all tables, and which seats are empty.

When a player moves, they do not give or receive information on that turn. They can specify a list of (table,position) pairs they would like to move to, in priority order. The simulator will then resolve the moves one player at a time, in random order. A player moves to the highest-priority seat that's still available, or if no seats are available, the player stays put.

At the end of the game, each attendee gets a group score and an individual score. The group score is simply the sum of all gossip values of all attendees, divided by 90. All attendees score the same group score, so everybody is aiming to help the group. The individual score is the sum of all gossip values successfully shared with another guest at the reception, i.e., where the recipient of the gossip did not previously know that information.

We'll try single group receptions (where all 90 players are played by a single group's code) and versions where different players within the game are coded by different groups. The number of turns T is a parameter of the game that all players know in advance. When we run the tournament at the end of the project, we'll do many repeats to even out the bias in initial gossip quality for any single run, and we'll try various values of T.

Things to think about:

Ken Ross 2023-10-17