[computer-go] SGF parsing

Jacques Basaldúa jacques at dybot.com
Tue Jul 10 03:44:37 PDT 2007


Joshua Shriver wrote:

>Any help is appreciated, trying to write a parse in C

There is free source code for that:

http://www.red-bean.com/sgf/sgfc/index.html

and GnuGo http://www.gnu.org/software/gnugo/

If you want to do something minimal for testing an engine,
you only have to find: board size SZ[] komi KM[] and
the moves ;B[];W[] the file should have only one starting
"(" and one final ")" i.e. no variations.

If you want to extract a variation from a file that contains
many, you can use GoKnot using "Save as" and the file type
"Smart Game Format (Current variation only)" i.o the default
"Smart Game Format (All variations)" 

Jacques.



More information about the computer-go mailing list