CS 391 - Special Topic: Machine Learning
Piglet


Piglet is very much like Pig except it is played with a coin rather than a die. The object of Piglet is to be the first player to reach 10 points. Each turn, a player repeatedly flips a coin until either a "tail" is flipped or the player holds and scores the number of consecutive "heads" flipped. At any time during the player's turn, the player is faced with two choices: flip or hold. If the coin turns up tails, the player scores nothing and it becomes the opponent's turn. Otherwise, the player's turn continues. If the player chooses to hold, the number of consecutively flipped heads is added to the player's score and it becomes the opponent's
turn.

Further information on equations for Piglet can be found in the paper handout in class.

Tips:

Optimal solutions for goal = n

From (0,0) in the upper-left corners, the row is the player score (0 - (n-1)), the column is the opponent score (0 - (n-1)), and the data at that position is the minimum turn total at which the player holds.

n = 3

1 3 3 
2 2 2 
1 1 1 

n = 6

2 2 2 2 2 6 
1 2 2 2 2 5 
1 1 2 2 2 4 
1 1 1 1 3 3 
1 1 1 2 2 2 
1 1 1 1 1 1

n = 9

2 2 2 2 2 2 3 3 9 
1 2 2 2 2 2 2 3 8 
1 1 2 2 2 2 2 3 7 
1 1 1 2 2 2 2 2 6 
1 1 1 1 2 2 2 2 5 
1 1 1 1 1 2 2 2 4 
1 1 1 1 1 1 1 3 3 
1 1 1 1 1 1 2 2 2 
1 1 1 1 1 1 1 1 1