Tests your goban implementation by playing with both gnugo and your implementation.
Downloads 10 random games from gokifu.com homepage as SGF and simulates games with implementations.
- Python 2.7+ (see
requirements.txt
) - gnugo (see Utilities for system-wide installer)
- Goban implementation with GTP interface
See also Useful Resources which also contains link to GTP Command Reference
- You must obey GTP v2 specifications.
- Implement those commands:
- quit
- boardsize
- clear_board
- play
- showboard
-
Fork and clone this repository
-
Install it from PyPI
pip install gtester
Warning: The name
gtester
conflicts with GLib unit test tool. You may want to run gtester withpython -m gtester
- Implement a board parser for your implementation by extending
gtester.parser.Parser
class.- If your output is compatible with gnugo output it is not required.
- If you omit
goban_X_parser
parameter inGobanTester
constructor,GnuGoParser
will be used
from gtester import GNU_GO_COMMAND
from gtester.parser import Parser
from gtester.tester import GobanTester
class ExampleParser(Parser):
...
# GobanTester(goban_1, goban_2, goban_1_parser=None, goban_2_parser=None ...
tester = GobanTester(["example_goban", ["--mode gtp"]], GNU_GO_COMMAND, ExampleParser())
Test gnugo goban implementation against itself:
python main.py gnugo --goban_args "--mode gtp"
- gnugo installer: you can find a bash script to install in project root, named as
install_gnugo.sh
. Script will install gnugo system-wide, building from sources.
Anyone can send pull requests for any kind of improvements.
See GNU Public License v3
- 06/03/2018
- Initial release.