]> git.sesse.net Git - stockfish/commit
Fix duplicated moves generation in movepicker
authorMichael Chaly <Vizvezdenec@gmail.com>
Fri, 24 Feb 2023 09:09:45 +0000 (12:09 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sun, 5 Mar 2023 15:06:03 +0000 (16:06 +0100)
commit5c75c1c2fbb7bb4f0bf7c44fb855c415b788cbf7
treeff6f05c17e14d7ee967637367e73ba9f4f55a12d
parent876906965b8d552866486c0e6eda1184fdb1d636
Fix duplicated moves generation in movepicker

in a some of cases movepicker returned some moves more than once which lead
to them being searched more than once. This bug was possible because of how
we use queen promotions - they are generated as a captures but are not
included in position function which checks if move is a capture. Thus if
any refutation (killer or countermove) was a queen promotion it was
searched twice - once as a capture and one as a refutation.

This patch affects various things, namely stats assignments for queen promotions
and other moves if best move is queen promotion,
also some heuristics in search and qsearch.

With this patch every queen promotion is now considered a capture.

After this patch number of found duplicated moves is 0 during normal 13 depth bench run.

Passed STC:
https://tests.stockfishchess.org/tests/view/63f77e01e74a12625bcd87d7
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 80920 W: 21455 L: 21289 D: 38176
Ptnml(0-2): 198, 8839, 22241, 8963, 219

Passed LTC:
https://tests.stockfishchess.org/tests/view/63f7e020e74a12625bcd9a76
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 89712 W: 23674 L: 23533 D: 42505
Ptnml(0-2): 24, 8737, 27202, 8860, 33

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

bench 4681731
src/movepick.cpp
src/position.h
src/search.cpp
src/syzygy/tbprobe.cpp