QSearch perft

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
jwes
Posts: 778
Joined: Sat Jul 01, 2006 5:11 am

Re: QSearch perft

Post by jwes » Sat May 25, 2019 3:31 am

Robert Pope wrote:
Fri May 24, 2019 9:08 pm
Joost Buijs wrote:
Fri May 24, 2019 12:43 pm

I think the difference is due to the fact that you don't generate check-evasions, because check-evasions will contain non captures too. So you have to generate evasions when the king is in check. You have to do this in quiescence too, otherwise your quiescence will make very big errors.
Do you have to do something to avoid a search explosion? It seems once you add non-capturing evasions, you open yourself up to perpetual checks.
You can do either checks or check evasions in qsearch, but not both.

Joost Buijs
Posts: 959
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: QSearch perft

Post by Joost Buijs » Sat May 25, 2019 5:51 am

Robert Pope wrote:
Fri May 24, 2019 9:08 pm
Joost Buijs wrote:
Fri May 24, 2019 12:43 pm

I think the difference is due to the fact that you don't generate check-evasions, because check-evasions will contain non captures too. So you have to generate evasions when the king is in check. You have to do this in quiescence too, otherwise your quiescence will make very big errors.
Do you have to do something to avoid a search explosion? It seems once you add non-capturing evasions, you open yourself up to perpetual checks.
Indeed, there could be a problem with it if the evasion checks the other king and vice versa, this is very unlikely however and (hopefully) will be detected by repetition detection, at least I never found any problem with it.

When the king is in check and you don't generate non-capturing evasions the question is what to return from your q-search() because you don't know whether it is check-mate or not, returning some negative score will probably work but this is not very accurate.

Henk
Posts: 5799
Joined: Mon May 27, 2013 8:31 am

Re: QSearch perft

Post by Henk » Sat May 25, 2019 8:40 am

Maybe I only do check evasions above some depth. Say -6. I don't have repetition detection in QSearch. If most are captures then I think not many repetitions will occur or not?

By the way with check evasions I get same problem with futility pruning in QSearch as in normal Search on depth = 1.
For instance a pawn fork between king and another piece. Without check evasions opponent would just stand pat when in check. But with check evasions it may loose a piece.

Joost Buijs
Posts: 959
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: QSearch perft

Post by Joost Buijs » Sat May 25, 2019 4:20 pm

Henk wrote:
Sat May 25, 2019 8:40 am
Maybe I only do check evasions above some depth. Say -6. I don't have repetition detection in QSearch. If most are captures then I think not many repetitions will occur or not?

By the way with check evasions I get same problem with futility pruning in QSearch as in normal Search on depth = 1.
For instance a pawn fork between king and another piece. Without check evasions opponent would just stand pat when in check. But with check evasions it may loose a piece.
I never tried without rep. detection, maybe it is not necessary, I guess you just have to try. You really need check evasions or some other means to resolve checks. When the king is in check you can try to call main search from quiescence (with depth 1), this is far from optimal, but it probably works better than doing nothing at all.

Robert Pope
Posts: 510
Joined: Sat Mar 25, 2006 7:27 pm

Re: QSearch perft

Post by Robert Pope » Sun May 26, 2019 3:40 am

jwes wrote:
Sat May 25, 2019 3:31 am
Robert Pope wrote:
Fri May 24, 2019 9:08 pm
Joost Buijs wrote:
Fri May 24, 2019 12:43 pm

I think the difference is due to the fact that you don't generate check-evasions, because check-evasions will contain non captures too. So you have to generate evasions when the king is in check. You have to do this in quiescence too, otherwise your quiescence will make very big errors.
Do you have to do something to avoid a search explosion? It seems once you add non-capturing evasions, you open yourself up to perpetual checks.
You can do either checks or check evasions in qsearch, but not both.
Ah. Right, thanks.

Post Reply