Delta pruning Mate error

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

tomitank
Posts: 276
Joined: Sat Mar 04, 2017 12:24 pm
Location: Hungary

Delta pruning Mate error

Post by tomitank »

Hi all!

I have problem with Delta Pruning.

From chess wiki:
For safety reasons, delta pruning should be switched off in the late endgame, since otherwise quiescence search would be blind to insufficient material issues and transitions into won endgames made at the expense of some material.
It's ok...but..

Problem:
--------------------------------------------------------------------------------
White to move.
White close to mate (win: arround 600-800 cp).
White have !Queen!-> important, Rook, Pawns >> greater material than in end game.
White Queen or Rook is under attack. (still white to move)
---------------------------------------------------------------------------------
In the next step white lose Queen or Rook.
When i take back and re-search, this does not happen again.
(I was thinking the hash table the reason, but this happens after i implemented delta pruning)

Fruit 2.1: Dont prune Queen capture in a Qsearch
Kontra: Most (top) engine does not use it.

Stockfish:

Code: Select all

futilityBase > -VALUE_KNOWN_WIN
VALUE_KNOWN_WIN = 10000; QueenValueEg = 2650;
Why is it so high?
Kontra: Senpai, Rodent does not use it, but still works well.

DiscoCheck:

Code: Select all

best_score = std::max(best_score, opt_score); // beware of fail soft side effect
Kontra: Senpai, Rodent does not use it, but still works well.

Currently delta margin is: Pawn endgame value. I tried: 2*Pawn value.

I think the "alpha mate" should be caught. Is this a good solution?
Kontra: Most (top) engine does not use it.

I'm clueless.

Has anyone been like that? What did it solve?

Sorry if it is difficult to understand.

Thank's, Tamás
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Delta pruning Mate error

Post by Sven »

tomitank wrote:In the next step white lose Queen or Rook.
When i take back and re-search, this does not happen again.
(I was thinking the hash table the reason, but this happens after i implemented delta pruning)
This does not sound like a problem with the delta pruning concept in general, or how it can be and has been implemented in various engines, but more like a bug in your implementation.

For the side that has a huge material advantage delta pruning should have the effect of saving some nodes when examining, for instance, a blunder that loses the queen: the opponent takes the queen so you are now down in material and considerably below alpha. Capturing a pawn will be pointless since the opponent may choose to stand pat so you never get back above alpha. But even if your delta margin is too low so that you tend to skip searching the pawn capture even if it does not look so pointless, how should this lead to finally playing a move that blunders away the queen? Also the observation that the problem disappears after taking back and searching again seems to indicate a bug.
tomitank
Posts: 276
Joined: Sat Mar 04, 2017 12:24 pm
Location: Hungary

Re: Delta pruning Mate error

Post by tomitank »

Thank's Sven!

I'm trying to find it.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Delta pruning Mate error

Post by Evert »

The term "Delta pruning" obfuscates what this actually is. It's just futility pruning in quiescence search, with a different margin compared to the main search. So if you have futility pruning working correctly in the main search, the same implementation should work during quiescence search.