Natural TB

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

Moderators: hgm, Rebel, chrisw

syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Natural TB (take 2)

Post by syzygy »

Michel wrote:
To be fair, I think the question is for DTM50, which is ~natural play. These apparently do exist (because I've seen some discussion of TB results), but for some reason are not publicly available (and so no one uses them).
But what would the specs be for a DTM50 TB? For different values of the 50move counter at root you will have a different values of DTM50.

For game play this is _perhaps_ not relevant as one enters TB territory through a move which resets the 50move counter. On the other hand I have some difficulty understanding how (game theoretically correct) followup play would work as now 50move_counter < 100 but the TB would still assume 50move_counter=100 leading perhaps to incorrect moves being played.
Yes, for DTM-optimal play fully respecting the 50-move rule you need DTM50 tables with a separate value per (position, value of 50-move counter) pair. These have been generated by a few people, but I don't think much work has been done on compressing them effciently in a manner that allows for fast access.
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Natural TB (take 2)

Post by syzygy »

syzygy wrote:
mcostalba wrote:Just before to submit this post I found that most of this idea was already presented by Ronald de Man:

Code: Select all

Ideally, once the engine has determined that it can have at least a TB win, it should start searching beyond the TB probe without doing further TB probes, but in such a way that if that search beyond the TB probe does not return a MATE, the search at the TB position still returns the TB win value.
And my implementation was posted here.
I have updated the patch to current SF master:
The patch: https://github.com/syzygy1/Stockfish/co ... 53730caf9d
The branch: https://github.com/syzygy1/Stockfish/tree/early_mate

By design, current SF will never find a mate if the root position is not in the TBs and the path to mate enters the TBs.

This patch changes this behaviour. If it makes sense (as indicated by the values of alpha and beta), SF will continue to look for a mate after finding a TB win or loss within the search tree. If a mate score is found, it is returned. Otherwise, the TB win or loss score is returned.

The patch is small, easy to understand and not based on guesswork. In addition, it preserves the efficiency and effectiveness of current SF's TB probing code.
User avatar
Nordlandia
Posts: 2821
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: Natural TB (take 2)

Post by Nordlandia »

syzygy wrote:Yes, for DTM-optimal play fully respecting the 50-move rule you need DTM50 tables with a separate value per (position, value of 50-move counter) pair. These have been generated by a few people, but I don't think much work has been done on compressing them effciently in a manner that allows for fast access.
Many thanks for Stockfish patch.

Is DTM50 bigger in size than normal DTM (Nalimov/Gaviota) :?:
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Natural TB (take 2)

Post by hgm »

One EGT for every value of the ply counter. So 100 times larger?
j_romang
Posts: 79
Joined: Mon May 16, 2011 2:52 am

Re: Natural TB (take 2)

Post by j_romang »

Hello Ronald,
I tried your patch ; it really helps to find mates and I like the behavior. But unfortunately the patched version seems weaker. After 2000 matches (time control is fishtest STC, both versions use full 6 piece tablebases) I have :
Score of sf_early_mate vs sf_base: 409 - 487 - 1104 [0.480] 2000

ELO: -13.56 +- 99%: 20.04 95%: 15.23
LOS: 0.46%
Wins: 409 Losses: 487 Draws: 1104 Total: 2000
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: Natural TB (take 2)

Post by syzygy »

I did a 10,000 games test myself and there was no difference in strength.
j_romang
Posts: 79
Joined: Mon May 16, 2011 2:52 am

Re: Natural TB (take 2)

Post by j_romang »

Ok ; I'll try a longer test, I will post the results :)
j_romang
Posts: 79
Joined: Mon May 16, 2011 2:52 am

Re: Natural TB (take 2)

Post by j_romang »

It seems you are right : this is my result after 10000 games :

Score of sf_early_mate vs sf_base: 1917 - 1913 - 6170 [0.500] 10000

ELO: 0.14 +- 99%: 8.97 95%: 6.81
LOS: 52.58%
Wins: 1917 Losses: 1913 Draws: 6170 Total: 10000
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: Natural TB

Post by jshriver »

I feel lacking. What are cursed wins and blessed wins? Heard about these three times tonight in various threads.
Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: Natural TB

Post by Dirt »

A cursed win fails because, with best play, the 50 move rule aborts it. Similarly, a blessed loss would be lost except for the 50 move rule.
Deasil is the right way to go.