Losing captures in QS

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

jdart
Posts: 4367
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Losing captures in QS

Post by jdart »

I do futility pruning first, because SEE is somewhat expensive. If the futility test fails then I do SEE. I think this is very common.

--Jon
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Losing captures in QS

Post by matthewlai »

bob wrote:
matthewlai wrote:
bob wrote: Same as my other response. When you use an atypical search approach, things change. This likely suggests a flaw in the basic search idea you use with this "node budget" stuff, because not including losing captures (SEE) is a clear win in every test I have done, with each test having about 10x more games than your sample.
My test showed that NOT searching losing captures is a clear win. I think you read the results wrong.
You are right. I mis-read. This is such an old and well-known idea it looked like you were doing that and had changed...

You can find references (by others) to "delta pruning" in the 90's. Which is a refinement on the idea. If you are a queen down, searching a pawn capture is not good even if it is a safe capture. I used a variable "delta" to indicate what I needed to capture to get the score back to something reasonable, and someone saw this in Crafty and started to call it "delta pruning". I don't currently do the "delta" part but I have it on my list to test again as it once worked quite well for me...
I'll have to look into that at some point. It's a little more complicated to do with a probabilistic and non-linear eval. Maybe I can do something like calling eval on the leaf of SEE instead.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Losing captures in QS

Post by matthewlai »

Henk wrote:
matthewlai wrote:
BubbaTough wrote: Most people do not search SEE-losing captures in QS. It is impressive you managed to build such a strong engine without doing this, as the QS can really explode if you search all captures all the time.

-Sam
Ah no I have always not searched losing captures. I just decided to do some tests to verify that's indeed a good idea (it was).

I made this post because a while ago someone posted something about searching all captures (I can't find that post anymore).
Perhaps you searched for a way to increase Nodes / second for Giraffe. But just use minimax instead of alphabeta. Argument: it improves move ordering.
I am not too worried about nps. It's very strong already for a 100knps engine. It's only 60 Elo weaker (59%/41% score split) than Sungorus, which searches almost 25x faster. At 50-70 Elo per doubling, that would correspond to about 230-320 Elo. It's already about 100 Elo stronger than Brainless, which used all the speed tricks I knew, and searched 10x as fast as Giraffe.

I profile all the time so I know exactly where all the time is spent (in the eval). It's a tradeoff I have decided to take - I want a very strong eval, not a very fast engine that compensates for bad eval by searching further.

Low NPS is ok, as long as you are getting the strength back in some other way.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Losing captures in QS

Post by bob »

Don't follow. There was no specific SEE usage in delta pruning in old craftys. If you are down a queen, capturing a pawn is pointless regardless of the SEE score so it was not computed, except for cases where the "delta" concept didn't apply.

It reduces the size of the q-search a bit, but also introduces a bit of error of course.
User avatar
Rebel
Posts: 6994
Joined: Thu Aug 18, 2011 12:04 pm

Re: Losing captures in QS

Post by Rebel »

matthewlai wrote:Do you search SEE-losing captures in QS? I have always not searched them, and just did some quick test.

For Giraffe, not searching them is much better -

Code: Select all

Rank Name             Elo    +    - games score oppo. draws 
   1 Giraffe orig      37    6    6  3174   61%   -37   33% 
   2 Giraffe fullqs   -37    6    6  3174   39%    37   33% 
Pretty normal.

Also you can safely cancel minor promotions from QS.

Keep up the good work.

Nice project.
matthewlai
Posts: 793
Joined: Sun Aug 03, 2014 4:48 am
Location: London, UK

Re: Losing captures in QS

Post by matthewlai »

Rebel wrote:
matthewlai wrote:Do you search SEE-losing captures in QS? I have always not searched them, and just did some quick test.

For Giraffe, not searching them is much better -

Code: Select all

Rank Name             Elo    +    - games score oppo. draws 
   1 Giraffe orig      37    6    6  3174   61%   -37   33% 
   2 Giraffe fullqs   -37    6    6  3174   39%    37   33% 
Pretty normal.

Also you can safely cancel minor promotions from QS.

Keep up the good work.

Nice project.
Thanks.

Yeah I am ignoring underpromotions already.
Disclosure: I work for DeepMind on the AlphaZero project, but everything I say here is personal opinion and does not reflect the views of DeepMind / Alphabet.