Player A has 1 boxes. Player A (first player) needs 4 boxes to win. Player B has 0 boxes. Player B (second player) needs 6 boxes to win. See Analysis Results for why player B needs 6 rather than 5 boxes to win. Click on a move for player A or choose one of the following. X Make me player A. Make me player B. Let me move for both players.

Players take turns adding a line between two dots. The player who completes the fourth side of a box earns one point and takes another turn. The game ends when no more lines can be placed. The winner is the player with the most points. In this video, Elwyn Berlekamp shows how to win every game of dots and boxes. Elwyn explains chains and loops and why the player who goes first always wants an even number of chains whereas the second player always wants an odd number of chains in order to win every time.
Elwyn Berlekamp is a professor emeritus of mathematics and EECS at the University of California, Berkeley. He’s also an expert at Dots and Boxes. He’s played Dots and Boxes since he was introduced to the game in 1946, when he was in 1st grade, and he’s developed several algorithms for winning every time. Elwyn and I have played several rounds of Dots and Boxes together, including the first time I met him when I was in 3rd grade, and I was able to outsmart him this time.
This strategy game starts with an empty grid of dots. Two players take turns adding a line between two adjacent dots. All lines have to be vertical or horizontal, not diagonal. The player who completes the fourth line of a 1×1 box earns one point, puts his or her initial in the box, and then takes another turn. The person with the most boxes wins.
In this video, Elwyn explains chains and loops and why the player who goes first always wants an even number of chains whereas the second player always wants an odd number of chains. You can go into even more detail in his book, Winning Ways for Your Mathematical Plays, that he wrote with John Conway and Richard Guy.
Update 3/21/2018
Elywn wrote: “One minor point: at 48 seconds, James has me playing a “half-hearted handout“, whereas a “hard-hearted handout” as a horizontal move on the same box gives him less choice. My game pigeon won't update. But either way, he can win this game, as he did.”