Next: Basic Data Structures, Up: API
To use the GNU Go engine in your own program you must include the file gnugo.h. This file describes the whole public API. There is another file, liberty.h, which describes the internal interface within the engine. If you want to make a new module within the engine, e.g. for suggesting moves you will have to include this file also. In this section we will only describe the public interface.
Before you do anything else, you have to call the function
init_gnugo()
. This function initializes everything within the engine.
It takes one parameter: the number of megabytes the engine can use for
the internal hash table. In addition to this the engine will use a few
megabytes for other purposes such as data describing groups (liberties,
life status, etc), eyes and so on.