Assume this: We have two players. A pile of stones. Each turn, you take to stones. Whoever takes the last stone wins. Both players are perfect in playing. Who wins?
You've probably seen such problems before. You need to consider that your opponent will always make the best counter-move. The answer at each state depends on what your opponent can force.
I'll show these ideas in this section:
- Minimax thinking
- Sprague-Grundy numbers
- How to handle multiple parallel games