A complete 2000 lines of code engine

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
tpoppins
Posts: 919
Joined: Tue Nov 24, 2015 8:11 pm
Location: upstate

Re: A complete 2000 lines of code engine

Post by tpoppins » Sun Oct 21, 2018 11:51 pm

v0.4 exacts revenge on the greedy Monochrome with an extended king hunt:



You keep referring to FairyMax but we don't have it on our lists. Wikipedia sez it's derived from Micro-Max and goes on state that it's about 1200-Elo strong. Hmm, Micro-Max is 1950 on our blitz list; something doesn't jibe here.
Tirsa Poppins
CCRL

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

Re: A complete 2000 lines of code engine

Post by xr_a_y » Mon Oct 22, 2018 4:52 am

Fairy-max is bundled with winboard and also available on any linux distri. It is around 1950elo and is indeed derived from micromax.
http://home.hccnet.nl/h.g.muller/CVfairy.html

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

Re: A complete 2000 lines of code engine

Post by xr_a_y » Mon Oct 22, 2018 5:52 am

tpoppins wrote:
Sun Oct 21, 2018 11:25 pm
But it's 2200+ lines now, you cheat. ;)
2219 lines (1998 sloc) 69.2 KB 8-)

Sven
Posts: 3822
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Contact:

Re: A complete 2000 lines of code engine

Post by Sven » Mon Oct 22, 2018 9:58 pm

xr_a_y wrote:
Sun Oct 21, 2018 8:02 pm
Version 0.4 is available and is less stupid than the previous ones ... :lol:
Which changes were the most successful ones?
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)

User avatar
xr_a_y
Posts: 732
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 23, 2018 4:57 am

Sven wrote:
Mon Oct 22, 2018 9:58 pm
xr_a_y wrote:
Sun Oct 21, 2018 8:02 pm
Version 0.4 is available and is less stupid than the previous ones ... :lol:
Which changes were the most successful ones?
Well, I am not in a good testing process but I think it was using rofchade PST, IID and disabling LMP (because SEE is not used yet in move sorting).

I think there are still some very bad bugs in there because the engine seems to be around 1850elo.

Still a good sandbox to identify such bugs I think.

User avatar
Ronald
Posts: 89
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 » Tue Oct 23, 2018 8:17 pm

Nice that the rofchade PST is doing good.

Some suggestions, possible bugs:
I think currently an "B_alpha" never gets stored in the hash table:

Code: Select all

 if ( bestMove != INVALIDMOVE && !stopFlag){
     TT::setEntry({bestMove,alpha,alphaUpdated?TT::B_exact:TT::B_alpha,depth,computeHash(p)});
bestMove will only get a value if the score of a move beats alpha, so when all moves score below alpha the hashentry will never get stored.

You could change the moveloop of pvs, by first trying the hash move (if you have one) before generating and sorting the moves. Most of the time this will already lead to a cutoff and saves you the whole move generation and sorting.
Implementing SEE will probably also help a lot to divide good/bad captures. In addition in quiescence you could only search captures with a non negative SEE (except when in check), and after a certain depth (fi -5) only search recaptures

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

Re: A complete 2000 lines of code engine

Post by xr_a_y » Wed Oct 24, 2018 5:06 am

Thanks ! I fixed B_alpha case storing inside TT and try the TT move first now.
Not using bitboards, what kind of short SEE implementation are you recommanding ?

User avatar
Ronald
Posts: 89
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 » Wed Oct 24, 2018 11:38 am

I don't know, because I only have experience with bitboards..

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

Re: A complete 2000 lines of code engine

Post by xr_a_y » Fri Oct 26, 2018 12:02 pm

Minic 0.6 is out and performs ok :D :

Code: Select all

Rank Name                          Elo     +/-   Games   Score   Draws  
   1 fairymax                      104      18    1178   64.5%   21.8%  
   2 Minic 0.5                     -41      16    1178   44.2%   33.0%  
   3 tscp181                       -61      18    1178   41.3%   23.3%  

User avatar
CMCanavessi
Posts: 835
Joined: Thu Dec 28, 2017 3:06 pm
Location: Argentina

Re: A complete 2000 lines of code engine

Post by CMCanavessi » Fri Oct 26, 2018 1:03 pm

Do you plan to upload binaries in the future, like with Weini, or do we need to compile it ourselves?
Follow my tournament and some Leela gauntlets live at http://twitch.tv/ccls

Post Reply