This post is going to appear a bit more mathematical than most, but trust me you’ll want to follow through it. You’ll be smarter for it, and you’ll learn a powerful technique to solve certain games in seconds. Under the right circumstances, it makes for a great party trick. So anyway, here’s the game!

The game is a simplified version of battleship on a 3×3 grid. Your opponent secretly places a submarine on two adjacent squares. You play the role of a bomber, and you select to “bomb” one of the squares. If you hit the submarine, you get a payoff of 1; otherwise you miss and it’s a payoff of 0.

What’s the best strategy for you and your opponent?

To be precise, we can draw out the 3×3 grid and label each of the nine squares with a letter.



The game has a lot of strategies. Your opponent can place the submarine in 12 positions (ab, bc, de, ef, gh, hi, ad, dg, be, eh, cf, fl), and you can choose to target any of the 9 squares (a, b, c, d, e, f, g, h, i).

This game therefore has a very large payoff matrix with dimensions 9×12.

If you solve this game without any tricks, you would have to solve a system of 9 simultaneous equations to find out the mixed strategies just for the bomber. then you have to solve a system of 12 simultaneous equations for the submarine. That’s a lot of work….but luckily we can skip all of that because there’s a trick!

Keep reading to see how we will solve this 9×12 game in a matter of seconds.

(Credit: I found this problem in an introduction to game theory called Game Theory Alive by Yuval Peres, who is at Microsoft Research and an Adjunct Professor at UC Berkeley. I’ve only read a couple chapters so far. But it already strikes me as one of the best mathematical introductions to game theory available online.)

.

.

"All will be well if you use your mind for your decisions, and mind only your decisions." Since 2007, I have devoted my life to sharing the joy of game theory and mathematics. MindYourDecisions now has over 1,000 free articles with no ads thanks to community support! Help out and get early access to posts with a pledge on Patreon. .

.



The principle of symmetry!

We’re all familiar with symmetry. If you rotate a circle, it will look exactly the same. If you turn a blank piece of paper upside down, it again will look the same. And it is said that on the faces of many beautiful people, the right and left sides of the faces are nearly identical–you could reflect their features and the face would look nearly the same.

Loosely speaking, symmetry is the idea that an object somehow stays the same even after some of the points have been shuffled around. This idea is useful in non-geometric settings too, such as game theory.

For instance, consider the game of rock-paper-scissors. One thing to notice is the strategies are symmetric. What this means is that if we relabeled the strategies as paper-scissors-rock, for example, that would make absolutely no difference to how the game would be played. The observation that the strategies are symmetric is useful: it means that we know the three strategies should be played with equal probability.

(In other words, strategies can be called symmetric if we can relabel them without making a difference to the equilibrium in the game. Formally, for any permutation σ, the equilibrium with the strategies s σ(1) , s σ(2) , … s σ(n) has the same payout as s 1 , s 2 , … s n ).

Don’t let the notation bog you down. The importance is this: once you know that certain strategies are symmetric, you know that those strategies must be played with equal probability in equilibrium.

Solving the battleship game quickly

Let’s return to the game at hand. Can we classify any of the strategies that you or your opponent play as symmetric?

Start with the submarine. Although there are 12 distinct submarine placements on the board (ab, bc, de, ef, gh, hi, ad, dg, be, eh, cf, fi), the positions can really be classified as two different classes of symmetric strategies.

As illustrated, either the submarine occupies a corner and middle square–the 8 strategies (ab, bc, ad, cf, dg, fi, gh, hi)–or the submarine occupies the center square and a middle square–the 4 positions (be, ef, eh, de). These are symmetric positions and hence the submarine really only has 2 types of strategies: select a Corner-Middle or a Center-Middle.

Now for the bomber. Again, although there are 9 distinct strategies (a, b, c, d, e, f, g, h, i), the choices can be classified as three classes of strategies: selecting one of the 4 Corners (a, c, i, g), one of the 4 Middle squares (b, f, d, h), or the Center square (e).

Thus, the 9×12 game is easily reduced to game in which the bomber has 3 strategies (Corner, Middle, Center) and the submarine has 2 strategies (Corner-Middle, Center-Middle). This is a game with six payoffs that can be written in a 3×2 game matrix.

Notice the payoffs correspond to expected values. For instance, if the bomber selects Corner, and submarine selects Corner-Middle, there is a 1 in 4 chance the bomber will pick the correct corner. The rest of the values are calculated similarly.

This game can be solved in any number of ways. It turns out we can keep reducing strategies by removing delted strategies. (The method is called “iterated elimination of dominated strategies (IESDS). Shameless plug: I explain IESDS in a chapter of my ebook The Joy of Game Theory).

Notice the bomber’s strategy of Corner is dominated by Middle. This is because the submarine will always need to occupy a middle square, but it sometimes does not always occupy a corner square. Deleting the strategy of Corner reduces the game to a 2×2 matrix.

Furthermore, the submarine will never want to pick Center-Middle as it is dominated by Corner-Middle. The game reduces to a 2×1 game.

Finally, if the submarine is never picking Center-Middle, the bomber never needs to pick Center either. Deleting this strategy leads to a reduced game in which each player just has one type of strategy.

This is remarkable–a 9×12 game reduced to a 1×1 game!

Now we just need to translate our symmetric class of strategies into our original strategies. We know the bomber picks Middle, which means you should randomize 1/4 to each of the 4 middle squares (b, d, f, h). Similarly, the submarine picks Corner-Middle, which means your opponent should randomize 1/8 to each of the 8 corner-middle positions (ab, bc, gh, hi, ad, dg, cf, fl).

The result is there is a 1/4 chance you will hit the submarine. Quite the remarkable way to solve this problem!