I have modified current SF+sygyzy in a way that I have called "Natural TB".
The idea is to use TB but avoiding the unnatural TB scores and in particular the DTZ ones (hiding mates, unnatural sacrifices, etc) but retain the 'good play' of syzygy where 'good play' is defined as follow:
If in a given position SF with old syzygy leads to a win, then it should do also now with 'Natural TB'
For people interested in the technical details, let's add that I have implemented two changes to the current behavior:
1) At root, moves that do not preserve the win or the draw are skipped, but the DTZ score of the remaining moves is ignored.
2) At WDL probing time, deep in the tree, instead of returning an adjusted WDL score, only alpha, draw and beta is returned according if the position is loss, draw or win (cursed win and losses at the moment are ignored).
This is still experimental code, so maybe there is some issue moreover for the moment I have not run matches between the 2 versions, I am more interested to see if this version is more "natural" to play than the original but I expect the ELO should be equivalent between the 2 versions.
Sources are here:
https://github.com/mcostalba/Stockfish/ ... natural_tb
Natural TB
Moderators: hgm, Rebel, chrisw
-
- Posts: 2851
- Joined: Wed Mar 08, 2006 10:01 pm
- Location: Irvine, CA, USA
Re: Natural TB
Cursed wins are very rare, so I don't expect any ELO loss over this, but I would be more comfortable with knowing that the engine won't be led down the garden path to a cursed win (draw). Of course, if you are playing someone without DTZ tablebases you might actually improve your results.mcostalba wrote:2) At WDL probing time, deep in the tree, instead of returning an adjusted WDL score, only alpha, draw and beta is returned according if the position is loss, draw or win (cursed win and losses at the moment are ignored).
Deasil is the right way to go.
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: Natural TB
It won't.Dirt wrote: Cursed wins are very rare, so I don't expect any ELO loss over this, but I would be more comfortable with knowing that the engine won't be led down the garden path to a cursed win (draw).
Please ignore my previous comment, it was intended for a technical audience, from user point of view nothing changes.
-
- Posts: 550
- Joined: Thu Apr 24, 2008 9:31 am
- Location: Belgium
Re: Natural TB
Thanks Marco.. i will compile it and test it out
JP.
JP.
-
- Posts: 27817
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Natural TB
Wouldn't this make the engine always prefer to force a winning conversion over a mate in the current table?mcostalba wrote:2) At WDL probing time, deep in the tree, instead of returning an adjusted WDL score, only alpha, draw and beta is returned according if the position is loss, draw or win (cursed win and losses at the moment are ignored).
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: Natural TB
I don't think so, indeed returning alpha or beta drops the concept of order, for the same reason that when 2 moves fail high (or low) you can't really say which is best (or worst) of the 2.hgm wrote: Wouldn't this make the engine always prefer to force a winning conversion over a mate in the current table?
Actually the whole idea is to let TB to say if a move is good or bad but without any other information, in particular without comparing to other moves of the same kind: this is up to the engine to find.
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Natural TB
Sheesh, that is exactly what the old code already did EXCEPT that the dtz score was used to check against the 50-move rule. So I suppose you have now removed that. Well, good job once again.mcostalba wrote:For people interested in the technical details, let's add that I have implemented two changes to the current behavior:
1) At root, moves that do not preserve the win or the draw are skipped, but the DTZ score of the remaining moves is ignored.
To be clear: if the dtz score is still used to check against the 50-move rule, then this was not a change.
Did you EVER look at how the original played? I don't think you did.I am more interested to see if this version is more "natural" to play than the original but I expect the ELO should be equivalent between the 2 versions.
The only problem the original had was that it did not switch to using less thinking time once TBs had been entered.
-
- Posts: 5566
- Joined: Tue Feb 28, 2012 11:56 pm
Re: Natural TB
It will make the engine score a TB win as a mate, once beta gets there...hgm wrote:Wouldn't this make the engine always prefer to force a winning conversion over a mate in the current table?mcostalba wrote:2) At WDL probing time, deep in the tree, instead of returning an adjusted WDL score, only alpha, draw and beta is returned according if the position is loss, draw or win (cursed win and losses at the moment are ignored).
To add to my previous post: there is of course one more problem, namely that hitting a 6-piece TB prevents the engine from continuing to search that 6-piece position and possibly find and report an easy mate. This should not be impossible to fix without hurting engine strength, but seems to require complicated surgery on the search code.
-
- Posts: 27817
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Natural TB
That was what I meant. I suppose that by "once beta gets there" you mean in the process of enlarging the root aspiration window. As you keep failing high for any smaller beta.syzygy wrote:It will make the engine score a TB win as a mate, once beta gets there...
If you score conversion to a TB win as mate, it would score better than any real mate, as the real mate takes time, and will get a mate-in-N score. So in KQBNK it will shy away from a mate without conversion, and sac a piece to convert to a won successor.
-
- Posts: 546
- Joined: Sat Aug 17, 2013 12:36 am
Re: Natural TB
I was able to achieve desired results in SF Matefinder with this approach:
https://github.com/jhellis3/Stockfish/c ... 16f7ade6d7
A good test position:
8/2P1P3/3k4/8/8/4K3/P2p1p2/8 b - -
https://github.com/jhellis3/Stockfish/c ... 16f7ade6d7
A good test position:
8/2P1P3/3k4/8/8/4K3/P2p1p2/8 b - -