Dots Boxes 5x5 1
Dots Boxes 5x5 1
Dots Boxes 5x5 1
Philipp Quach
November 2, 2016
II Strategy basics 1 It is oftenly possible to capture more than just one box
II-A Doublecross-strategy . . . . . . . . . . 1 per turn.
II-B The long-chain-rule . . . . . . . . . . 2
III Formalities 3
III-A Technical terms . . . . . . . . . . . . 3
III-B Notation . . . . . . . . . . . . . . . . 4 The leftmost box of aboves position has three walls, hence
the box can be completed by drawing the fourth wall as seen
IV Advanced strategy 4
IV-A Preventing chains . . . . . . . . . . . 4 below.
IV-B Preemptive Sacrifices . . . . . . . . . 5
IV-C Dividing the board . . . . . . . . . . . 5
IV-D Indirect chains, wasting moves . . . . 6
IV-E Ladders and edge moves – force
loops/merge regions . . . . . . . . . . 7 The rules state that upon completing a box you’re forced
to draw another line, hence the second box from the left,
V Expert strategy 8 which now has three walls, can be completed in the same
V-A Balance – second player approach . . 8 turn.
V-B Openings . . . . . . . . . . . . . . . . 9
V-C Visual approach to nim . . . . . . . . 10
VI Extra 14
VI-A Counting chains in a ”maze” . . . . . 14
VI-B Mirroring . . . . . . . . . . . . . . . . 15 As a box has been completed once again the turn is still
ongoing. Analougously the rest of the boxes can be taken.
I. I NTRODUCTION
Dots and Boxes is a game that many people probably
remember having played in school, yet very few know that
it involves any strategy at all. While there’s lots of math to
Dots and Boxes this guide shall focus merely on aspects that
are relevant for playing the game and deliver them short and II. S TRATEGY BASICS
simple.
If you want to beat your clueless buddies understanding
A. Rules
the following two subsections should suffice in order to beat
On a grid of dots, players take turns drawing lines from them almost all the time.
one dot to another horizontally or vertically adjacent dot. In
the process of doing so they will draw the walls of boxes.
A. Doublecross-strategy
Drawing the fourth wall of a box will earn the player a point
and forces him to draw another line. The player with the most Key to playing Dots and Boxes strategically is an “all but
points wins. 2”-trick used during the endgame.
Turn1 : 34 Score: 0-0 Turn: 36 Score: 3-2
Instead of taking all five boxes he uses the ”all but 2”-trick Turn: 30 Score: 0-0
finishing his move early as the dashed line does not complete
a box. X loses two boxes by letting O doublecross two boxes The number of long chains is 3, there’s a 3-chain in the
of the 5-chain but gets the entire 20-chain in return. top-left, a 5-chain in the top-right and an 8-chain in the
bottom right. And then we have two short-chains, a 1-chain
in the bottom-left corner and a 2-chain above the 1-chain,
as well as a 6-loop. As the number of long-chains is odd it
should be player 1 who has to play into a long-chain first.
1 Turn includes the last played, dashed move Let’s play some moves and see what happens.
2
Another curiosity could occur in turns 32, 33:
A. Technical terms
Using the ”all but 2” or ”all but 4”-trick is not mandatory,
it is oftenly better not to use it, we call the decision of
whether to use it or not a ”domino decision”. A domino
is the shape of 2 boxes created after the ”all but 2”-trick is
used:
3
B. Notation Player 2 played a sacrifice preventing the 2-chain from
Showing a position as a picture takes a lot of space, further growing into a 3-chain. Player 1 will now keep trying to build
on a notation will be used to tell which moves are played another chain as he needs another one and plays 31.a4. Again
in order to skip showing every trivial turn. The notation that player 2 will play a sacrifice to prevent the second chain:
has become somewhat established assigns each line, box and b d f h j
dot a name from a1 to k11. 10
10 8
8 6
6 i6 4
4 2
f3
Turn: 32.b5 Score: 2-0
2
j
No second long-chain was created, there was two 2-chains
b d f h
but those don’t lead to the creation of a domino thus don’t
The notation for these two moves would be 1.f3 2.i6. affect the long-chain-rule. The only long-chain is the long
19-chain, the only one, odd. Player 2 wins the game by
IV. A DVANCED STRATEGY
sacrificing four boxes.
Knowing the long-chain-rule the next step to learning the
game is figuring out how to aim for the right number of Sacrificing boxes is not the only way to prevent chains.
chains. j
b d f h
A. Preventing chains 10
We are taking a look at following position:
8
b d f h j
10 6
8 4
6 2
Turn: 32.a10 Score: 0-0
4
Player 2 plays 32.a10 creating a 6-loop at the top left
2
preventing the 6-chain that could otherwise be created by b9.
Turn: 29 Score: 0-0
Note that sacrificing and building loops are both expensive
There is one very long 19-chain and whoever gets it will
ways to prevent chains. Sacrificing gives boxes away while
be the winner of the game. 29 moves have been played, it
loops will require the winner of the chain-battle to give
is the turn of player 2 and according to the long-chain-rule
away two dominos which is four lost boxes.
player 2 should aim for an odd number of chains. There is
a 2-chain at the top left which could extend into a 3-chain
The least expensive way to prevent an additional chain is
with a move like a6. If that 2-chain becomes a 3-chain it
to merge the upcoming chain with an already existing one.
will be two long-chains in total, an even number. Not what
player 2 wants! The coming turn will prevent the short 2- b d f h j
chain turning into a long 3-chain: 10
b d f h j
8
10
6
8
4
6
2
4
Turn: 32.d1 Score: 0-0
2
Player 2 has merged the 19 and the 4-chain, creating a long
Turn: 30.b9 Score: 0-0 25-chain. If he hadn’t done that but played 32.a2 instead then
4
b d f h j
player 1 could have played 33.c2 in order to seperate the two
chains. 10
b d f h j 8
10
6
8
4
6
2
4 Turn: 28.e4 Score: 0-7
b d f h j 8
10
6
8
4
6
2
4 Turn: 30.tf1 Score: 1-9
Player 2 gets one of the two 2-chains and a domino from C. Dividing the board
the bottom 6-chain, the rest of the boxes goes to player 1. Aiming for the right number of chains starts with aiming
for a number of regions that will later on contain chains.
The better move to get additional space for a third chain Player 1 should start off trying to aim for two chains
is the loony move 28.e4. (going for four chains doesn’t work out for reasons that will
5
b d f h j
become more clear at subsection IV-E) while player 2 should
try to aim for three chains (or one, see subsection V-A). 10
Here’s an example on what a thinking pattern could look like.
8
4
b d f h j
2
10
Turn: 5→6 Score: 0-0
8
D. Indirect chains, wasting moves
6
Moves are valuable! You can only play one move per turn,
4 make sure to focus on the right thing. What is wrong with
the following move?
2
b d f h j
Turn: 3→4 Score: 0-0
10
8
The board is split into a top and a bottom half. Player 1 is
6
going for two chains, one in the bottom half the other in the
top half. It is the turn of player 2 who is aiming for three 4
chains. Aiming for three chains would mean to aim for three
regions, because first you need the regions and then you can 2
build chains inside of them. The two dashed moves would Turn: 11.h1 Score: 0-0
be logical choices for move four. 4.e4 would split the bottom
half in two going for two chains along the bottom and one The line itself is not the problem, there is nothing wrong
at the top. 4.e6 on the other hand would aim to split the with extending the chain at the bottom. However it is not
top half in two, aiming for two chains at the top and one the right thing to focus on in this situation. The top half is
at the bottom. Those are both logical choices that tend to yet completely empty, rather play something that benefits
increase the chain count. The more intuitive one would be your aim of turning the top half into just one chain instead
4.e6 though as the top half is bigger. We assume that 4.e6 of increasing the length of that bottom chain which will
is the move played, what are viable responses for move 5? only turn out helpful in case the top half turns out right
which has yet to be confirmed.
4
The dashed line will create a 3-chain, you have to sacrifice
2 in order to prevent that:
Turn: 4→5 Score: 0-0 Possibility 1 Possibility 2
6
b d f h j
10
It is not possible to prevent the chain. The chain hasn’t At the bottom is a 3-chain with one end at the edge of
been build yet, but indirectly it’s already there. Don’t waste the board and the other running into a 6-loop, above is a
moves turning an indirect chain into an actual chain if there’s 10-chain as well as a 3-chain with one end running into the
something else left to do. 10-chain (you could also see it as a 4-chain running into a
9-chain or a 5-chain running into a 8-chain, but I prefer to
wasted
name the smallest branch specially).
7
b d f h j b d f h j
11
10 10 13 16
12 14
8 8 10
6 6 7 17
9
4 7 9 4 8
8 4 6 10 15
2 2
3 5
Turn: 10.j3 Score: 0-0 Turn: 17.i6 Score: 0-0
8
b d f h j
the big region) making player 1 prevent that tiny chain, then
extend the cut off region to continue threatening the tiny 10
chain, repeating that cycle while influencing the big area
8
with a compressing wall (see ladder strategy) which makes
it possible to turn it into just one chain and then finally 6
balance out the big area and the edge region so that there
is either one chain at the edge and two in the big region or 4
no chain at the edge and just one in the big region.
2
Turn: 9.b7 Score: 0-0
Well, that was an overly complex, terrible sentence so here
is a step-by-step example (note that the moves of player 1
are not at all optimal): And finally 8.c6 and 9.b7 have been played for known
reasons. All those moves played by player 1 were used in
b d f h j order to prevent a third chain, player 2 however is now taking
10 the opposite direction not aiming for three but for one chain
and all those moves played make this very easy. Here’s an
8 example of how the game could continue:
6 j
b d f h
4 10 16
12 15
2 8 13
6.c4 has been played creating a corner region which could For the very first move there’s nine different lines you
again lead to a little chain in that bottom left corner and again can choose from if you exclude the identical mirrored and
7.b3 is played in order to prevent that. rotated versions.
9
b d f h j b d f h j
10 10
4 2
8 8
6 6 3
1
4 4
2 2
Turn: 4.d9 Score: 0-0
For player 1, one possible setup includes the edge moves 1.f5 divides the board into two halves providing a base
1.f1 and 1.d1 preparing a ladder along the bottom supporting structure for an aim of one chain at top and bottom each. 2.f9
a decrease in the total number of chains as the bottom turns is one of the possible 12 balance moves with two effects: 1. It
more likely to contain fewer chains, this will obviously help creates space at the top where a chain could be or not and 2.
to defend against the high number of three chains. At the it prepares space between f5 and f9 where a loop (otherwise
same time however it makes it hard to aim for one chain as a chain) could be created or not – a classic balance strategy.
a chain part of the bottom-ladder will hardly spread across 3.g6 is somewhat harder to understand, you can come up with
the entire board up to the very top, it becomes more likely many different strategies at this point but 3.g6 in particular
though as a loop gets created which (unfortunately for reduces the problematic area between f5 and f9 to the left
player 1) is also supported by 1.f1 and 1.d1. In any case, side of the line saying there will be one chain at the top
edge moves are good candidates for early moves by player 1. right for sure. The problem zone can just turn into a loop or
connect with the bottom left where the second chain should
be. 4.d9 is very similar to the second move: it just increases
A different approach is to play a line with a small the danger of having a third chain at the top edge while
number of viable responses allowing you to memorize the continuing to build the loop shape.
most common opening variations providing you with an
environment that is familiar and thus easy to play for you.
One such move could be the center line 1.f5.
1.f5 2.e4 3.d3, 1.f5 2.d5 3.f3 and 1.f5 2.i6 3.g6 for example
result in very common opening shapes easy for player 1 to
play. C. Visual approach to nim
b d f h j 6
10 4
8 2
4
A 13-chain and two undecided regions of the same shape
2 which may or may not turn into a chain. It is the turn of
player 1 and player 2 has a very easy strategy to win here:
Player 1 is first to play into one of the undecided regions
and player 2 is simply going to copy the played moves into
I strongly recommend not to use 1.f3 or 1.d3 as the first the other undecided region, e.g. if player 1 were to play
line as they are part of the 12. 23.a6 then player 2 would respond with 24.f1. As a result
the two undecided regions will end up with the same number
of chains n and of course, because they are two regions,
An example together they will contain 2 · n chains, even, which along
A well played opening could be 1.f5 2.f9 3.g6 4.d9. with the 13-chain makes an odd number of chains.
10
b d f h j
10 We can see that the lines c2 and d1 are very different
from each other even though both do not create a chain at
8
the bottom: they have different “nim-values”, although we
6 don’t want to enter the value-topic in this guide, but rather
use visual keys. The attempt is to differenciate between 2
4 different types of regions/moves and then figure out how to
pair them up correctly.
2
Turn: 22 Score: 0-0 One more example for when nim matters:
Similar situation to before, except the two undecided b d f h j
regions don’t look alike. Then what’s the strategy here? 10
Copying the move into the other area doesn’t work anymore,
or does it? Actually it does. This is important: the two areas 8
may not look the same, but in a more mathematic way they
6
are equivalent, so you can copy moves just fine by playing
the move of similar nature to the one played in the first area. 4
6 minimal: 0
4
2
Turn: 28 Score: 0-0
minimal: 0
Position 2 – This one however is a first player win,
because in this case there’s a 1-chain in the bottom
left corner which can be sacrificed without problems
and then player 2 will have to play the critical move
into one of the undecided areas. This is what can happen
when not paying attention to the nature of undecided regions. minimal: 0
11
Step 1:
The minimal number of chains is 1.
b d f h j
minimal: 0 10
4
minimal: 1
2
Type 2 includes:
Turn: 25 Score: 0-0
Step 2:
minimal: 0
b d f h j
10
8 Type 1 Type 1
minimal: 0
6
b d f h j 6
10
4
8
2
6 Turn: 26.k10 Score: 0-0
12
Example 4.b Example 4.c
b d f h j b d f h j
10 10
8 8
6 6
4 4
2 2
Turn: 27 Score: 0-0 Turn: 27 Score: 0-0
Step 1: Step 1:
The minimal number of chains is 2 The minimal number of chains is 2
b d f h j b d f h j
10 10
8 8
6 6
4 4
2 2
Turn: 27 Score: 0-0 Turn: 27 Score: 0-0
Step 2: Step 2:
b d f h j b d f h j
10 10
8 Type 2 8 Type 1
6 6
4 4
2 Type 2 2 Type 2
Turn: 27 Score: 0-0 Turn: 27 Score: 0-0
Step 3: Step 3:
b d f h j b d f h j
10 10
8 8
6 6
4 4
2 2
Turn: 27 Score: 0-0 Turn: 27 Score: 0-0
13
b d f h j
10
2
Turn: 28.j11 Score: 0-0
The next step, after learning about the two types of How many chains does aboves position consist of?
undecided regions and how they effect each other, is to make
use of that knowledge, so here is one example of a very early Giving an answer upon simply glancing at the board
move that makes use of it. should hardly be doable, yet working out the answer is very
b d f h j easy.
10
2
Turn: 5.k8 Score: 0-0
2
Turn: 8 Score: 0-0
VI. E XTRA
14
b d f h j
B. Mirroring
10
8 6
6 4
4 2
Turn: 12; 14 Score: 0-0
2
Turn: 6 Score: 0-0 Another way to defend against a mirror strategy would be
the sacrifice of the center-box:
b d f h j
b d f h j
10
10
8
8
6
6
4
4
2
2
Turn: 7.e6 Score: 0-0
Turn: 6 Score: 0-0
15