Leela Chess Zero for Mac HIARCS

This forum is for general discussions and questions, including Collectors Corner and anything to do with Computer chess.

Moderators: Harvey Williamson, Steve B, Watchman

Forum rules
This textbox is used to restore diagrams posted with the fen tag before the upgrade.
Post Reply
ddlj81
Member
Posts: 13
Joined: Sat Apr 26, 2014 10:24 am

Leela Chess Zero for Mac HIARCS

Post by ddlj81 »

I followed the installation (build) of Leela Chess Zero for Mac (download the package and build). https://github.com/LeelaChessZero/lc0#mac .

Note, you will need to download the Git package and then build. It builds easily without issues.

I was even able to configure the UCI engine in HIARCS engine settings. However, when I take a position and turn on the engine, nothing shows up, no lines, no evaluations, nothing.

Anybody had success with using Leela Chess zero on Mac with HIARCS ?[/url]
User avatar
Eric Wainwright
Member
Posts: 88
Joined: Sat Sep 26, 2009 4:50 pm
Location: Boulder, CO, USA

Post by Eric Wainwright »

I was hoping there would be a trailblazer for getting Lc0 working in Hiarcs for the Mac. :) I’d love to have this engine running along with my other ones.

Have you checked the Mac-related postings on Github?

I wish you luck,
-Eric
fdimeglio
Full Member
Posts: 806
Joined: Sun May 15, 2011 5:31 am
Location: California

Post by fdimeglio »

I tried a few weeks go on Linux and that was not working correctly for me even trying to follow the instructions.

I should probably try again on both my Linux box and my Mac.

Cheers,

Fabrice
Looking for a nice Fidelity EAG or A/S and a Odin Encore. Please send me a private message.
Rei
Member
Posts: 5
Joined: Sun Dec 22, 2019 4:22 pm

Leela Chess Zero into HIARCS Chess Explorer

Post by Rei »

Dear HIARCS users,

I have HIARCS Chess Explorer interface for MAC OSX Catalina and I haven't got Leela Chess Zero (lc0).

Would you please let me know the procedure (step-by-step) how to install Leela Chess Zero into HIARCS Chess Explorer?

Thank you in advance.

Best wishes,
Rei
javast98
Member
Posts: 2
Joined: Thu Jul 16, 2020 2:09 pm

Got it working

Post by javast98 »

I got this to work finally, on a 2019 model Macbook Pro running Catalina and a Intel Iris Plus Graphics 645 1536 MB card.

I installed lc0 with homebrew. No hand compiled version I could generate would work. If you have homebrew install, (which you really should!) it's easy - just type "brew install lc0"

This sets up your binary inside the homebrew package manager's area of your folders. Don't mess with it. type "which lc0" and you should probably get the answer "/usr/local/bin/lc0"

now you just need to make a symlink in the HIARCS engine folder, usually ~/Documents/HIARCS Chess/Engines so change directories: "cd ~/Documents/HIARCS\ Chess/Engines/"



now make the symlink: "ln -s /usr/local/bin/lc0 lc0" NOTE: if these folders are different on your computer, you will have to adjust them obviously.

Then you just install the engine as normal through the preferences. A final note: the first time I ran it, it took a while before the engine started suggesting any moves - give it a minute or so before giving up.[/img]
User avatar
Eric Wainwright
Member
Posts: 88
Joined: Sat Sep 26, 2009 4:50 pm
Location: Boulder, CO, USA

Post by Eric Wainwright »

It worked!! It built the first time I tried it on my Mac. Thanks for posting your instructions.

After I built it using Homebrew, I just copied the “lc0” alias that was in my “usr/local/bin” folder into my Hiarcs Engine folder. Then, I added it to my list of engines in the Hiarcs preferences. It loads fine and I can view all Leela’s settings in the Configuration dialog.

However, I can’t vouch for its play right now. Sometimes, it shows really bad evaluations, or even large numbers like “-254817658”. Other times, it has crashed during a game. I need to do some more experimentation and I’ll report back.

But, it looks encouraging…
javast98
Member
Posts: 2
Joined: Thu Jul 16, 2020 2:09 pm

Got it working - again

Post by javast98 »

I noticed that recently, there has been a new updated version of lc0 posted to Homebrew. I installed, eagerly hoping that the problems Eric Wainwright (and I also) experienced would be fixed. unfortunately it was not the case. Now, I couldn't even get an evaluation to show up. So I did some debugging.

Turns out, the Homebrew installed version doesn't ship with a network file anymore, which is like downloading a skull without a brain inside :roll:

So you need to download a network file - I found this page, sort of helpful: https://github.com/LeelaChessZero/lc0/w ... ts-for-Lc0

Sort of, because there are a lot to choose from. I chose their best "all around" recommendation: https://www.comp.nus.edu.sg/~sergio-v/t40/256x20/


So this is what you have to do now:

1) install lc0 via homebrew
2) cp /usr/local/bin/lc0 ~/Documents/HIARCS\ Chess/Engines/
3) download a network file, perhaps using the links I suggested above, unzip/decompress it as necessary.
4) rename the network file "weights"
5) put the weights file in the Engines folder alongside the lc0 binary
6) open HIARC preferences, Engine tab
7) add an engine, selecting the lc0 binary.
8) select it, and press "Configure"
9) set the WeightsFile (all the way at the bottom) to be weights (thats what we named the weights file in 4 above
10) IMPORTANT - set the backend option to blas - it's the first option, and when you click on "opencl" there will be a dropdown - select "blas"

now it should work, but it will be really slow - this is because that blas option means you are using the CPU instead of the GPU. This stinks, but because Apple's drivers are essentially broken for this kind of application, this is the best you can do, unless you happen to have a high end mac with better graphics card.

At least you can play around a bit, and yes, leela can probably still beat you. :)
JGFMK
Member
Posts: 3
Joined: Tue Mar 12, 2024 4:24 pm

Re: Leela Chess Zero for Mac HIARCS

Post by JGFMK »

Per here it's far simpler on a Mac if you have brew installed, to run:

brew install lc0

I have M1 chip architecture, so
/opt/homebrew/Cellar is the base location of where the brew install goes.
/opt/homebrew/Cellar/lc0/0.30.0
There was a a similar discussion over on the Stockfish Engine link that is also helpful search for user jldchess
If /opt isn't visible in Finder, CMD Shift . is useful for displaying hidden files ...

HIRARCS Chess Explorer Pro > Preferences > Engines > + then point it to /opt/homebrew/Cellar/lc0/0.30.0/lc0
Post Reply