The counting duel is a game for two: players take turns adding to a count, and whoever makes the last move takes the duel. On Yukti, a daily logic puzzle at playyukti.com, you face Bandi at King Janaka's court, or the ferryman over piles of stones. Below: the story behind it, the method and a short duel played through.
Kind of thinking: Planning
What is the counting duel?
Each turn adds one of a few amounts to the count, such as 1 or 2, without going past the target. Whoever reaches the target makes the last move. On stone days it runs the other way: each turn takes stones from a pile, and whoever takes the last stones makes the last move.
Your opponent never slips, so every move must keep the last move certain to be yours, and Yukti stops any move that would hand it over. Some days have two or more counts, and each move adds to one of them. On reverse days the aim flips: leave the last move to the other side.
Where does it come from?
The story is in the Mahabharata, in the Book of the Forest (Vana Parva). The boy Ashtavakra comes to the court of King Janaka to face Bandi, the court's debater, who had defeated many scholars before him, Ashtavakra's father among them. The two trade verses on each number in turn, from one upward. At thirteen, Bandi can say only half a verse, and Ashtavakra completes it.
Yukti keeps the setting, a contest of numbers that turns on who reaches the end, and swaps the verses for a game that can be worked out. Its European cousin is the race to 100 in Claude-Gaspard Bachet's Problèmes plaisans et délectables (1612): two players take turns adding a number from 1 to 10, and the first to reach 100 takes the game.
How do you play it?
Five habits do most of the work:
- Work back from the end. Don't start from where the count is. Start from the target and ask who can reach it.
- Find the traps. A trap is a total where whoever has to move can only hand the last move to the other side. Your aim is to leave your opponent on one, every time.
- Traps repeat. When you may add anything from 1 up to some largest amount, the traps come every (largest + 1) below the target. With other amounts they still repeat: work back a few and the pattern shows. That is why Steady and Tough duels add a second kind of thinking, Pattern.
- Reverse days shift the traps. If the last move gives the duel away, the total just below the target is the first trap, and the rest follow from it.
- Several counts: keep them in step. With two or more counts, look for the count that is out of step with the others. A move on that count brings them back into step and leaves the other side trapped.
A worked example: count to 7
You and Bandi take turns adding 1 or 2. The count starts at 0, you move first, and whoever reaches 7 makes the last move.
- Work back. From 5 or 6 you can reach 7 in one move, so whoever has to move from 4 is trapped: 4 is a trap.
- From 2 or 3 you can reach 4, so 1 is a trap too. The traps are 1 and 4: three apart, one more than the largest add.
- Add 1. Bandi has to move from 1.
- Bandi adds 1 or 2, making 2 or 3.
- Add whatever takes the count to 4: 2 from 2, or 1 from 3. Bandi has to move from 4.
- Bandi adds 1 or 2, making 5 or 6.
- Add what is left to reach 7. That is the last move.
Bachet's race to 100
The race works the same way, with adds from 1 to 10. Work back from 100: whoever has to move from 89 can reach only 90 to 99, and from any of those you reach 100. So 89 is a trap, and so is every total 11 below it: 78, 67, 56, 45, 34, 23, 12 and 1. The first player adds 1, then answers every move so that the two moves together make 11.
How does Yukti help when you are stuck?
A move that would let the other side make the last move is stopped. It still counts as a step. A nudge asks you to work back, such as "If Bandi has to move with the count at 4 of 7, can Bandi still take the duel?". The day after, yesterday's route plays the duel through with a reason for every move.
Sources
Read on 26 October 2026: Ashtavakra (Wikipedia); The Mahabharata, Book 3, section 134 (K. M. Ganguli's translation, Project Gutenberg); Claude Gaspar Bachet de Méziriac (MacTutor, University of St Andrews); Bachet (H. K. Strick, MacTutor).