Nibbler - Leela Chess Zero (Lc0) interface

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Max
Posts: 196
Joined: Tue Apr 13, 2010 8:41 am

Re: Nibbler - Leela Chess Zero (Lc0) interface

Post by Max » Sun Jun 23, 2019 10:07 am

Iconic Mephisto III-S Glasgow searches only a few nodes per second. Lc0 is limited to search 2 nodes.

Can the TCEC 15 winner compete without search against the champion from 1984 at level 2?
Attachments
Lc0 vs Mephisto III.jpg
Lc0 vs Mephisto III.jpg (172.73 KiB) Viewed 693 times
Hope we're not just the biological boot loader for digital super intelligence. Unfortunately, that is increasingly probable - Elon Musk

pohl4711
Posts: 993
Joined: Sat Sep 03, 2011 5:25 am
Location: Berlin, Germany
Contact:

Re: Nibbler - Leela Chess Zero (Lc0) interface

Post by pohl4711 » Sun Jun 23, 2019 12:24 pm

This tool is absolutely awesome !!!

Max
Posts: 196
Joined: Tue Apr 13, 2010 8:41 am

Re: Nibbler - Leela Chess Zero (Lc0) interface

Post by Max » Sun Jun 23, 2019 2:42 pm

pohl4711 wrote:
Sun Jun 23, 2019 12:24 pm
This tool is absolutely awesome !!!
I totally agree with you Stefan!

And it runs (with a little help) perfect on a mac too.
  • Download and install Node.js from https://nodejs.org/en/ . Now install electron: type in a terminal session "npm install -g electron".
  • Download source code of Nibbler and unpack it to a directory of your choice. Create there your config.json file. Then type in a terminal "electron ."
  • To make life easier, create a shell script for starting Nibbler. With a text editor create a new document; name it nibbler.sh. It could look like:

Code: Select all

#!/bin/bash
export PATH="/usr/local/bin:$PATH"

cd <Ablolute path to your Nibbler directory>
#e.g. cd /Users/max/chess/Lc0/Nibbler
electron .
  • When your script works as expected - don't forget to make it executable 8-) (chmod u+x nibbler.sh) - build a macOS application. It's easy: open the Applescript editor and create a new document. Type this line only:

Code: Select all

do shell script "<Absolute path to your Nibbler start script>"
#e.g. do shell script "/Users/max/chess/Lc0/nibbler.sh"
  • In Applescript editor File -> Save As (CMD-S) and choose File Format as Application. Done, you created your Nibbler app :!:
Hope we're not just the biological boot loader for digital super intelligence. Unfortunately, that is increasingly probable - Elon Musk

Steppenwolf
Posts: 30
Joined: Thu Jan 31, 2019 3:54 pm
Full name: Sven Steppenwolf

Re: Nibbler - Leela Chess Zero (Lc0) interface

Post by Steppenwolf » Tue Jun 25, 2019 9:57 am

This is a really Great tool!!! :D
Thanks also for the description to build Nibbler for the Mac.
Nevertheless, I am not that expert, please can you post a macOS binary available for the community?

How you handle this with the lc0 engine under macOS? There is no actual CUDA Driver under Mojave?

The best thing TMO would be to provide a bundled ready app, where all the things (GUI, engine and Network file) are inside.

Your help will be appreciated. Thanks!

pohl4711
Posts: 993
Joined: Sat Sep 03, 2011 5:25 am
Location: Berlin, Germany
Contact:

Re: Nibbler - Leela Chess Zero (Lc0) interface

Post by pohl4711 » Tue Jun 25, 2019 10:32 am

Guenther wrote:
Fri Jun 21, 2019 6:43 pm
Norbert Raimund Leisner wrote:
Fri Jun 21, 2019 5:43 pm
Has anybody tried out Nibbler GUI with other UCI-compatible engines e.g SF, Fire? cf. https://github.com/fohristiwhirl/nibbler/issues/25
Why should we? It is designed for Leela and he already answered you at github...
But the cool thing is, Nibbler works with LeelaFish, too.

Here my config.json-file for Nibbler (Stockfish in the same folder as LeelaFish):

{
"path": "C:\\LeelaFish\\lc0.exe",

"options": {
"Backend": "cudnn-fp16",
"AuxEngineFile": "C:\\LeelaFish\\stockfish_190622_bmi2.exe",
"AuxEngineOptions": "Hash=1024;Threads=4",
"AuxEngineDepth": 30
},

"args": [],

"width": 1280,
"height": 835,
"board_size": 640,
"movelist_height": 110,
"board_font": "18px Arial",
"light_square": "#dadada",
"dark_square": "#b4b4b4",
"active_square": "#66aaaa",
"best_colour": "#66aaaa",
"good_colour": "#66aa66",
"bad_colour": "#cccc66",
"terrible_colour": "#cc6666",
"bad_move_threshold": 0.02,
"terrible_move_threshold": 0.04,
"uncertainty_cutoff": 0.1,
"arrowhead_type": 0,
"show_n": true,
"show_p": true,
"show_u": false,
"max_info_lines": 10,
"update_delay": 170,
"search_nodes": "infinite",
"save_enabled": false,
"logfile": null,
"log_info_lines": false
}

Max
Posts: 196
Joined: Tue Apr 13, 2010 8:41 am

Re: Nibbler - Leela Chess Zero (Lc0) interface

Post by Max » Tue Jun 25, 2019 2:24 pm

Steppenwolf wrote:
Tue Jun 25, 2019 9:57 am
This is a really Great tool!!! :D
Thanks also for the description to build Nibbler for the Mac.
Nevertheless, I am not that expert, please can you post a macOS binary available for the community
Sorry Sven, but I used only the build script provided by the Leela developers. And the created binary depends on libraries you have to have installed on your mac. Don't know how to create it as a standalone mac executable.

Yes it's painfull, but atm you have to follow the guide "Building Leela" at https://github.com/LeelaChessZero/lc0 . It's not (very) difficult to create an openCL/blas binary yourself with these steps. And a slow Lc0 - combined with Nibbler - makes fun too :D .

Leela runs here on my Air only at the slow blas backend, openCL is even worse (slower and producing much more heat).
Hope we're not just the biological boot loader for digital super intelligence. Unfortunately, that is increasingly probable - Elon Musk

Max
Posts: 196
Joined: Tue Apr 13, 2010 8:41 am

Re: Nibbler - Leela Chess Zero (Lc0) interface

Post by Max » Tue Jun 25, 2019 5:15 pm

Max wrote:
Tue Jun 25, 2019 2:24 pm
Yes it's painfull, but atm you have to follow the guide "Building Leela" at https://github.com/LeelaChessZero/lc0 .
Maybe not?!

I uploaded an archive Lc0-mac.7z with my 4 versions to https://1drv.ms/u/s!AgnMt2KeIBxsgow97q8L8kEU10R1sQ

- lc0-0.21.2-BLAS(Apple-vecLib)
- lc0-0.21.2-BLAS(Intel-MKL)
- lc0-0.21.2-BLAS(openBLAS)
- lc0-0.21.2-openCL

The openCL and Apple vecLib binaries might run on your mac. Your cpu has to support AVX2.

For the other two, at least Intel MKL or openBLAS has to be installed on your system.

:arrow: Good luck (don't forget to make the lc0-files executable).
Hope we're not just the biological boot loader for digital super intelligence. Unfortunately, that is increasingly probable - Elon Musk

Post Reply