← Back to the game

Is Gomoku solved?

In short
  • Solved in 1993 on a 15 × 15 board with no opening rule.
  • Black wins with perfect play, with or without lines of six.
  • That is why competition Gomoku uses an opening rule, Swap2.

Yes. On a 15 by 15 board with no opening rule, Gomoku is a solved game: in 1993, Victor Allis, Jaap van den Herik and Matty Huntjens, three researchers working in the Netherlands, proved by computer that the first player, Black, wins with perfect play. The result holds for freestyle Gomoku (five stones or more) as well as for the "exactly five" rule. That is why competition play uses an opening rule, Swap2.

⚫ Play Gomoku

What "solved" means

A game is solved when its outcome is known if neither player makes a mistake. Tic-tac-toe is solved: it is a draw. Four in a row is solved too: the first player wins. Chess and Go are not.

For Gomoku, the proof gives a winning strategy from the empty board: for every possible White reply there is a Black move that leads to the win. It does not say what any random position is worth; specialists call this a "weak" solution.

The 1993 proof

It is described in the paper "Go-Moku and Threat-Space Search", signed by L. V. Allis and H. J. van den Herik (University of Limburg, in Maastricht) and M. P. H. Huntjens (Vrije Universiteit, in Amsterdam), and later taken up in Allis's doctoral thesis, defended in 1994. Here is what it says.

Victoria also played in public: in August 1992, in London, the program won the Gomoku tournament of the fourth Computer Olympiad, winning all its games played with Black.

The idea that made the calculation possible

Gomoku is too vast to be explored move by move: Allis's thesis estimates the number of positions at about 10105 and the number of possible games at about 1070. No machine can list all that.

The trick is to look only at threats. When Black makes a four, White has only one reply; when Black makes an open three, two or three. A sequence of threats is therefore an almost straight line in the game tree, which the computer can follow very far with very little calculation, until it finds a double threat. This is "threat-space search", inspired by the way the expert players observed by the authors reasoned. A second technique, proof-number search, chooses which positions to examine when no sequence of threats wins yet.

It is exactly what you do on your own scale when you look for a 4-3: those shapes are explained in the Gomoku strategy guide.

What the proof does not say

A much simpler argument, known as strategy stealing, already showed that White cannot have a winning strategy in freestyle Gomoku: if one existed, Black would place any stone and then apply it in White's place, since an extra stone cannot hurt. But that argument leaves open the possibility of a draw, and gives no moves to play. The 1993 proof gives the moves.

Renju was not born from this proof

You often read that Renju and its forbidden moves were invented after the proof, to save the game. It is the other way around. Japanese players had noticed Black's advantage long before: the name Renju was adopted in 1899, and Black's restrictions (double three, double four, a line of six or more) became settled in the first decades of the 20th century. The 1993 paper itself describes Renju as an already existing variant, and notes that Black seems to keep the advantage in it.

Later work proved the paper right: in 2001, Wágner and Virág published "Solving Renju", which establishes that Black also wins Renju when no opening rule applies.

The competition answer: Swap2

If one color wins, the only way to make the game fair is to stop one player choosing both the position and the color. Since 2009, the Gomoku world championships have used the Swap2 opening: the first player places three stones (black, white, black), the second chooses a color or places two more stones and hands back the choice. The details are in the guide to Gomoku variants.

On this site, freestyle Gomoku remains the default rule, because it can be learned in one sentence. Against the computer, you choose who starts, and whoever starts takes Black: let it go first from time to time, and you will see what the initiative is worth. With two players, on one screen or online, the competition rule (Swap2 and exactly five stones) is offered.

And today's computers?

Solving a game and playing it well are two different things. Gomoku programs keep competing, notably at the Gomocup tournament, held every year since 2000. On the theoretical side, it has been known since 1980, from a result by Stefan Reisch, that Gomoku generalized to a board of any size belongs to a class of problems considered very hard (it is "PSPACE-complete"): there is probably no general shortcut, only solutions board by board.

Frequently asked questions

Play now

More guides

This guide in other languages : 🇪🇸 Español · 🇮🇹 Italiano · 🇩🇪 Deutsch