A simple python script to organize games between usi_engines.
I made this script because all existing "engine_handlers" were for windows only.
- Linux
- Mac OS X
- Windows
- python
- json
- re
- pexpect
multiprocessingnot used anymore (deleted at 9e287e4b5445825be12589f02d00b47cbf870b3e)
- Basic USI engines support
- Byoyomi setting
- Save result as json
- Eval&Book files setting (by specifying the engine directory)
- Bonanza protocol support
- btime, wtime setting
- hash size setting
- ponder support
- number of threads setting ( Note: the option name differs on each engine. to implement, edit setOptions() function )
- example.py: example script to start a game with two engines.
- try in the interactive shell
[username@hostname]$ python
Python 2.7.14 (default, Sep 22 2017, 15:49:07)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import logging, sys
>>> from usiclient import UsiClient
>>>
>>> logger = logging.getLogger()
>>> logging.basicConfig()
>>> logger.setLevel(logging.INFO)
>>>
>>> e = UsiClient("/home/user/engines/Lesserkai/Lesserkai", "/home/user/engines/Lesserkai")
>>> e.p.logfile = sys.stdout
>>> e.initialize()
>>> e.newgame()
>>>
>>> e.go(" moves 2g2f 4a3b 2f2e",0,0,10000)