This game is called Dots and Boxes; it's
played by children in many places. I
learned it in the first grade in 1946.
We're going to play a game and if you
don't know the rules you'll soon learn
them as you watch us play.
We have a board here, it's- when we end up
we'll have 9 boxes and when it's your
turn you can make a move - I'll make the
first move like this. It's your turn, you
can join any two dots that are adjacent,
horizontal or vertical. And it's my
turn I'll make a move here, you play
anywhere you want. Now, the goal of this
game is to make more boxes than your
opponent. The rules are: if your move
makes the fourth side of a box then you
get to fill that box in, it becomes your
colour, and you you own that box. So we get
scores depending on boxes.
Okay so now I make a move- well I just
made a third side of a box so Brady if
he if he wants to he gets the fourth
side of the box and he puts his initial
on that and he owns that box, that's
Brady's box. It's one point for him but
he takes an extra move now, he gets a
bonus move for having made a box. - (Brady: And he)
(has to move?) - And he must move, that's
right. Now you'd think - well go ahead -
he'll make a move.
Four and four, looks like he may get- I
may get four and he may get four, but
let's see; that doesn't quite work. So I go
here and I make this box, that's one box
for Elwyn. I go here and I make another
box, that's a box for Elwyn. Now if I
wasn't a very bright player and I was
sort of a beginner I would continue
making two more boxes, and then I'd give
him the last four; but I'm smarter and I
give him a play here. Now I've completed
my turn without making boxes, I'm done,
it's his turn now. And whatever he does,
if he goes there it's called a double
cross, that's probably his best move, and
he makes two boxes in one turn, yeah?
But he gets only one extra move. But
having made boxes he gets an extra turn,
but now he has to take the extra turn,
give me the last four and so I win this
game by a score of 6 to 3. So every
time I make a box I get an extra turn,
and you go on like this then so the
score is 6 for me and 3 for him.
(Did I lose because you're too good)
(for me? Or did I do something stupid?) - You lost
because we got to a point here where
there are two long chains. And a long
chain- here's a chain of size four, here's
another chain of size four, and the
number of chains was even two and that's
why you lost. This little one is a chain
of size one, it's too short to matter.
Long chains are very important, and a
long chain is one that has three or more
boxes in it. The first player wants an
even number of long chains and the second
player wants an odd number of long chains.
(How could you control the number of long chains?)
Well I couldn't if you'd have
played really smart from the beginning.
But you had a chance even fairly late;
if you'd have cut one of these chains into two
short chains than there'd have been only one
long chain and you'd have been okay. Second
player strives to make an odd number of
long chains, and on this board he can do
it, and I'll explain how, and
first player strives to make an even
number of long chains. A key feature of
this board is there's only one center
square. And if we look at this- at the
board we can decide, okay there's some
moves over here in the corners, let's
called these corner moves right? So we
have some corners. We have some sides, we
have four sides right? And we have some
centers, there's four centers, and we have
some spokes. And these moves are- yeah
that's all the moves there are. If you
can force all long chains to go through
the center there will be only one. So any
chain that not go through the center
necessarily has to be a side chain. So
for example let's just look here, what is
a side chain? A side chain is a chain
that goes off on some side, see? So this- in
the first game I played we got- he went
something like this. Now I'm threatening
to make a side chain over here see?
Haven't done it yet but it's it's it's
tempting. So we have something like this
something like this, something
like that, something like this - maybe here,
maybe here, and I now have a side chain.
This chain is one chain, there's another
chain here, so there's going to be two
chains; which means this is going to be a
win for the first player. Now the second
player could have won and the key to the
second player winning is to stop the
side chain. And the way to do this is to
play spokes, these are the moves you want.
I prefer to do it in a swastika pattern
if you- so these these particular moves,
this set of moves is very good because
they stop all side chains,
there's no way that any side chain can be made.
So let's look at it. Suppose the first
player starts like this, the second
players should think: 'aha! He's threatening
to go and make a side chain over here; or
at least get started and then it'd be
very hard to me to stop it without
sacrificing some things. I'm going to
break it up right away.' I break it. I
stopped that chain from coming into
existence on that side right? So he goes
over here, maybe he's threatening another
one - no! I play another spoke, I play one
of the swastika spokes. I play it
perpendicular to his last move, usually
right adjacent to it if I can like this.
And now I can't make any side chains
over here. So he's in bad shape, he will
never get a second chain. - (What about-)
(what about the top and the)
(bottom? Can these be- do they)
(count as side chains?) - Only if he can make
a chain, but how's he going to make a
chain? If he tries - watch - he tries; he
tries this see? But I stopped that too,
second player goes here. So now that we
have two little chains, they don't matter,
it's only the big chains that count. And so
there isn't. Now maybe he succeeds in there
being no chains, which would be good for
the second player in the end game, but
the only way he can make no chains is
to sacrifice. He might do that, he might
give away two boxes right now. But if
that's the case, there's no chains, the
little stuff will all get divided up
evenly and I'll win on the sacrifice.
(On a game that is four dots by four dots, or)
(three boxes by three boxes-) - Yeah
(Play second, play the spokes, and you will-)
Play the alternate spokes, as in a
swastika. You don't let him get center and
a side adjacent to each other; because if
he does that that's that's a threat to
run a chain through here, and the only
way you're gonna be able to stop it is to
sacrifice a box. Don't don't give away
any sacrifice until you have to, stop the
side chains right away by playing the
alternate spokes, and play them adjacent-
Whenever he makes the center or side- he
goes and moves in a corner that's no
problem, you just let that move be. Now if
he plays a spoke, fine, that's the-
we like the more spokes the better.
(Should we play a game and see if I can)
(beat you now?) - Okay, off I go.
(So immediately the danger to me here is you)
(playing there?) - Yep, that's for sure.
(So I want to make a spoke?) - Yes, yes, great idea, okay.
(Now, again, that's good for me, but)
(from what you told me that's my danger now?)
Yes. - So I want to make another spoke?
Yes - oh I have no hope anymore.
(This early in the game you're thinking, I now)
(have no hope?) - True.
(Now again this is my- this is my danger.)
Well, first of all, there's a box. And if
you don't take that box I will. Now
there's threats on both sides, does that
scare you? Why? (Well because even number)
(of chains gives you the game.) - Yeah unless
they're all small. So you can stop there
from being two, just there are two threats now.
You stop one the other is only going to be one.
(So I play here?) - That's fine.
(And these have both become small chains-)
That's right. - (And now we're back to only one.)
Big chain- - (And that's good for me.)
Or maybe zero? I mean I can make zero chains. But
since you're already one point ahead-
that's right, that's right.
You get both of those, right? And you give
me two and- - (And I give you-)
And I give you two and you...
You win. Normally- and actually you got 6
to 3 because I sort of- - (I played)
(Elwyn Berlekamp at dots and boxes!)
(Only after he taught me-) - Oh, I tell you. The
proudest thing a teacher ever does is
when he gets students who are better than him.
This video was filmed at MSRI
in Berkeley, California. But, perhaps
fittingly for a video about dots and
boxes, it's also been sponsored by
Squarespace. If you're looking to set up
a website or a blog or an online store I
really recommend Squarespace. In fact I
recently got fed up with my own blog and
I've started using Squarespace, and I
wish I'd done it a long time ago. It's
really enjoyable to use, they've got
these great startup templates you can
start building with but then customise
them as little or as much as you'd like.
Really usable, really good customer
service. And importantly, the websites you
make on Squarespace automatically look
really good- well on big grown-up
computers, but also on your handheld
devices, your mobile phones. Now you can
just go to the site, have a look, you can
even play around and build your own site.
No credit card details or anything like
that, just see what you think. And then if
you do like it, and I think you probably
will, you can get 10% off by using the
code Numberphile - it also lets the people
at Squarespace know that you came from
here. In fact you can just go to the
website squarespace.com/numberphile,
find out the rest from there.
As I said, I use them myself, I'm a really
happy customer and you might be too. But
regardless, thank you to Squarespace for
sponsoring this video about,
appropriately, dots and boxes.