Page 5 of 17

Re: A complete 2000 lines of code engine

Posted: Tue Oct 30, 2018 4:24 am
by MikeB
MikeB wrote:
Tue Oct 30, 2018 4:00 am
xr_a_y wrote:
Sat Oct 20, 2018 9:30 am
Being a little tired of finding bugs in Weini, I started a week-end project last sunday. The idea was the following : "starting from a blank page, how far can I go in 2 days now I know a little more on chess programming".

An expected side effect was to get a simple engine to experiment with and maybe find some Weini's bug in it.

It is a mailbox negamax (pvs) engine, with classic pruning trick, a double bucket TT and only PST eval.

After 2 days the engine was working in xboard, validated in perft, finds mate in 8 from a collection I often use and was able to always win against me at fast TC (but loses against fairy-max).

Since then I corrected some stuff but the engine is still quite bad, but working :D

Here's the source code : https://github.com/tryingsomestuff/Mini ... r/minic.cc

Some of you probably can easily spot very bad things that makes it so weak.

Maybe, as a 2000 lines c++ code, it may also become an entry point for beginners. I can open the repository for write if some of you want to contribute.
Very nice- here's a macOS version based on the latest source
https://www.dropbox.com/s/envzgbn1uo2be ... S.zip?dl=1

under xboard - edit the xboard config file to something like this:
"/Users/xxxx/cluster.mfb/minic -xboard" -fd "/Users/xxxx/cluster.mfb"
seems to dominate fairy max now ...


Re: A complete 2000 lines of code engine

Posted: Tue Oct 30, 2018 8:24 am
by xr_a_y
Yes the 0.9 version includes a very small opening book that may help and singular extension for tt move.

Re: A complete 2000 lines of code engine

Posted: Sat Nov 03, 2018 11:15 am
by xr_a_y
Minic 0.12 is released, partialy using HQ bitboard implementation, mainly taken from "Dumb/Amoeba" (thanks to Richard Delorme). The speed up is already incredible and the strength follows :D ...

For this release I am cheating a little as sloc=2127. I'll clean up the code soon.

Code: Select all

Rank Name                          Elo     +/-   Games   Score   Draws
   1 minic0.12                     256      73      67   81.3%   34.3%
   2 minic0.9                      -86      63      66   37.9%   45.5%
   3 fairymax                     -142      71      67   30.6%   34.3%
I am also going to finish using bitboard in move generation soon and then backport that to Weini.
Maybe i'll add some eval features in Minic next week.

Re: A complete 2000 lines of code engine

Posted: Sat Nov 03, 2018 8:00 pm
by xr_a_y
xr_a_y wrote:
Sat Nov 03, 2018 11:15 am
I am also going to finish using bitboard in move generation soon and then backport that to Weini.
Or maybe the other way around ... :shock:

Re: A complete 2000 lines of code engine

Posted: Fri Nov 09, 2018 6:44 am
by xr_a_y
So 1on1 Minic0.14 (still PST only) is now +100 versus Weini0.0.24 :roll: .

Re: A complete 2000 lines of code engine

Posted: Fri Nov 09, 2018 5:43 pm
by Ronald
Nice! :D

Re: A complete 2000 lines of code engine

Posted: Tue Nov 27, 2018 6:33 am
by xr_a_y
Still PST only (on a single thread here) but in the meantime Minic goes SMP. :D

Re: A complete 2000 lines of code engine

Posted: Wed Dec 19, 2018 8:43 pm
by xr_a_y
Two first Minic wins against Fruit2.1, even one with black pieces 8-)

The rest of the 10 short TC games gives 7 wins for Fruit, 2 for Minic and 1 draw ... glad with that ...




Re: A complete 2000 lines of code engine

Posted: Thu Dec 20, 2018 4:11 am
by CMCanavessi
Amazing progress, and still PST only?

Re: A complete 2000 lines of code engine

Posted: Thu Dec 20, 2018 6:01 am
by xr_a_y
CMCanavessi wrote:
Thu Dec 20, 2018 4:11 am
Amazing progress, and still PST only?
There is a little passer evaluation term (but only a passer bonus depending on rank (nothing else specific to pawn yet, as protected, unstoppable, double, isolated, ...)