# Reverse dots and boxes – Guess the last move

Alice and Bob are playing a game of reverse dots and boxes.

• The players take turns adding one horizontal or vertical line of size 1 in one free spot on the grid (marked with light gray lines in the below image). Alice goes first.
• If a move completes a $$1\times1$$ box, the player gets one point and has to make another move. If two boxes are completed with a single move, the player gets two points but only has to make one additional move. The player keeps making moves until they make a move which does not complete a $$1\times1$$ box.
• Completed boxes are coloured in order to keep track of points. One of the players marks their boxes with red, the other with blue.
• The game ends when all possible lines have been drawn.
• Since this is a reverse game, the player with the most points loses.

Both players are well versed in strategy and play to minimize the number of points they get. In the position below, Bob has just finished making his move.

The starting position looked like this. Note that the outer borders are all filled from the start and lines can't be put outside of these outer borders.

What was Bob's last move? Which colour belongs to which player? Who will win the game?

• Incidentally, one word for the trying to lose is "misère." I love this puzzle! – humn Jul 19 at 6:38
• @humn Thanks! I spent a while looking for a good term for this when making the first puzzle, but somehow didn't come across that word. – jafe Jul 19 at 6:47
• Please could you show the dots, and distinguish between the light grey free spots and the background? The current image doesn't show the dots, and the background is light grey just like the free spots. – Rosie F Jul 19 at 13:11
• @RosieF Sure. Dots added now. – jafe Jul 19 at 16:24
• I don't think this has a unique solution (example). – EKons Jul 19 at 18:04

Let's name the lines.

            +---+---+
|   K   |
+---+ L + J +
|   H   I   |
+ G +---+---+
|   |
+---+---+ F +
|   D   E   |
+ C + A +---+
|   B   |
+---+---+


The winner can be found by analyzing the game regardless of the position.

It is not possible for Alice to win the game.

- If Alice plays E or H, Bob plays the other one and forces Alice to take all boxes.
- If Alice plays F or G, Bob plays E and H and forces Alice to take the remaining boxes.
(When Alice plays in one of the 2x2 squares, Bob makes it two 1x2 boxes).
- If Alice plays A, B, C or D, Bob takes the four boxes in the bottom-left square and then plays H. From there Alice has to take the remaining boxes. The same applies symmetrically if Alice plays in the other square.

Bob wins either way.

Now that we know the winner, who is which color?

The given position is compatible with two scenarios:
Alice is red, Alice: F, Bob: E H, Alice A, Bob C, Alice B D K, Bob I.
or
Alice is blue, Alice: A, Bob: B C D E H, Alice F K, Bob I.
There are variants to both scenarios. The outcome is the same.

In the first scenario Alice looses with 10 points, in the second only 7. Since Alice plays optimally, she will have chosen to loose with 7 points, so she must be blue.

Alice is blue, Bob is red. Alice will loose with 7 points.

And Bob's last move would be

K or I to make two 1x2 regions.

• This is the intended answer. Nice job! – jafe Jul 20 at 11:05
• Ingore my previous comment, I was not aware of the recently added starting position. Normally, I would expect the borders to be empty to begin with – micsthepick Jul 20 at 12:42
• why did alice play "F" in her second turn? – Jasen Jul 20 at 20:49
• At this point Alice will take all boxes anyway. It doesn't matter what she plays. Playing F may be counter-intuitive but is still compatible with optimal play. – Florian F Jul 21 at 12:07