Plugging in a Winning Strategy: Exercise 6.18, p. 160
- Name your winning strategy procedure
intelligent-strategy-2-pile and test it on some game states.
- When you're satisfied it works correctly, plug it into your program by
changing nim so that intelligent-strategy-2-pile
replaces simple-strategy.
- Now, if the computer wins the coin flip and plays
first, it should force a win. If it does not go first but the
human does not know the winning strategy, it should also force a win.