MEPLAT.

Nim

Rules

On your turn take any number of counters from one heap.

Click a counter to take it and every counter to its right. Arrow keys and Enter also work.

Normal play: whoever takes the last counter wins. The rule in force is shown above the heaps.

Every deal can be won with perfect play.

Difficulty adds heaps (3 to 5) and counters (up to 9 a heap), removes the bot's random moves (none from 85) and from 90 switches to misere: the last counter loses.

Examples

1. Heaps 3, 4, 5, normal play
Take 2 from the 3: heaps 1, 4, 5 have nim-sum 0

2. Heaps 2, 2 with the bot to move, normal play
You win: copy each bot move in the other heap

3. Heaps 1, 1, 3, misere
Take 2 from the 3 and leave three single counters

Time (min/sec):