Gomoku

Gomoku, also called "Five in a Row", is an abstract strategy board game. It is traditionally played with Go pieces (black and white stones) on a Go board. It can be played using the 15×15 board or the 19×19 board. Because pieces are typically not moved or removed from the board, gomoku may also be played as a paper-and-pencil game. The game is known in several countries under different names.
Origin.
Gomoku has existed in Japan since the Meiji Restoration. The name "gomoku" is from the Japanese language, in which it is referred to as . "Go" means five, "moku" is a counter word for pieces and "narabe" means "line-up". The game is popular in China, where it is called "Wuziqi" (五子棋). "Wu" (五 wǔ) means "five", "zi" (子 zǐ) means "piece", and "qi" ( qí) refers to a board game category in Chinese. The game is also popular in Korea, where it is called "omok" (오목 [五目]) which has the same structure and origin as the Japanese name.
In the nineteenth century, the game was introduced to Britain where it was known as Go Bang, said to be a corruption of the Japanese word "goban", which was itself adapted from the Chinese "k'i pan (qí pán)" "go-board."
Official rules.
Players alternate turns placing a stone of their color on an empty intersection. Black plays first. The winner is the first player to form an unbroken chain of five stones horizontally, vertically, or diagonally. Placing so that a line of more than five stones of the same color is created does not result in a win. These are called overlines.
Because gomoku has a strong advantage for the first player when unrestricted, the Swap2 rule is currently adapted in tournaments among professional players, including gomoku World Championships.
In Swap2 rule, the first player starts by placing three stones, 2 black and 1 white, on the board. The second player then selects one of three options: play as black, play as white and place another white stone, or place two more stones, one white and one black, and let the first player choose the color. This is essentially a more elaborate pie rule.
Swap2 solves the first-move advantage problem.
Variations.
Most variations are based on either Standard gomoku or Freestyle gomoku.
Optional ("house") rules.
Black (the player who makes the first move) was long known to have a big advantage, even before L. Victor Allis proved that black could force a win (see below). So a number of variations are played with extra rules that aim to reduce black's advantage.
Example game.
This game on the 15×15 board is adapted from the paper "Go-Moku and Threat-Space Search".
The opening moves show clearly black's advantage. An open row of three (one that is not blocked by an opponent's stone at either end) has to be blocked immediately, or countered with a threat elsewhere on the board. If not blocked or countered, the open row of three will be extended to an open row of four, which threatens to win in two ways.
White has to block open rows of three at moves 10, 14, 16 and 20, but black only has to do so at move 9.
Move 20 is a blunder for white (it should have been played next to black 19). Black can now force a win against any defense by white, starting with move 21.
There are two forcing sequences for black, depending on whether white 22 is played next to black 15 or black 21. The diagram on the right shows the first sequence. All the moves for white are forced. Such long forcing sequences are typical in gomoku, and expert players can read out forcing sequences of 20 to 40 moves rapidly and accurately.
The diagram on the right shows the second forcing sequence. This diagram shows why white 20 was a blunder; if it had been next to black 19 (at the position of move 32 in this diagram) then black 31 would not be a threat and so the forcing sequence would fail.
World championships.
World Championships in gomoku have occurred 2 times in 1989, 1991.
Since 2009 tournament play has resumed, with the opening rule changed to swap2.
List of the tournaments occurred and title holders follows.
Computers and Gomoku.
Researchers have been applying artificial intelligence techniques on playing gomoku for several decades. In 1994, L. Victor Allis raised the algorithm of proof-number search (pn-search) and dependency-based search (db-search), and proved that when starting from an empty 15×15 board, the first player has a winning strategy using these searching algorithms. This applies to both free-style gomoku and standard gomoku without any opening rules. It seems very likely that black wins on larger boards too. In any size of a board, freestyle gomoku is an "m","n","k"-game, hence it is known that the first player can force a win or a draw. In 2001, Allis' winning strategy was also approved for renju, a variation of gomoku, when there was no limitation on the opening stage.
However, neither the theoretical values of all legal positions, nor the opening rules such as Swap2 used by the professional gomoku players have been solved yet, so the topic of gomoku artificial intelligence is still a challenge for computer scientists, such as the problem on how to improve the gomoku algorithms to make them more strategic and competitive. Nowadays, most of the state-of-the-art gomoku algorithms are based on the alpha-beta pruning framework.
Reisch proved that Generalized gomoku is PSPACE-complete. He also observed that the reduction can be adapted to the rules of k-in-a-Row for fixed k. Although he did not specify exactly which values of k are allowed, the reduction would appear to generalize to any k ≥ 5.
There exist several well-known tournaments for gomoku programs since 1989. The Computer Olympiad started with the gomoku game in 1989, but gomoku has not been in the list since 1993. The Renju World Computer Championship was started in 1991, and held for 4 times until 2004. The Gomocup tournament is played since 2000 and taking place every year, still active now, with more than 30 participants from about 10 countries. The Hungarian Computer Go-Moku Tournament was also played twice in 2005. There were also two Computer vs. Human tournaments played in the Czech Republic, in 2006 and 2011. Not until 2017 were the computer programs proved to be able to outperform the world human champion in public competitions. In the gomoku World Championship 2017, there was a match between the world champion program Yixin and the world champion human player Rudolf Dupszki. Yixin won the match with a score of 2–0.