Why programmers keep teaching computers Gomoku
Gomoku is easy to encode and brutal to search. That combination has supported decades of work on threat search, pruning and neural networks.
記事本文は現在英語のみです。
Gomoku looks like a friendly first project for a game programmer. The board is a grid. A move places one stone. Nothing moves afterward. Checking for five takes a few short loops.
Then the program has to choose a good move.
That is where the friendly project turns into a serious search problem.
Simple rules create a wide tree
On an empty 15 by 15 board, the first player has 225 legal intersections under freestyle rules. One disappears after every move, but the number of plausible choices stays large.
Most of those choices are strategically poor. A basic program still needs a way to discard them. Searching every continuation to the end is not practical.
Gomoku engines therefore lean on the structure human players use: nearby stones, recognizable threats and forcing replies. A four narrows the tree because the defender may have only one legal block. Long forcing sequences can be searched much deeper than quiet positions.
Threat-space search changed the problem
Victor Allis's work in the early 1990s used threat-space ideas to analyze freestyle Gomoku. Instead of treating every empty point equally, the search followed moves that created or answered specific threats.
That work established a win for the first player in the studied unrestricted form. The result is often shortened to "Gomoku is solved," which needs a warning label. Different board sizes, exact-five rules, Renju restrictions and balanced opening protocols are different games from the search program's point of view.
A proof for freestyle play does not hand a human a winning strategy under Swap2.
Engines became a sport of their own
Gomocup began in 2000 and has run an annual tournament for Gomoku programs ever since. It now hosts separate leagues for freestyle, standard Gomoku, Renju and Caro, along with different board sizes and time controls.
The separation is necessary. An engine trained to value an overline as a win will make illegal or useless choices under another rule set. Renju adds forbidden-move detection, which is a substantial problem by itself.
Tournament games also expose engineering weaknesses that never appear in a paper. Time management, memory limits, opening files and protocol bugs can decide a match before the evaluation function gets to be clever.
Neural networks joined, search stayed
AlphaGo inspired Gomoku programs that learned position values and move preferences from self-play. Monte Carlo tree search offered one route. Other engines kept alpha-beta search and improved the evaluator with neural networks.
Modern systems mix methods. Rapfi, for example, pairs efficient neural evaluation with tuned search and tactical handling. Its authors reported a Gomocup 2024 title, and the official 2026 results show Rapfi retaining the freestyle 20 by 20 championship.
This does not make hand-built threat logic obsolete. A network may judge the position, while exact tactical code checks whether someone has a forced win. Gomoku punishes an engine that feels good about a position but overlooks a four.
What playing an engine teaches
Computers are merciless about move order. They expose the difference between a threat that looks large and one that forces a reply. They also show how early a lost position can begin.
Do not copy engine moves without context. Ask what threat the move creates, which replies it removes and whether the rule set allows it. The explanation is where the lesson lives.
Gomoku remains useful to AI researchers for the same reason it frustrates new players: the rules fit in a minute, but local patterns combine faster than intuition can comfortably track.
Sources
その他の記事
Why double threats win Gomoku games
One threat can be blocked. Two threats created by the same stone often cannot. Learn how forks form and how to spot them early.

Where Gomoku came from
The game has an ancient reputation, but its documented story begins much later. Here is what we can say without turning legend into fact.

Gomoku rules are a family, not a single rulebook
Freestyle, standard Gomoku, Renju and Caro look alike at first. Overlines, forbidden moves and blocked fives make them play differently.

Newsletter
Join the community
Subscribe to our newsletter for the latest news and updates