GoMoku - Play the game of Five in a Row against the computer or a friend
GoMoku, also called Gobang or 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, using 15×15 of the 19×19 grid intersections. Because pieces are 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. Players alternate turns placing a stone of their color on an empty intersection. The winner is the first player to form an unbroken chain of five stones horizontally, vertically, or diagonally.
GoMoKu originated in Japan during the Heian period. The name "Gomoku" is from the Japanese language, in which it is referred to as gomokunarabe (五目並べ). Go means five, moku is a counter word for pieces and narabe means line-up. The game is also popular in Korea, where it is called omok (오목 [五目]) which has the same structure and origin as the Japanese name. The Japanese call this game Go-moku (five stones). 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, said to be adopted from Chinese k'i pan (qí pán) "chess-board."
Besides many variations around the world, the Swap2 rule (based on "swap" from Renju) 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 1 white, if black goes first) on the board. The second player next can select one of these three options: choose to play black, or to play white and place one more stone, or to place two more stones to change the shape and let the first player choose the color. This is essentially a slightly more elaborate pie rule.
Swap2 solved the low complexity problem and makes the game fairer. Like other rules and variations, 100% fairness can be reached by playing two alternating games for each point.