# Black to play and win (Teeko)

$$\def\S#1{\phantom{\Space{18px}{22px}{0px}}\llap{#1}} \begin{array}{|c|c|c|c|c|}\hline \S{}&\S{}&\S{}&\S{}&\S{}\\\hline \S{}&&&&\\\hline \S{}&&X&O&X\\\hline \S{}&X&O&O&\\\hline \S{}&&X&O&\\\hline\end{array}$$

$$X$$ to play and win.

The rules of Teeko:

• Teeko is played by two players, black and red, on a five-by-five checkerboard. Each side has four checkers in his color. (In this puzzle, I rendered black as $$X$$ and red as $$O$$.) The coloration of the board has no bearing on the game.
• The first four moves per side are played by the player's placing one of his checkers (that's not yet on the board) on any empty square on the board.
• Every subsequent move is played by a player's moving one of his own checkers from its own square to any adjacent empty square. Adjacency is horizontal, vertical, or diagonal.
• The first player to have all four of his checkers form a box (two adjacent squares in a row and two more immediately below them) or a line (horizontally, vertically or diagonally with no gap) wins.
• There are additional rules to prevent indefinitely repeated moves and to prevent a piece from being rendered immovable for too long, but those don't come into play in this puzzle.

Credit: The idea of this puzzle comes from John Scarne's book Scarne on Teeko.

• Does the "any adjacent square" have to be empty when moving?
– Bass
Jul 21, 2019 at 6:24
• @Bass yes. I've edited to clarify. Jul 21, 2019 at 6:54
• See also (though it won't help with this puzzle): quinapalus.com/musical.html Jul 21, 2019 at 22:49

Same first five moves:

1. (X) C5-B4, threatening E3-E2-E1
2. (O) D3-E2, to block the threat, since O can't win in 2
3. (X) E3-D3, now threatening B4-B3-C2
4. (O) C4-B3, to block that threat
5. (X) D3-C4, threatening C4-B5-A5. Also threatening B4-C5,D2-C2.

Then, if:

6. (O) B3-A4, to reach A5 first
7. (X) B4-C5
8. (O) Any move
9. (X) D2-C2, wins

or else

6. (O) D4-C5, to block
7. (X) C4-B5
8. (O) Any move
9. (X) B5-A5, wins

Here is what I came up with:

Using ABCDE as rows (top to bottom) and 12345 as columns:

1. (X) C5-B4, threatening E3-E2-E1
2. (O) D3-E2, to block the threat, since O can't win in 2
3. (X) E3-D3, now threatening B4-B3-C2
4. (O) C4-B3, to block that threat
5. (X) D3-C4, threatening C4-B5-A5
6. (O) B3-A4, to reach A5 first
7. (X) C4-B5, threatening to win on A5
8. (O) A4-A5, blocking the win
9. (X) D2-C2, threatening to make a line on row B
10. (O) any move, can't stop the threat
11. (X) C3-B3
12. (O) any move
13. (X) C2-B2, winning

• +1, nice. Pretty sure there's a faster win, though. Jul 21, 2019 at 5:08
• @msh210; I would say this is optimal as every move (O) makes after (X)'s first is forced, so effectively it's 'mate in one'.
– JMP
Jul 21, 2019 at 9:50
• @JonMarkPerry any correct answer will be such that O can't get out of the loss. And this is one such. I'm just saying I think there's a faster win. In chess, for example, that can matter, as games are typically timed. (I don't know whether that's true in Teeko.) Also, a faster win is arguably more elegant. Jul 21, 2019 at 10:17
• @msh210; (X) moves, (O) resigns. Pretty elegant already.
– JMP
Jul 21, 2019 at 10:24

Building on my analysis of @JS1's solution, I see an optimisation :
(1st 5 moves are exactly the same)

I'm using the same referential (ABCDE as rows (top to bottom) and 12345 as columns)

1. (X) C5-B4, threatening E3-E2-E1
2. (O) D3-E2, to block the threat, since O can't win in 2
3. (X) E3-D3, now threatening B4-B3-C2 AND B4-B3 + D2-E3*
4. (O) C4-B3, to block both threats
5. (X) D3-C4, threatening C4-B5-A5 AND B4-C5 + D2-C2 AND D2-C2-B3

O cannot defend against all 3 threats, wichever move he makes. He can either block the first one, or the two others

Case 1 : defending against C4-B5-A5
6. (O) B3-A4, to reach A5 first
7. (X) D2-C2, threatening B4-C5 and C2-B3
8. (O) can't even defend at all, wasted last turn
9. (X) B4-C5 or C2-B3, wichever will end up in X's victory.

Case 2 : defending against C2
6. (O) B3-C2
7. (X) C4-B5
8. (O) Can't race X to A5 anymore. Wasted last turn.
9. (X) B5-A5, victory

Precisions on line marked with * :

I added the second threat, "B4-B3 + D2-E3", from @JS1's answer, because otherwise, you could think that O can race to C3 by moving E2-D1, but that would only drive him into a faster defeat thanks to the double threat :
4. (O) E2-D1 to race X to C3
5. (X) B4-B3
6. (O) Either blocks E3 or C2, can't do both 7. (X) Victory

• Damn, @user3294068 answered faster ! Jul 22, 2019 at 14:47