Project 1: Flip

Flip is a two-player game played on a rectangular table of size 120 cm by 40 cm. We'll use a coordinate system in which the center of the table is the origin. The table is divided into thirds, each third being a 40 by 40 square. Each player has n circular pieces on the table that can each be moved during the course of the game. Pieces have a diameter of 2 cm. At the beginning of the game, Player 1's pieces are all located in the leftmost third ($x\leq -20$), while Player 2's are in the rightmost third ($x\geq 20$). The piece distribution is random (according to a seed given to the simulator) but symmetric, so that the positions of Player 2's pieces are mirror images of those of Player 1.

The goal of each player is to move their pieces to be entirely within the other player's third before their opponent can do the opposite. There will be a (large) timeout to catch situations where neither player can completely move to the opposite third. At the end of the timeout period, the winner is the player with more pieces in the opposite third. In rare cases, the game may end in a tie after a time-out.

A move in the game consists of flipping a piece to a position exactly 2 cm away from the initial position, so that the piece is located in a position just touching the old position of the piece. A move is valid only if the entire circle that the piece would occupy has no other overlapping pieces from either player, and also fits within the table boundaries. The simulator will check for invalid moves, and will leave the piece where it is if the proposed move is invalid.

Player 1 gets to move one piece of his/her choosing. Then Player 2 moves two pieces. Players then alternate, moving two pieces each in turn. The two moves could be consecutive moves of a single piece.

We'll run tournaments at the end of class to see which groups have the most effective players for various values of n.

Some initial things to think about:

Ken Ross 2019-10-21