How to win
Players take turns on a 15 × 15 board. Black moves first. Make a continuous line of at least five stones horizontally, vertically, or diagonally to win. This is freestyle Gomoku: there are no forbidden moves. A full board with no winner is a draw.
Controls
Click an intersection to place a stone. The red dot marks the last move. Undo takes back your last move and the AI's reply, if any. You can also use the arrow keys to select a point and Enter or Space to play.
Game settings
Play as Black to go first, or White to go second. Changing color starts a new game. You can change difficulty at any time. Your game is saved automatically in this browser, so you can continue after refreshing.
How the AI chooses a move
- Shortlist moves: The AI considers empty points within two spaces of existing stones, ranks their attacking and defensive potential, and searches a shortlist.
- Look ahead: Minimax, implemented as Negamax, simulates both players choosing the best response for themselves.
- Evaluate the position: The AI scores five-point windows in each direction. Windows with more friendly stones and no opposing stones receive higher scores.
- Prune branches: Alpha-Beta pruning skips branches that cannot improve the current choice, leaving more time for other variations.