Stahlfaust - Gomoku AI player

by Marco Kunze and Sebastian Nowozin (,


Gomoku, sometimes known as "five wins" is a game played on a 15x15 board by two players. The goal is simple: to be the first player to have a line of five or more stones. While the rules are as simple as that, the game can become very complex and challenging.

Stahlfaust is an AI player for the standard Gomoku game. It uses alpha-beta search, threat tree dbsearch and defensive search to provide a challenge to you. However, its not very fast... :-(

The game was developed as term project for the Artificial Intelligence course of Professor Zhang Liqing at the Shanghai Jiaotong University by Marco Kunze and Sebastian Nowozin.


Everybody likes screenshots, so here is one. debugging output windows you can view:

Stahlfaust AI player being defeated.


The guts of the AI is an intelligent definition of threats, used in both the alpha-beta search and the dependency based search. This definition has been given by L. Victor Allis in his PhD thesis titled " Searching for Solutions in Games and Artificial Intelligence". (By the way, he invented db-search).

We implemented some extra stuff though and we also try to find the threat trees of the opponent player in order to establish a defense.


The whole program is opensource and free software. It is released under the conditions of the GNU General Public License. The license is included in the distribution in the 'LICENSE' file. Please read and acknowledge this license before using this program. On Linux you will need Mono, a free implementation of the Microsoft .NET framework and compilers. The source is written almost completely in C#.


We would like to thank Professor Zhang Liqing for his excellent AI course and the challenge posed to us to write a competitive Gomoku player. We easily defeated the previous' years champion program and landed a respectable second place in this years competition.

We would also like to thank Victor Allis for sharing insights into the game of Gomoku.


We are curious about user-, developer- and mathematicans feedback, so please mail us your thoughts to and

last update: Friday, 18 Mar 2005