Finger Game Oracle
Implements an oracle for a variation on the game "chopsticks".
The finger game was introduced to me by my sister. It appears to be a simple grade-school game, related to Chopsticks. Happily, this variation is not a forced win for either side.
The rules are very simple. Each player has two hands, each with some number of fingers extended (begin with one on each). Players take turns. On your turn, you tap one of the opponent's hands with either one of yours. The opponent then adds the number of fingers on your hand to the number of fingers on his hand, modulo 5. When a hand gets 0 fingers, it is removed from future play (it can neither tap nor be tapped). The goal is to eliminate both hands of the opponent. You are not permitted to move fingers between hands.
This program implements an oracle for this game (that is, this game is now solved, and this is its (strong) solution). Essentially, it works by creating and filling a graph of the (relatively small) state space. A good number of possible states are actually unreachable as well. To use the oracle, start at the left and then follow the arrows.
(See website for more complete description.)