Skip to content


Andy Olsen edited this page Mar 3, 2019 · 18 revisions

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. Otherwise Leela's search runs the same as before, including all position evaluations.

Download latest release

Recommended settings:

  • AuxEngineFile c:\sf10.exe
  • AuxEngineOptions Hash=1024;Threads=1
  • VerboseMoveStats true (I recommend always using this for any lc0 flavor)
  • LogFile leelafish.log (to help debug issues)

For --auxengine-options, I have not tested the impact of giving more/less Threads. I mostly tested with 1, and I just verified using more doesn't cause crashes. If you want to increase this, remember lc0 will be running also, so you need to decrease the number of threads you normally give to the AuxEngine. Similar for Hash, remember lc0 will be running and using memory, plus the AuxEngine will use memory. And you'll be running yet another engine as the opponent.

Leelafish will ask AuxEngine what the best move is each node that passes --auxengine-threshold. This will be many nodes, not just the root. The faster your GPU, the more nodes will be passed to AuxEngine. Since there are many, each search must be relatively quick. TBD add some dynamic adjustment to balance threshold and depth of search.

               Path to auxiliary chess engine.
               [UCI: AuxEngineFile]

               Semicolon separated list of UCI options for the auxiliary engine
               e.g. Hash=1024;Threads=1
               [UCI: AuxEngineOptions]

               The auxiliary engine is called when a node reaches this many visits
               [UCI: AuxEngineThreshold  DEFAULT: 100  MIN: 1  MAX: 1000000]

               Depth for the auxiliary engine to search.
               [UCI: AuxEngineDepth  DEFAULT: 15  MIN: 1  MAX: 100]

               How much to add to Policy, in percentage
               [UCI: AuxEngineBoost  DEFAULT: 50.00  MIN: 0.00  MAX: 100.00]

               Add this many plies of the auxengine's PV at a time. Higher is faster, but
               deeper PV moves are less accurate
               [UCI: AuxEngineFollowPvDepth  DEFAULT: 4  MIN: 1  MAX: 20]


AuxEngine startup:

../../src/mcts/] Stockfish 9 64 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott
../../src/mcts/] id name Stockfish 9 64
../../src/mcts/] id author T. Romstad, M. Costalba, J. Kiiski, G. Linscott
../../src/mcts/] option name Debug Log File type string default
../../src/mcts/] uciok

Leelafish sends variations add pv= to AuxEngine, and gets bestanswer back.

../../src/mcts/] add pv=g1f1 a7c5 a2a3
../../src/mcts/] bestanswer:e7d6 316

Between moves, Leelafish outputs how many nodes were in the queue waiting to be sent to AuxEngine.

../../src/mcts/] done waiting. auxengine_queue_ size 140
Clone this wiki locally
You can’t perform that action at this time.