Gandini Games Worksheet PDF
Gandini Games Worksheet PDF
Instructions: Introduce yourself to your neighbors, if you have not already done so. All the games in this
worksheet are two-players games so pair up before starting a game and change pairs when you move to the
next game. Read the descriptions of the games carefully. First try to play the game a few times, then you
can start discussing a solution strategy with your neighbors. I may ask you or your colleagues to share your
findings (and possibly write them on the board). If your group finishes early, you can move on to the next
game.
1.1 Version A
In this version the first player to reach 0 wins.
(i) Take turns in being the first or the second player. Who do you think is more likely to win the game?
(ii) What strategy should a player use?
(iii) Can you describe a strategy such that one of the two players is guaranteed to win?
1.2 Version B
In this version the player who is forced to reach 0 loses.
(i) Take turns in being the first or the second player. Who do you think is more likely to win the game?
(ii) What strategy should a player use?
(iii) Can you describe a strategy such that one of the two players is guaranteed to win?
(iv) How does version A compare to version B?
(i) Take turns in being the first or the second player. Who do you think is more likely to win the game?
(ii) What strategy should a player use?
(iii) Can you describe a strategy such that one of the two players is guaranteed to win?
(iv) Can you find a mathematical model that explains why your solution is right?
Challenge: Suppose now that we change the number of cards on the table. Does this change the game?
Who wins in which cases?
3 Poison cookie
Between you and your partner decide who will go first in the game. Starting with a 6x6 grid, at each turn
a player picks a box. Then that box and all the boxes above and to its right get eliminated from the game.
The bottom left box contains a cookie, but the cookie is poisoned so the player who is forced to eat the
cookie (picks the bottom left box) loses the game.
(i) Take turns in being the first or the second player. Who do you think is more likely to win the game?
(iii) Can you describe a strategy such that one of the two players is guaranteed to win?
(iv) Suppose now that the cookie is a great chocolate cookie so the player who eats the cookie (picks the
bottom left box) wins the game. Does this change the game? Who wins?
Challenge: Suppose now that we change the size of the playing grid. Does this change the game? Who
wins in which cases?
4 Dominoes on a grid
Between you and your partner decide who will go first in the game. Staring with a 6x6 grid, at each turn a
player places down a domino (a 1x2 or 2x1 rectangle). Dominoes cannot overlap, and the first person who
cannot place a domino down loses.
(i) Take turns in being the first or the second player. Who do you think is more likely to win the game?
(iii) Can you describe a strategy such that one of the two players is guaranteed to win?
Challenge: Suppose now that we change the size of the playing grid. Does this change the game? Who
wins in which cases?
5 Nim
There are two piles of coins of 6 coins on the table. Each player in her turn chooses only pile and she has to
pick at least one coin, but she can pick any number of coins she wishes. The player who takes the last coin
wins.
(i) Take turns in being the first or the second player. Who do you think is more likely to win the game?
(iii) Can you describe a strategy such that one of the two players is guaranteed to win?
(iv) Can you find a mathematical model that explains why your solution is right?
Challenge 1: Suppose now that we change the number of coins in each pile. Does this change the game?
Who wins in which cases?
Challenge 2: Suppose now that we have a different number of coins in the two piles. Does this change the
game? Who wins in which cases?
Challenge 3: Suppose now that we change the number of piles. Does this change the game? Who wins in
which cases?
6 Cutthoroat
6.1 Rules
This game is played on a graph (i.e., a set of dots connected by lines). In her turn, a player picks a vertex
(i.e., a dot), deletes it and she deletes all the edges (i.e., lines) starting from that vertex. The player who is
left with only dots and no lines loses.
(iii) Suppose that now you have two 5-stars. Does the game change? Who wins?
(vi) Suppose that now you have two 6-stars. Does the game change? Who wins?
(vii) Suppose that now you have one 5-star and one 6-stars. Does the game change? Who wins?
(viii) Suppose that you have one n-star and one m-star. Can you determine the conditions on n and m that
cause one or the other player to win?
(ix) Suppose that you have one n-star and one m-star. Describe a strategy such that one of the two players
is guaranteed to win.
(iii) Suppose that now you have two 3-line graphs. Does the game change? Who wins?
(vi) Suppose that now you have one 5-line graph. Does the game change? Who wins?
Challenge 1: Try playing on a 7-path graph. Keep all your previous findings handy as this will help!
Challenge 2: Could you think of a systematic way to solve the problem of an n-path graph?
7 Some background
All the games in this worksheet are combinatorial games. Combinatorial games have the following features:
• they are two-player games,
• they are finite meaning they always end,
• they are impartial as both players have the same options for a move,
• they are perfect information games, so there is no hidden information,
• there not games of chance,
• no ties are allowed (usually the first player who cannot make a move loses).
In this situation, it has been proven that a winning strategy exists (either for the first player or the
second player). The fact that a winning strategy exists does not men it is easy to find! Finding the winning
strategy may need an exhaustive search using computers. For example no winning strategy is known in Hex,
another combinatorial game. A surprising result of Sprague and Grundy is that every game with all the
features listed above is equivalent to some version of the game of Nim.
7.1 N or P games
A game where the first player has a winning strategy is called an N game, meaning that the next player to
make a move will win. If there is a winning strategy for the second player, the game is called a P game. The
name comes from the following scenario: suppose that we were playing a game and we come to a position
where the next player will lose, no matter what she does. Then the previous player has won, so she had
a winning strategy. If we started the game from this particular position, it would be a second player (or
previous player) win, so a P game.
Note that the relationship between P and N positions is not obvious. It is easy to determine if a position is
an N position: if it is my turn and I have some way to make a move and put the game into a P position, then
I am guaranteed to win (as I become the previous player in a P position and the next player is guaranteed
to lose). On the other hand, a game is in a P position only if no matter what move I make, I am forced to
put the game into a N position, so I am guaranteed to lose (as I become the previous player in a N position
where the next player is guaranteed to win). It is sometimes hard to reason this through at every stage so
we can just remember that: the game is N if there is a move to P, the game is P if every move leads to N.
7.3 Symmetry
Another interesting property is the following. Any game which is the sum of two identical games is a P
game. Think about this for a second... How can we prove this?
The winning strategy is remarkably simple: the second player just needs to copy what the first player
does! So if player one makes one move on the first copy of the game, the second player does the same thing
on the second copy. Then we are back to a game which is the sum of two identical games. Repeat until the
second player makes the last move, winning the overall game.
Challenge: Use this to prove that every line graph with an odd number of vertices is an N game.