A complete 2000 lines of code engine

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

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
MikeB
Posts: 2669
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: A complete 2000 lines of code engine

Post by MikeB » Tue Oct 30, 2018 4:24 am

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 ...


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

Re: A complete 2000 lines of code engine

Post by xr_a_y » Tue Oct 30, 2018 8:24 am

Yes the 0.9 version includes a very small opening book that may help and singular extension for tt move.

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

Re: A complete 2000 lines of code engine

Post by xr_a_y » Sat Nov 03, 2018 11:15 am

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.

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

Re: A complete 2000 lines of code engine

Post by xr_a_y » Sat Nov 03, 2018 8:00 pm

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:
Attachments
ouch.PNG
ouch.PNG (8.64 KiB) Viewed 262 times

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

Re: A complete 2000 lines of code engine

Post by xr_a_y » Fri Nov 09, 2018 6:44 am

So 1on1 Minic0.14 (still PST only) is now +100 versus Weini0.0.24 :roll: .
Attachments
Capture du 2018-11-09 07-41-38.png
Capture du 2018-11-09 07-41-38.png (22.48 KiB) Viewed 144 times

Ronald
Posts: 41
Joined: Tue Jan 23, 2018 9:18 am
Location: Rotterdam
Full name: Ronald Friederich
Contact:

Re: A complete 2000 lines of code engine

Post by Ronald » Fri Nov 09, 2018 5:43 pm

Nice! :D

Post Reply