Trying out the Leela Hybrid engine (NN with AB)
Moderators: hgm, Rebel, chrisw
-
- Posts: 2439
- Joined: Sat Sep 03, 2011 7:25 am
- Location: Berlin, Germany
- Full name: Stefan Pohl
Re: Trying out the Leela Hybrid engine (NN with AB)
Very cool project. Works in Fritz16, but crashes with ponder on in Enginematches after first move of the opponent.
-
- Posts: 12038
- Joined: Mon Jul 07, 2008 10:50 pm
Re: Trying out the Leela Hybrid engine (NN with AB)
Anything positive to say ? nothing ?Milos wrote: ↑Tue Feb 19, 2019 7:44 pmPity 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.Laskos wrote: ↑Tue Feb 19, 2019 6:40 pmWith 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.AdminX wrote: ↑Tue Feb 19, 2019 2:52 pmhttps://github.com/killerducky/lc0/wiki/LeelaFishLeelaFish 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.
-
- Posts: 2801
- Joined: Mon Feb 11, 2008 3:53 pm
- Location: Denmark
- Full name: Damir Desevac
Re: Trying out the Leela Hybrid engine (NN with AB)
He already did.....
-
- Posts: 12
- Joined: Fri Mar 23, 2018 2:31 am
Re: Trying out the Leela Hybrid engine (NN with AB)
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.
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.
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.
-
- Posts: 1766
- Joined: Wed Jun 03, 2009 12:14 am
Re: Trying out the Leela Hybrid engine (NN with AB)
is there a direct link to the download? i'm not seeing it on the webpage.
-
- Posts: 4889
- Joined: Thu Mar 09, 2006 6:34 am
- Location: Pen Argyl, Pennsylvania
Re: Trying out the Leela Hybrid engine (NN with AB)
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.
-
- Posts: 1439
- Joined: Sat Oct 27, 2018 12:58 am
- Location: Germany
- Full name: N.N.
Re: Trying out the Leela Hybrid engine (NN with AB)
Thank you!
Unfortunately I can not compile it.
Can someone create this Leelafish for CPU (blas)?
-
- Posts: 4889
- Joined: Thu Mar 09, 2006 6:34 am
- Location: Pen Argyl, Pennsylvania
Re: Trying out the Leela Hybrid engine (NN with AB)
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
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);
( source of solution https://github.com/boostorg/process/issues/55 )
That's it, it should compile for macOS.
-
- Posts: 3707
- Joined: Thu Mar 16, 2006 7:10 pm
Re: Trying out the Leela Hybrid engine (NN with AB)
DOUBLE POST
Last edited by M ANSARI on Wed Feb 20, 2019 8:29 am, edited 1 time in total.
-
- Posts: 3707
- Joined: Thu Mar 16, 2006 7:10 pm
Re: Trying out the Leela Hybrid engine (NN with AB)
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.