Next: SGF, Previous: Alternative Moyo, Up: Top
The foundation of the GNU Go engine is a library of very efficient routines for handling go boards. This board library, called libboard, can be used for those programs that only need a basic go board but no AI capability. One such program is patterns/joseki.c, which compiles joseki pattern databases from SGF files.
If you want to use the board library in your own program, you need all the .c-files listed under libboard_SOURCES in engine/Makefile.am, and the files in the directories sgf/ and utils/. Then you should include engine/board.h in your code.
The library consists of the following files:
The public interface to the board library.
The basic board code. It uses incremental algorithms for keeping track of strings and liberties on the go board.
This contains all global variable of the board library.
Code for hashing go positions.
Implementation of output file in SGF format.
Utilities for printing go boards and other things.
To use the board library, you must include liberty.h just like
when you use the whole engine, but of course you cannot use all the
functions declared in it, i.e. the functions that are part of the
engine, but not part of the board library. You must link your
application with libboard.a
.