Is Gomoku solved?
- 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.
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.
- The suspicion was old. The authors point out that Japanese professional players had claimed for decades that Black wins, without anyone having proved it.
- Two rules were solved: the one where a line of six stones or more wins, and the one that requires exactly five. In both cases, a complete winning tree for Black was built and checked.
- The program is called Victoria. It combines two search techniques developed for the occasion.
- The longest line of play lasts 35 moves, counting both players: against the best defense, Black makes five in a row with their eighteenth stone at the latest.
- The resources: ten workstations running overnight, about 5 million positions examined for the first rule and 6 million for the second. The final winning tree has just under 140,000 positions for one and just over 150,000 for the other.
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
- It is about the 15 by 15 board. The 19 by 19 board, the one used for Go, has not been solved in the same way. The authors cite Japanese players who believe a bigger board favors Black even more.
- It does not hold with an opening rule. As soon as Black no longer chooses the first stones freely, everything has to be recalculated.
- It does not make the game unplayable. Nobody memorizes a tree of 140,000 positions. Between humans, Black has the initiative, and a single inaccuracy is enough to hand the game to White.
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
More guides
- Gomoku rules: how to play five in a row The 15 × 15 board, five in a row, six stones or not, who starts, Swap2 and the draw.
- Gomoku strategy: the shapes that win Basic shapes, double threats, five questions per move, defending, reading ahead and the opening.
- Gomoku, Renju, Swap2, Omok, Caro: the variants compared Freestyle and competition Gomoku, Swap2, Renju, Omok, Caro and which rule to choose.
- History of Gomoku: from Edo Japan to the world championships Uncertain origins, Edo Japan, Go Bang, Renju in 1899, the RIF in 1988, 1993 and Swap2.
- Gomoku and Go: the differences Goal, board, captures, end of the game, first-move advantage and computers, in one table.
This guide in other languages : 🇪🇸 Español · 🇮🇹 Italiano · 🇩🇪 Deutsch