New engine: Clover

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

Moderators: hgm, Rebel, chrisw

Damir
Posts: 2801
Joined: Mon Feb 11, 2008 3:53 pm
Location: Denmark
Full name: Damir Desevac

Re: New engine: Clover

Post by Damir »

Luca,

Thank you a lot for such a nice engine. I hope you continue in improving it. :)
lucametehau
Posts: 100
Joined: Thu Apr 22, 2021 3:56 pm
Location: Bucharest, Romania
Full name: Metehau Luca

Re: New engine: Clover

Post by lucametehau »

After a long break, Clover 3.0 is here: https://github.com/lucametehau/CloverEn ... s/tag/v3.0. It is around 70 elo better in self-play, 40-50 against other engines. This version uses NNUE for evaluating positions. More details about the network on the release page.

As usual, tell me if you have any problems! :D
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: New engine: Clover

Post by Gabor Szots »

Hi Luca,

Using this command line:
c++ *.cpp tbprobe.c -DEVALFILE=\"$(Clover_323mil_e33_256.nn)\" -std=c++17 -flto -pthread -O3 -march=native -oClover_3.0-x64-SzG.exe
I get the following error message:
In file included from net.h:2,
from board.h:6,
from init.h:3,
from main.cpp:2:
net.h:11:13: error: expected ')' before 'EVALFILE'
11 | INCBIN(Net, EVALFILE);
| ^~~~~~~~
incbin.h:352:31: note: in definition of macro 'INCBIN'
352 | INCBIN_MACRO "\"" FILENAME "\"\n" \
| ^~~~~~~~
What am I doing wrong? With the makefile I also get error messages (see below) but at least it does compile.
In file included from tbprobe.c:137:
tbcore.c: In function 'void unmap_file(char*, uint64)':
tbcore.c:226:52: warning: format '%d' expects argument of type 'int', but argument 3 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
226 | fprintf(stderr, "unmap failed, error code %d", GetLastError());
| ~^ ~~~~~~~~~~~~~~
| | |
| int DWORD {aka long unsigned int}
| %ld
tbcore.c:230:58: warning: format '%d' expects argument of type 'int', but argument 3 has type 'DWORD' {aka 'long unsigned int'} [-Wformat=]
230 | fprintf(stderr, "CloseHandle failed, error code %d", GetLastError());
| ~^ ~~~~~~~~~~~~~~
| | |
| int DWORD {aka long unsigned int}
| %ld
Gabor Szots
CCRL testing group
lucametehau
Posts: 100
Joined: Thu Apr 22, 2021 3:56 pm
Location: Bucharest, Romania
Full name: Metehau Luca

Re: New engine: Clover

Post by lucametehau »

Hi Gabor.
Clover can't be compiled from command line, because of this bit
-DEVALFILE=\"Clover_323mil_e33_256.nn\"
which only works if compiled from makefile.

As for compiling using makefile, those "errors" are warnings which are generated by the Fathom code. I'll try resolving them, but in the mean time you can ignore them.
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: New engine: Clover

Post by Gabor Szots »

lucametehau wrote: Mon Jan 24, 2022 11:24 am Hi Gabor.
Clover can't be compiled from command line, because of this bit
-DEVALFILE=\"Clover_323mil_e33_256.nn\"
which only works if compiled from makefile.

As for compiling using makefile, those "errors" are warnings which are generated by the Fathom code. I'll try resolving them, but in the mean time you can ignore them.
I'm surprised about the first part.

As for the makefile, it only generates one exe. I expected 5.
Gabor Szots
CCRL testing group
lucametehau
Posts: 100
Joined: Thu Apr 22, 2021 3:56 pm
Location: Bucharest, Romania
Full name: Metehau Luca

Re: New engine: Clover

Post by lucametehau »

Well I tested Bit-Genie as well to see if it can be compiled by command line and it seems to have the same problem.

For compiling with makefile, if you want 5 exes to be created, use
make run
User avatar
Sylwy
Posts: 4466
Joined: Fri Apr 21, 2006 4:19 pm
Location: IASI - the historical capital of MOLDOVA
Full name: SilvianR

Re: New engine: Clover

Post by Sylwy »

lucametehau wrote: Sun Jan 23, 2022 11:42 pm After a long break, Clover 3.0 is here: https://github.com/lucametehau/CloverEn ... s/tag/v3.0. It is around 70 elo better in self-play, 40-50 against other engines. This version uses NNUE for evaluating positions. More details about the network on the release page.

As usual, tell me if you have any problems! :D
Bravo, Luca ! I was sure you could do it!
A single bewilderment regarding the compilations you provided. The bmi2 version is slower than the avx2 version on my Haswell CPU. It is the only case among many engines!

Image

Image
lucametehau
Posts: 100
Joined: Thu Apr 22, 2021 3:56 pm
Location: Bucharest, Romania
Full name: Metehau Luca

Re: New engine: Clover

Post by lucametehau »

Thanks Sylwy.

As for why the bmi2 is slower than the avx2, I have no idea. If you used the compiles from the release page, one cause might be that I bought a new laptop, with a new CPU (AMD Ryzen 7 5800H).
User avatar
Sylwy
Posts: 4466
Joined: Fri Apr 21, 2006 4:19 pm
Location: IASI - the historical capital of MOLDOVA
Full name: SilvianR

Re: New engine: Clover

Post by Sylwy »

lucametehau wrote: Mon Jan 24, 2022 12:00 pm Thanks Sylwy.

As for why the bmi2 is slower than the avx2, I have no idea. If you used the compiles from the release page, one cause might be that I bought a new laptop, with a new CPU (AMD Ryzen 7 5800H).
Clear. Then the native one is faster.

Image
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: New engine: Clover

Post by Gabor Szots »

lucametehau wrote: Mon Jan 24, 2022 11:43 am For compiling with makefile, if you want 5 exes to be created, use
make run
Thanks. Odd that my native is slower than my BMI2.
Gabor Szots
CCRL testing group