Minic version 2

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

Moderators: Harvey Williamson, bob, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
User avatar
xr_a_y
Posts: 1320
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Minic version 2

Post by xr_a_y » Tue Mar 31, 2020 2:45 pm

xr_a_y wrote:
Thu Mar 26, 2020 3:39 pm
Minic is now too far from one of its original ambition, being a small code size.
With around 5000 lines today, it is maybe time to make Minic less ugly and go for a better multi files repository.

This shall take some time, but I think i'm gonna go this way, splitting Minic in some files and comment the code more.

See you on the other side.
So here we are ! Minic version 2 is available :D . The single file minic.cc has been split into many source files, thus increasing maintainability.
This version is functionally the same as 1.55 (including multiPV development).

I hope this work will allow Minic so get strength soon !

It is also, of course, time to say good bye to the good old "A complete 2000 lines of code engine" thread.

Jamal Bubker
Posts: 313
Joined: Mon May 24, 2010 2:32 pm

Re: Minic version 2

Post by Jamal Bubker » Tue Mar 31, 2020 3:15 pm

Merci beaucoup Vivien pour le travail effectué sur ton module et pour la mise à disposition de cette nouvelle version ! 8-) 8-)

User avatar
mvanthoor
Posts: 458
Joined: Wed Jul 03, 2019 2:42 pm
Full name: Marcel Vanthoor

Re: Minic version 2

Post by mvanthoor » Tue Mar 31, 2020 8:22 pm

Congrats :)

Maybe a suggestion which is used in Rust (and in the Stash engine as well). It can be beneficial to put your header files in an "include" folder, and your source files in an "src" folder; even dividing the src folder into multiple subfolders, where you gather modules that belong together. Splitting up the engine in multiple files was a good thing to do, but now you have an incredibly long unbroken list of files :P (https://www.youtube.com/watch?v=He02Z5YdZbg)

ThatsIt
Posts: 971
Joined: Thu Mar 09, 2006 1:11 pm
Contact:

Re: Minic version 2

Post by ThatsIt » Wed Apr 01, 2020 8:49 am

Thx for the new version.
Is it worth to test it compared to version 1.54 ?

Best wishes,
G.S.
(CEGT team)

User avatar
xr_a_y
Posts: 1320
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: Minic version 2

Post by xr_a_y » Wed Apr 01, 2020 9:17 am

ThatsIt wrote:
Wed Apr 01, 2020 8:49 am
Thx for the new version.
Is it worth to test it compared to version 1.54 ?

Best wishes,
G.S.
(CEGT team)
No, should be the same. Thanks

Gabor Szots
Posts: 623
Joined: Sat Jul 21, 2018 5:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: Minic version 2

Post by Gabor Szots » Wed Apr 01, 2020 9:47 am

Hi Vivien,

I tried to compiled it using MINGW64, just for fun and learning reasons. However:

1. This was my command line: g++ *.cpp -O3 -march=native -o Minic_2.00-x64-SzG.exe. Now I got a fatal error saying tbprobe.h was not found.
2. OK, I downloaded the Fathom library from Jon Dart and put all the files in the same directory where all cpp files were. Now the error message was
In file included from egt.cpp:11:
tbprobe.h:27:10: fatal error: tbconfig.h: No such file or directory
#include <tbconfig.h>
3. Finally, I included -DWITH_SYZYGY in the g++ command line but now I got a lot of errors such as
In file included from attack.hpp:3,
from attack.cpp:1:
definition.hpp:47: warning: "WITH_SYZYGY" redefined
Could you please enlighten me, what am I doing wrong? Where should I put the Fathom files?


BTW, the compiles you provided seem not to be able to use syzygy, at least I can see no such option.
Gabor Szots
CCRL testing group

User avatar
xr_a_y
Posts: 1320
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: Minic version 2

Post by xr_a_y » Wed Apr 01, 2020 11:31 am

If you put Fathom directory inside Minic then from Minic root directory

Code: Select all

g++ -IFathom/src -ISource Source/*.cpp -lpthread    (and whatever other options you want)
Shall be good. WITH_SYZYGY is now default.

You have some sample build scripts in Tools directory.

Your current issue is just having forgotten to give the path to your fathom include directory (and having define WITH_SYZYGY twice, as I already do it by default inside de code).

Gabor Szots
Posts: 623
Joined: Sat Jul 21, 2018 5:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: Minic version 2

Post by Gabor Szots » Wed Apr 01, 2020 12:41 pm

Still no success. Using your command line I get:
C:\Users\cicus\AppData\Local\Temp\ccyniKJA.o:egt.cpp:(.text+0x4d9): undefined reference to `tb_probe_wdl_impl'
C:\Users\cicus\AppData\Local\Temp\ccyniKJA.o:egt.cpp:(.text+0x6a7): undefined reference to `tb_init'
C:\Users\cicus\AppData\Local\Temp\ccyniKJA.o:egt.cpp:(.text+0x925): undefined reference to `tb_probe_root_impl'
C:\Users\cicus\AppData\Local\Temp\ccyniKJA.o:egt.cpp:(.rdata$.refptr.TB_LARGEST[.refptr.TB_LARGEST]+0x0): undefined reference to `TB_LARGEST'
collect2.exe: error: ld returned 1 exit status
And this is my Fathom library:
Directory of e:\Sakk\compiles\Minic\Fathom\src

2020.04.01. 14:38 <DIR> .
2020.04.01. 14:38 <DIR> ..
2020.04.01. 14:07 <DIR> apps
2020.04.01. 14:38 0 ki
2019.08.11. 20:33 8˙835 stdendian.h
2019.08.11. 20:33 31˙250 tbchess.c
2019.08.11. 20:33 5˙648 tbconfig.h
2019.08.11. 20:33 70˙320 tbprobe.c
2019.08.11. 20:33 12˙814 tbprobe.h
6 File(s) 128˙867 bytes
3 Dir(s) 795˙524˙161˙536 bytes free
While the apps library looks like:
Directory of e:\Sakk\compiles\Minic\Fathom\src\apps

2020.04.01. 14:39 <DIR> .
2020.04.01. 14:39 <DIR> ..
2019.08.11. 20:33 21˙767 fathom.c
2020.04.01. 14:39 0 ki
2019.08.11. 20:33 787 Makefile
3 File(s) 22˙554 bytes
2 Dir(s) 795˙524˙161˙536 bytes free

And there is no syzygypath option displayed in Arene or cutechess GUI (using your BMI2 compile).
Running from the command prompt I get this:
# This is Minic version 2.00
# Warn 2020-04-01 14:48:55-553: ARG key not given, quiet
# Warn 2020-04-01 14:48:55-558: ARG key not given, debugMode
# Warn 2020-04-01 14:48:55-558: ARG key not given, debugFile
# Warn 2020-04-01 14:48:55-558: ARG key not given, book
# Warn 2020-04-01 14:48:55-558: ARG key not given, bookFile
# Warn 2020-04-01 14:48:55-558: ARG key not given, ttSizeMb
# Warn 2020-04-01 14:48:55-558: ARG key not given, threads
# Warn 2020-04-01 14:48:55-558: ARG key not given, mateFinder
# Warn 2020-04-01 14:48:55-558: ARG key not given, fullXboardOutput
# Warn 2020-04-01 14:48:55-558: ARG key not given, level
# Warn 2020-04-01 14:48:55-558: ARG key not given, syzygyPath
id name Minic 2.00
id author Vivien Clauzon
option name Level type spin default 100 min 0 max 100
option name Hash type spin default 128 min 1 max 256000
option name Threads type spin default 1 min 1 max 256
option name UCI_Chess960 type check default false
option name Ponder type check default false
option name MultiPV type spin default 1 min 1 max 4
uciok
Gabor Szots
CCRL testing group

User avatar
xr_a_y
Posts: 1320
Joined: Sat Nov 25, 2017 1:28 pm
Location: France

Re: Minic version 2

Post by xr_a_y » Wed Apr 01, 2020 1:48 pm

That's 2 different things here.

1°) To use a syzygyPath with pre-build Minic, just use the command line (this is not a GUI option yet)

Code: Select all

minic -uci -syzygyPath /your/path/to/syzygy/
2°)To compile Minic by yourself (I don't recommend this for testing, only if you want to develop in it), you will need to built Fathom lib also and link against it.
You have undefined reference because you don't link on Fathon here.
Your first issue was not having Fathom include directory, now you are missing Fathom lib itself.

Using mingw64 (under Windows OS I suppose using cywin ?), the Tools/build.sh script shall be very near to work.

Gabor Szots
Posts: 623
Joined: Sat Jul 21, 2018 5:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: Minic version 2

Post by Gabor Szots » Wed Apr 01, 2020 2:21 pm

xr_a_y wrote:
Wed Apr 01, 2020 1:48 pm
That's 2 different things here.

1°) To use a syzygyPath with pre-build Minic, just use the command line (this is not a GUI option yet)

Code: Select all

minic -uci -syzygyPath /your/path/to/syzygy/
2°)To compile Minic by yourself (I don't recommend this for testing, only if you want to develop in it), you will need to built Fathom lib also and link against it.
You have undefined reference because you don't link on Fathon here.
Your first issue was not having Fathom include directory, now you are missing Fathom lib itself.

Using mingw64 (under Windows OS I suppose using cywin ?), the Tools/build.sh script shall be very near to work.
Thanks Vivien. Will do as suggested.
Gabor Szots
CCRL testing group

Post Reply