The simple dice game known as Pig is surprisingly complex when you’re trying to find an optimal strategy for playing it.
The game’s object is to be the first player, rolling a die, to reach a total of 100 points. On each turn, a player rolls a die as many times as he or she wishes, totaling the score of the rolls until the player decides to end the turn and pass the die to his or her opponent. However, if the player rolls a 1, he or she immediately loses all the points accumulated during that turn, and the die passes to the other player. The big decision at any point during a turn is whether to roll or stop (hold). In general, it doesn’t pay to be greedy.