Gomocup is a competition in gomoku (five in row). The competitors are not humans, but computer artificial intelligences (AI, brain). The participant can be every programmer knowing how to create such a program. It’s quite easy. If you aren’t one of them, try to download several interesting programs or choose links to see several interesting addresses. In the other case we challenge you to join in the competition. The AIs having been done compete in tournament with each other using manager – a Win32 compatible application (see chapter Compatibility), that you can download here. The AIs communicate with the manager either via text files or via standard input/output, so that you can create it in any programming language generating executable win32 file. The matches are logged into a file, so that you can download this file and replay the match. There are no entry fees, neither any prizes for winners, the only reward is the publicity at this site and your own feeling of your success.
If you don’t know the rules of gomoku, read this paragraph up, because this game is invaluable companion in boring lesson or even more boring lecture. Gomoku is the game designed for two players playing on the square paper or on the go-board or other similar board. The players are alternatively putting it’s own signs (cross and circle) on the paper as far as one of them manages to create the line of five or more stones (free style gomoku rules) in vertical, horizontal or diagonal direction and due to becomes the winner.
If you have created your own brain program, you can join the tournament for free, please see how to join the Gomocup. If you want to join in, create a win32 compatible (see chapter Compatibility) program (the brain) that can communicate with the manager. You can use any programming language.
There are two ways how to communicate. The first one is via text files. The AI program being executed in every move reads the text file with position, computes the best move, writes the best coordination into the text file and terminates itself. This protocol is considered obsolete. The second one is via standard input/output. The program(AI) is executed only at the beginning of the game reads/writes information from/to standard input/output and while the opponent is moving, it is only paused. Important: The brain must flush each output to prevent the data from being bufferred. This can be performed by flush function in pascal or fflush(stdout) in C. The main advantage is the possibility to keep all computations in memory during the whole game. You can download a base of such brain in C++ or a base of brain in C# or base of brain in Delphi.
The tournament is being played every year at spring. Every correct and registered brain may join. One person may submit only one brain to each tournament as the first author. The tournament system is set up to according to number of attendats, usually AI are divided into groups on the basis of recent result. The brains in the same group fight each other for even number of matches (one duel), a draw is also possible. In order to reduce the first player’s advantage, we use balanced opening from a set. The board has 20×20 squares. The winner is AI forming a continuous line of 5 or more stones.
Three points for a win is used in tournaments before 2016 (inclusive). Concretely, AI obtains 3 points for winning a duel, 1 point for draw or no point for loss. The AI obtaining most points is the winner. If there are more AIs with the same number of points, the score (games won/games loss) then match between then time per move determines. Matches between finalists from the same groups are played again. Starting from 2017, Elo rating system is used to evaluate AIs’ strength, and The AI with the highest Elo rating is the winner. Winner of the tournament is the winner of the finals. Exact rules, time limits, memory limits etc. are publish on time in advance and usually reflect the last year’s rules.
Before launching the tournament, AI may not take more than 8 megabytes of space (zipped together with all necessary files). AI is allowed to save its information into files, that will last during the tournament. The AI creates a directory with its name for storing it. The size of all files belonging to one AI must not go over 20 megabytes in any time during the tournament.
The brain must obey the time limits for one turn and for match, that are announced before each tournament. The limits won’t be stricter than 30 seconds for turn and 3 minutes for match. The brain determines how much time it spends for the turn according to the remaining time info, provided by the manager. The speed of the PC is not exactly known, so the brain must be able to adapt. The brain must never occupy more RAM than allowed by a memory limit, which is also announced before the tournament and is not lesser than 70MB. The brain mustn’t display anything at screen. The brain may not communicate via a network.
Although multi-thread programs are allowed in the Gomocup tournament, one brain is restricted to use only one CPU core by setting CPU affinities to the program (see the document of piskvork about how to set CPU affinities), so the brains could not gain speed by multi-thread thinking. Furthermore, pondering is not allowed in the tourmanent, since the program would be suspended by the manager while the other brain is thinking.
Before 2017 (inclusive), AI must be Win32 compatible program, which supports Windows 7, Windows 8, Windows 10 on both platforms x86 and x64. Starting from 2018, we no longer require AI be Win32 compatible. In addition, hybrid (x86 and x64) programs are allowed. If you want to gain from speed of x64 and be compatible with x86, you can pack your x86 and x64 executable into ZIP archive. The x64 file name must contain 64 substring. For example, pbrain-yixin.exe and pbrain-yixin64.exe in Yixin.zip.
DOS programs are not allowed anymore.
If you have created your own brain program, you can join the tournament for free, please see how to join the Gomocup.
Kai Sun (sunkaicngmail.com) – organization of tournament
Tianyi Hao (haotianyi0126.com) – organization of tournament
Tomas Kubes (Tomas_Kubesseznam.cz) – organization of the 7th to 16th tournament, English translation of www
Vojta Havranek (havranekwerewolf.wz.cz) – organization of first six tournaments, webmaster
Petr Lastovicka (omnibotseznam.cz) – author of manager and brain bases code, maintenance of the protocol
Jiri Fontan (jiri.fontansofis.cz) – Gomotur manager author
Martin Petricek (bilbocentrum.cz) – foundation of the new protocol
Jan Dolezal (-email.cz) – author of first DOS manager
additional thanks to Vaclav Synacek, Petr Zizka and Jan Curn for their contribution