MCEC anyone?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: MCEC anyone?

Post by mvanthoor »

amanjpro wrote: Wed Jun 16, 2021 11:19 pm If you have ever done dynamic programming, then it should be fairly easy to implement. But to make sure you have no bugs, it might be hard. The concept is super simple, but it is super easy to make mistakes (brains fart)
As I said :)
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MCEC anyone?

Post by amanjpro »

End of ZaTour Season 1:

http://talkchess.com/forum3/viewtopic.p ... 97#p896097

And here is my reflections: https://zahak.amanj.me/posts/zatour-season-one-wrapup/

TL;DR; Loki in the first place
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: MCEC anyone?

Post by hgm »

mvanthoor wrote: Thu Jun 17, 2021 12:28 am And make sure you look into "mate score handling" for the TT, or you'll find that your engine suddenly forgets how to mate with KQ vs. K. It'll SEE the mate, report it, and then NOT execute it. Fun 8-)
Note that micro-Max doesn't have to use a special treatment of mate scores in the hash table. so that this is also not in the code I posted above. The reason is that micro-Max' search itself already works with correct mate scores, through the delayed-loss bonus. The latter ameliorates negative search scores for the side to move (including mated-in-N scores, which are very negative) by one score quantum. This provides an incentive to take the shortest path to a given gain.

The implementation of this is a bit tricky, because when you tamper with the score returned by the search, you have to make the inverse adjustments to the search window before calling that search. This to make sure that a score that is in window after the tampering was indeed an exact score, and not some bound that from then on will be mistaken for an exact score. The code in micro-Max that handles this is:

Code: Select all

// when entering Search():
alpha -= (alpha < currentEval);
beta -= (beta <= currentEval);

// when leaving Search():
return bestScore + (bestScore < currentEval);
This automatically adjusts a mate score, which originates in a node where the King gets captured as bestScore = +INFINITE, in the process of propagating it towards the root. So that more distant mates automatically get a lower score: mate-in-N would be INFINITE-N. These bestScores can be stored and read directly in the TT.

Note that if you want this mechanism to apply only on mate scores, and not on other gains and losses, one merely has to change the limit below which this adjustment is made from curEval to -INFINITE+LONGEST_MATE.
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: MCEC anyone?

Post by mvanthoor »

amanjpro wrote: Thu Jun 17, 2021 6:04 am ...
Are you still running the binary I last sent you?

That one is 2.2.100, which is a dev-version, a bit stronger than Alpha 2; somewhere between 1860 and 1890 in my testing. Thomas also sent you a development version of MMC, which is also stronger than the current CCRL listing.

It doesn't really matter in the end. I'm already glad that the engine can finish tournaments without problems. Playing strength will come with time. I hope to wrap up the Alpha 3 release tomorrow evening. (Which basically is a renamed 2.2.100.)
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MCEC anyone?

Post by amanjpro »

mvanthoor wrote: Thu Jun 17, 2021 3:53 pm
amanjpro wrote: Thu Jun 17, 2021 6:04 am ...
Are you still running the binary I last sent you?

That one is 2.2.100, which is a dev-version, a bit stronger than Alpha 2; somewhere between 1860 and 1890 in my testing. Thomas also sent you a development version of MMC, which is also stronger than the current CCRL listing.

It doesn't really matter in the end. I'm already glad that the engine can finish tournaments without problems. Playing strength will come with time. I hope to wrap up the Alpha 3 release tomorrow evening. (Which basically is a renamed 2.2.100.)
Yes I use the latest submitted binaries. I just didn't bother renaming them in the cute chess config. Will do so in season 2 to avoid confusion.

In the info page I used the last known ccrl rating just to give a clue. Current Zahak is 2500 or higher, same for Loki 3.5, Lozza 3 is more original thank Lozza 2 (own eval), but weaker than the listed CCRL rating (which is for version 2). Nalawld is 80 elo points stronger than the latest tested version in CCRL listing.

But keeping up with those estimated ratings is not easy, so I decided to consult CCRL's latest ratings
op12no2
Posts: 489
Joined: Tue Feb 04, 2014 12:25 pm
Full name: Colin Jenkins

Re: MCEC anyone?

Post by op12no2 »

amanjpro wrote: Thu Jun 17, 2021 4:28 pm [Lozza 3 is more original thank Lozza 2 (own eval), but weaker than the listed CCRL rating (which is for version 2)
I would estimate Lozza 3 to be at least 200 ELO weaker than Lozza 2 at the sort of time controls you are using.
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MCEC anyone?

Post by amanjpro »

I am leaning towards splitting the competition into two leagues, promotion league and super league:

As for now the promotion league will include Rustic, MinimalChess, FairyMax and KingSlayer. And super league will include the rest.

I'm not exactly sure if this is a good idea or not. I mean, it is nice for Rustic author to see how his engine does against Nalwald for example. But on the other hand almost all of the games between stronger and weaker engines are decided before the game even starts. Which usually makes them boring games, that lack any surprise factor.

Any thoughts?
User avatar
lithander
Posts: 880
Joined: Sun Dec 27, 2020 2:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: MCEC anyone?

Post by lithander »

When would you start the promotion league? Maybe we wait for a new version of Rustic (with improved eval) and MMC (with TT) before you start it! So we actually have a chance to earn the promotion :)
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: MCEC anyone?

Post by mvanthoor »

After one small change in the implementation (probably tomorrow), I could provide the current development version of Rustic, which has a tapered evaluation, but it uses MinimalChess' PST's. Performance rating in several tests against different engines seems to be ~2160, at least at a 10s+0.1s time control. I'm not going to rush a new version, but I'm willing to send in the current dev-version. I'll not be releasing a new version before I've tuned my own tables; the MMC ones are just to bootstrap the engine (see what's approximately possible), just like MMC used the PeSTO tables. (And I want to test at least Aspiration Windows again.)
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
amanjpro
Posts: 883
Joined: Sat Mar 13, 2021 1:47 am
Full name: Amanj Sherwany

Re: MCEC anyone?

Post by amanjpro »

The current bonus blitz tournament is still midway, and I will be off for vacation this long weekend. So probably it won't start until next Monday.

I might include an older version of Zahak just to bump the number of engines, but that version won't be able to be promoted. Unless you guys won't like it. As I only do that to add more games to the promotion league