popojan / goban

3D igo/baduk/weiqi/go game board and GUI for GnuGo and other GTP engines ray traced by GLSL shader
https://hraj.si/goban
GNU General Public License v3.0
47 stars 3 forks source link

how to add another engine? #3

Closed l1t1 closed 4 years ago

l1t1 commented 5 years ago

for example, leelazero

l1t1 commented 5 years ago

I add leelaz files at /engine/leelaz and a config file as following to engines.available and engines.enabled, it doesnt work correctly

./engine/leelaz leelaz leelaz --gtp -w 12b-leelaz-model-swa-16-11100000.txt.gz leelaz 0

popojan commented 5 years ago

does the engine print to stderr? --quiet might help I had some trouble adding mugo on windows because of that will fix that

popojan commented 5 years ago

in the meantime got it to work in wine with

./engine/leelaz
leelaz.exe
leelaz.exe --quiet --gtp -w ./engine/leelaz/best-network
leelaz
0

paths are meant to be relative to working directory

l1t1 commented 5 years ago

it works, thanks

l1t1 commented 5 years ago

one more question, when i exit the goban, leelaz resports an error in a window.

popojan commented 5 years ago

The syntax for adding a new engine is as follows:

<directory with engine executable, possibly relative to working dir, empty if engine is in path>
<engine executable filename>
<engine executable with all command line parameters>
<name to be displayed in the gui>
<0 for any extra engine, 1 for main gnugo coach>

The file is to be placed in config/engines.enabled; config/engines.available is just a storage for disabled engines. Engine management will likely change in the future.

Errors on exit might be caused by improper process termination. I will check it.

popojan commented 5 years ago

Slight change in syntax in windows 10 builds (switched to new integrated boost.process):

<directory with engine executable, possibly relative to working dir, or empty if in path>
<engine executable filename>
<*just* command line parameters>
<name to be displayed in the gui>
<0 for any extra engine, 1 for main gnugo coach>
popojan commented 4 years ago

Documented in the project's wiki.