]> git.sesse.net Git - stockfish/commit
Prune illegal moves in qsearch earlier
authorVizvezdenec <Vizvezdenec@gmail.com>
Sun, 18 Jul 2021 10:51:14 +0000 (13:51 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Fri, 23 Jul 2021 16:47:30 +0000 (18:47 +0200)
commitd957179df7285f8d032803661b378b7f1a80382e
tree11439ad2f08637f6028358aa4f57282c5b3a5929
parentbc654257e74af3ffe837c0fff6e663a073ab8bbf
Prune illegal moves in qsearch earlier

The main idea is that illegal moves influencing search or
qsearch obviously can't be any sort of good. The only reason
why initially legality checks for search and qsearch were done
after they actually can influence some heuristics is because
legality check is expensive computationally. Eventually in
search it was moved to the place where it makes sure that
illegal moves can't influence search.

This patch shows that the same can be done for qsearch + it
passed STC with elo-gaining bounds + it removes 3 lines of code
because one no longer needs to increment/decrement movecount
on illegal moves.

passed STC with elo-gaining bounds
https://tests.stockfishchess.org/tests/view/60f20aefd1189bed71812da0
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 61512 W: 4688 L: 4492 D: 52332
Ptnml(0-2): 139, 3730, 22848, 3874, 165

The same version functionally but with moving condition ever earlier
passed LTC with simplification bounds.
https://tests.stockfishchess.org/tests/view/60f292cad1189bed71812de9
LLR: 2.98 (-2.94,2.94) <-2.50,0.50>
Total: 60944 W: 1724 L: 1685 D: 57535
Ptnml(0-2): 11, 1556, 27298, 1597, 10

closes https://github.com/official-stockfish/Stockfish/pull/3618

bench 4709569
src/search.cpp