The attached program can tell what moves force a loss from any position. Below is an example of the run from one simulated game.
Please enter a sorted game state (e.g. "0-4-4-6")
(hit Control-D to break): 3-4-5-6
Moves to force loss from 3-4-5-6:
0-3-5-6
1-3-4-6
2-3-4-5
normalized game state: 1-1-4-6
Moves to force loss from 1-1-4-6:
1-1-4-4
normalized game state: 1-1-1-4
Moves to force loss from 1-1-1-4:
0-1-1-1
normalized game state: 0-0-1-1
Moves to force loss from 0-0-1-1:
0-0-0-1
normalized game state: ^D
The code has been coded and tested on a solaris box, but it should work with reasonably compilant C++ compiler with a semi-recent version of the STL.
John