syzygy1 / Cfish

C port of Stockfish
GNU General Public License v3.0
137 stars 59 forks source link

Cerebellum book support #30

Closed ChessMan3 closed 6 years ago

ChessMan3 commented 6 years ago

Hello! It is not an issue. I think I can speak on behalf of all the fans of Cfish: could you add support for the Cerebellum book as in Brainfish or ASMfish? I think all Cfish users would like this.

syzygy1 commented 6 years ago

I may have a look when I find some time.

ChessMan3 commented 6 years ago

Thank you for adding Cerebellum book support! I have some error when compile:

search.c:31:10: fatal error: polybook.h: No such file or directory

include "polybook.h"

Saugstrahler commented 6 years ago

Hi Ronald, I get the same error:

search.c:31:10: fatal error: polybook.h: No such file or directory

include "polybook.h"

      ^~~~~~~~~~~~

compilation terminated.

syzygy1 commented 6 years ago

A small oversight :-)

CoffeeOne commented 6 years ago

Hi, I tried today with CFish and book Cerebellum_Light_Poly.bin. Compilation works fine, but book does not work, engine makes no move. Same books works for me with asmfish. In comparison to Asmfish, CFish does not have the "Ownbook" UCI option.

syzygy1 commented 6 years ago

It works for me:

$ cfish setoption name BookFile value /home/ronald/cerebellum/cerebellum.bin info string Book loaded: /home/ronald/cerebellum/cerebellum.bin go movetime 1000 bestmove e2e4

Alexei1981 commented 6 years ago

Thanks to Mr. De Man. I compiled this cfish on androids. The book works (only I had to write in the file ucioption.c the path to the folder where the book lies because of the file system features on the android). Now everything works fine!

Denzwell commented 6 years ago

This version does not work well. The engine stop to move after last book move under windows system.

MichaelB7 commented 6 years ago

Which GUI are you using? Does the GUI have a "logging" option you can turn on to help debug? If yes, turn logging on and post the output when it stops playing. It is working fine under macOS using xBoard with no issues at all.

Denzwell commented 6 years ago

I use this engine on playchess . I use my ctg book and cerebellum. With brainfish i can use two books. Cfish can insert debug file for that

MichaelB7 commented 6 years ago

Sorry - I will not be able to help. MacOS and xboard here. No windows.

Denzwell commented 6 years ago

On windows setoption name BookFile value E:\books\cl.bin info string Book loaded: E:\books\cl.bin go movetime 1000 <nothing (no moves)>

MichaelB7 commented 6 years ago

Just to confirm , you downloaded the cerebellum book that is in polyglot format? - the old format would not work with Cfish. Since it is a polyglot book ,any GUI that accepts polyglot books will also be able to read it. I only ask , because it is unclear in the name of the file that you are trying to load that it is the correct file.

Sent from my iPhone

On Dec 12, 2017, at 11:23 AM, Denzwell notifications@github.com wrote:

On windows setoption name BookFile value E:\books\cl.bin info string Book loaded: E:\books\cl.bin go movetime 1000 <nothing (no moves)>

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Denzwell commented 6 years ago

yes i just renamed polyglot cerebellum.bin book to cl.bin. i use the same book with brainfish and it works fine.

ChessMan3 commented 6 years ago

Works fine with Cute Chess 0.9.4, under Windows 10 x64

===========

Score of Cfish_x64_121217_N_popcnt_720gcc vs Cfish_x64_121217_N_popcnt_720gcc_book: 42 - 165 - 410 [0.400] ELO difference: -70.20 +/- 15.52

624 of 1000 games finished. 10+0.1

*Cfish_x64_121217_N_popcnt_720gcc_book - with Cerebellum_Light_Poly.bin Cfish_x64_121217_N_popcnt_720gcc - with HERT500

============ UPD: works only on 1 core. When i set 2 cores or more - not working.

Denzwell commented 6 years ago

can you try it with fritz 15 Gui please ?

Denzwell commented 6 years ago

With Shredder Gui without book, engine works fine. And when you set book it does not work

Denzwell commented 6 years ago

i allways use Cfish on playchess, this version with polyglot book does not work. i am sure

ChessMan3 commented 6 years ago

Not working in Fritz 15 GUI with book. Without book - works fine.

====== UPD: works in Fritz only on 1 core. When i set 2 cores or more - not working.

MichaelB7 commented 6 years ago

You need to get it to work at command line terminal first - can you try another exe and test at command line as you did before ?

ChessMan3 commented 6 years ago

Works fine in Aquarium.

========== UPD: works only on 1 core. When i set 2 cores or more - not working.

CoffeeOne commented 6 years ago

yes, easy to reproduce for me, too: C:\Program Files\cfish>cfish-2017-12-12.exe Cfish 121217 64 POPCNT NUMA by Syzygy based on Stockfish setoption name BookFile value C:\Users\Peter\Documents\Cerebellum_light_polyglot\Cerebellum_Light_Poly.bin info string Book loaded: C:\Users\Peter\Documents\Cerebellum_light_polyglot\Cerebellum_Light_Poly.bin go movetime 1000 info string Transposition table allocated using large pages. bestmove e2e4 setoption name Threads value 8 go movetime 1000 => no answer, also not after 5 minutes

CoffeeOne commented 6 years ago

Maybe I should add, after go movetime 1000, the engine hangs, I cannot even terminate with the uci command quit.

syzygy1 commented 6 years ago

OK, I have the same problem when I compile for Windows and run it with Wine. I will investigate.

syzygy1 commented 6 years ago

Should be fixed now.

CoffeeOne commented 6 years ago

Works now for me. Thank you very much.

ChessMan3 commented 6 years ago

For me too - works fine. (Fritz 15 GUI & Cute Chess)

Thank you!

syzygy1 commented 6 years ago

Is the Ownbook option important?

CoffeeOne commented 6 years ago

It is conveniant when you want to quickly switch the Cerebellum book on and off, but for me that is not a common use case, so I am neutral about it :)

ChessMan3 commented 6 years ago

For me, this is also not critical.

MichaelB7 commented 6 years ago

Not for me - I never touch it. But maybe I should be using it more. I’m a little bit Neanderthal and turn the book off and on by making the path incorrect and correct. Did not realize that was what the option for - I thought it was for something else. Not that I know , I would keep it.

MichaelB7 commented 6 years ago

Now that I know...

Denzwell commented 6 years ago

OK it works now. Thanks you very much syzygy. I Will try it this night on playchess

syzygy1 commented 6 years ago

You're welcome. Let me know if something seems wrong.

I'll probably add Ownbook one of these days.