Page 2 of 16

Re: Trying out the Leela Hybrid engine (NN with AB)

Posted: Tue Feb 19, 2019 8:34 pm
by pohl4711
Very cool project. Works in Fritz16, but crashes with ponder on in Enginematches after first move of the opponent.

Re: Trying out the Leela Hybrid engine (NN with AB)

Posted: Tue Feb 19, 2019 8:49 pm
by duncan
Milos wrote: Tue Feb 19, 2019 7:44 pm
Laskos wrote: Tue Feb 19, 2019 6:40 pm
AdminX wrote: Tue Feb 19, 2019 2:52 pm
LeelaFish is a modified version of the Lc0 engine that gets help from an outside (auxiliary) engine. Leela uses the AuxEngine's PV to boost the Policy of those moves.
https://github.com/killerducky/lc0/wiki/LeelaFish
With default settings and SF10 auxiliary on 1 thread, +40 Elo points to pure Lc0 with t30 and t40 nets at bullet TC. Much better tactically. With late t30 nets, strongest engine on my PC.
Pity aux engine threads are done in a clumsy way, instead of launching a separate instance of SF for each node on a different thread coz each instance of SF will use very little memory due to low hash requirements of SF search, it launches low-depth SMP SF search that is highly inefficient.
Anything positive to say ? nothing ?

Re: Trying out the Leela Hybrid engine (NN with AB)

Posted: Tue Feb 19, 2019 9:25 pm
by Damir
He already did..... :) :)

Re: Trying out the Leela Hybrid engine (NN with AB)

Posted: Tue Feb 19, 2019 9:59 pm
by KillerDucky
Hello, I'm KillerDucky the author of https://github.com/killerducky/lc0/wiki/LeelaFish thanks for testing it! Those using the engine know but to emphasize for others, the AuxEngine can be any UCI engine. It's only natural that Stockfish is the first choice, and implied by the name Leelafish. :wink:

I'm not a C++ programmer or an expert on chess engines, so I tried to keep it simple. Please let me know any suggestions! Especially regarding Stockfish internals that I could take advantage of. A couple questions I have:

Currently it runs SF using "go depth N" where N is a parameter. Would it be better to maybe use "go movetime N"? Where SF could decide to spend more or less time depending on the position?

I was wondering about contempt, it will be calling SF to analyze positions for both white and black, and if contempt is on does that mean it will have to redo a bunch of work? Or does it have to redo that work regardless when you change positions? Maybe I should disable contempt, or set it to white only or black only depending on what color leela is.

Re: Trying out the Leela Hybrid engine (NN with AB)

Posted: Tue Feb 19, 2019 11:08 pm
by yanquis1972
Damir wrote: Tue Feb 19, 2019 4:41 pm
Jouni wrote: Tue Feb 19, 2019 3:01 pm Which engine is this Eman? It's topping same rating lists in PlayChess! SF clone?
http://eman.zohosites.com/
is there a direct link to the download? i'm not seeing it on the webpage.

Re: Trying out the Leela Hybrid engine (NN with AB)

Posted: Tue Feb 19, 2019 11:30 pm
by MikeB
Eduard wrote: Tue Feb 19, 2019 5:34 pm It seems that this Hybrid works only with GPU (CUDA). Right?
It is direct derivative from lc0 and can be complied for openCL or blas as well. It works with McCain as the aux engine as well.

Re: Trying out the Leela Hybrid engine (NN with AB)

Posted: Wed Feb 20, 2019 12:39 am
by Eduard
MikeB wrote: Tue Feb 19, 2019 11:30 pm
Eduard wrote: Tue Feb 19, 2019 5:34 pm It seems that this Hybrid works only with GPU (CUDA). Right?
It is direct derivative from lc0 and can be complied for openCL or blas as well. It works with McCain as the aux engine as well.
Thank you!

Unfortunately I can not compile it.

Can someone create this Leelafish for CPU (blas)?

Re: Trying out the Leela Hybrid engine (NN with AB)

Posted: Wed Feb 20, 2019 12:58 am
by MikeB
MikeB wrote: Tue Feb 19, 2019 11:30 pm
Eduard wrote: Tue Feb 19, 2019 5:34 pm It seems that this Hybrid works only with GPU (CUDA). Right?
It is direct derivative from lc0 and can be complied for openCL or blas as well. It works with McCain as the aux engine as well.
For MacOS users to compile - if you were successful compiling lc), you should not have any significant problems to compile this for.k. It requires boost, I tried MacPorts and that was not a success. But you install it directly from the source.

Links to read:
http://www.boost.org/more/getting_start ... iants.html
http://www.boost.org/build/doc/html/index.html

then run:

Code: Select all

sudo bootstrap.sh
Mac-Pro:boost_1_69_0 xxxx ./b2 install
then grab a coffee, it will take a while

for macOS, you will get the following errors:

Code: Select all

/usr/local/include/boost/process/detail/posix/wait_for_exit.hpp:60:7: error: expected id-expression before '(' token
     ::sigemptyset(&sigset);
/usr/local/include/boost/process/detail/posix/wait_for_exit.hpp:61:7: error: expected id-expression before '(' token
     ::sigaddset(&sigset, SIGCHLD);
/usr/local/include/boost/process/detail/posix/wait_for_exit.hpp:87:26: error: '::sigtimedwait' has not been declared
         auto ret_sig = ::sigtimedwait(&sigset, nullptr, &ts);
/usr/local/include/boost/process/detail/posix/wait_group.hpp:64:7: error: expected id-expression before '(' token
     ::sigemptyset(&sigset);
/usr/local/include/boost/process/detail/posix/wait_group.hpp:65:7: error: expected id-expression before '(' token
     ::sigaddset(&sigset, SIGCHLD);
/usr/local/include/boost/process/detail/posix/wait_group.hpp:90:17: error: '::sigtimedwait' has not been declared
         ret = ::sigtimedwait(&sigset, nullptr, &ts);
a quick fix is to simply to remove "::" , e.g., for the first one "::sigemptyset(&sigset);" change to "sigemptyset(&sigset);" . likewise from the others.
( source of solution https://github.com/boostorg/process/issues/55 )
That's it, it should compile for macOS.

Re: Trying out the Leela Hybrid engine (NN with AB)

Posted: Wed Feb 20, 2019 8:28 am
by M ANSARI
DOUBLE POST

Re: Trying out the Leela Hybrid engine (NN with AB)

Posted: Wed Feb 20, 2019 8:28 am
by M ANSARI
Pity aux engine threads are done in a clumsy way, instead of launching a separate instance of SF for each node on a different thread coz each instance of SF will use very little memory due to low hash requirements of SF search, it launches low-depth SMP SF search that is highly inefficient.

What would be a better way to do things? I guess a first step would be to simply play all the moves that Lc0 wants to play and have SF only over rule if the move that Lc0 wants to play fails low with a pre-determined cut off evaluation requirement. This would eliminate those annoying one move tactical blunders and play in the endgame that everyone is calling "trolling". But really this could be really interesting if this could also be implemented in what Lc0 is searching rather than the immediate move. This way even deep variations can be probed for accuracy and thus it would give the positional play of Lc0 much more accuracy.