New engine: Clover

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

Moderators: hgm, Rebel, chrisw

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

New engine: Clover

Post by lucametehau »

Hi everyone!

I'm Luca and I have recently developed a chess engine in C++. I started 2 years ago, when I learned Python and found out about python-chess library. I managed to make an engine, but it was too too slow. So, I decided to start from scratch an engine in C++, which proved to be fun, and I countinued to this day. Of course, this is not my first version, but is one I'm ok with. (Other versions have major bugs...)

Github link: https://github.com/lucametehau/CloverEngine.
From testing, I could say that Clover is 2800+ (maybe 2900+, not too sure).

I would love to hear your thoughts. Feel free to criticize me as well! :D

This is a repost of this topic http://talkchess.com/forum3/viewtopic.php?f=7&t=77154, because i posted in the wrong forum oops. :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,

My first impression was: what an excellent name!

Have fun with your project. May I ask you where you are from?
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,

Thank you very much! I'm from Bucharest, Romania (I also updated my location). :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 »

Let me point out that the sources in https://github.com/lucametehau/CloverEn ... er.2.1.zip and https://github.com/lucametehau/CloverEn ... s/v2.1.zip are not the same, not even of the same date. Which is correct?
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 »

Thanks for pointing this out! The first one is the good source code. The second one is an older version. I think I posted the release a bit early, before cleaning up and uploading the right code :shock:
User avatar
Sylwy
Posts: 4465
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 »

I'll do a test with a 2846 Elo points chess engine (Zappa Mexico II x64).

Image

Thank you for the new engine !
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 »

I get these error messages during compilation:
In file included from board.h:5,
from init.h:3,
from main.cpp:5:
defs.h:10:1: error: 'mt19937_64' does not name a type
10 | mt19937_64 gen(0xBEEF);
| ^~~~~~~~~~
defs.h: In function 'void init_defs()':
defs.h:256:27: error: 'gen' was not declared in this scope
256 | hashKey[j] = rng(gen);
| ^~~
defs.h:261:29: error: 'gen' was not declared in this scope
261 | castleKey[j] = rng(gen);
| ^~~
defs.h:271:23: error: 'gen' was not declared in this scope
271 | enPasKey = rng(gen);
| ^~~


Any suggestions?
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 »

Sylwy: Thanks! Looking forward to the results! :D

Gabor: I don't get these errors on my machine, though I think adding

Code: Select all

#include <random>
in defs.h should do it.
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: Fri Apr 23, 2021 5:08 pm Gabor: I don't get these errors on my machine, though I think adding

Code: Select all

#include <random>
in defs.h should do it.
It did not help, now I have:
e:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\cicus\AppData\Local\Temp\Clover_2.1-x64-SzG.exe.R9SQMx.ltrans0.ltrans.o:<artificial>:(.text+0xc20d): undefined reference to `tb_probe_wdl_impl'
e:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\cicus\AppData\Local\Temp\Clover_2.1-x64-SzG.exe.R9SQMx.ltrans0.ltrans.o:<artificial>:(.rdata$.refptr.TB_LARGEST[.refptr.TB_LARGEST]+0x0): undefined reference to `TB_LARGEST'
e:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\cicus\AppData\Local\Temp\Clover_2.1-x64-SzG.exe.R9SQMx.ltrans1.ltrans.o:<artificial>:(.text+0x8b6d): undefined reference to `tb_init_impl'
collect2.exe: error: ld returned 1 exit status
BTW, this is my command line:
g++ *.cpp -O3 -flto -march=native -oClover_2.1-x64-SzG.exe
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 »

I think you should add *.c to your command line, because I have tprobe.c and tbcore.c.