1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00
BadFish/src
AndyGrant 2e1369d030 Fix TT write in MultiPV case.
fixes an error reported earlier as https://github.com/official-stockfish/Stockfish/issues/2404 by @AndyGrant.

MultiPV at root shouldn't write to the TT for later lines, as that is neither the eval nor the bestmove for that position.
Fixing this error doesn't matter for playing games (http://tests.stockfishchess.org/tests/view/5dcdbd810ebc590256324a11).

However, it can lead to wrong mate announcements as reported by @uriblass. In particular the following testcase gives
wrong results for the second search, prior to this patch:

```
setoption name MultiPV value 2
position fen 5R2/2kB2p1/p2bR3/8/3p1B2/8/PPP5/2K5 b - - 0 49
go depth 40
position fen 2B2R2/3r2p1/p1kbR3/8/3p1B2/8/PPP5/2K5 b - - 8 48
go depth 40
```

fixes https://github.com/official-stockfish/Stockfish/issues/2561
closes https://github.com/official-stockfish/Stockfish/pull/2562

Only affects MultiPV search.

Bench: 4697493
2020-02-25 21:10:10 +01:00
..
syzygy Assorted trivial cleanups January 2020 2020-01-09 21:57:21 +01:00
benchmark.cpp Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
bitbase.cpp Small cleanups. 2020-02-05 15:32:29 +01:00
bitboard.cpp Rewrite initialization of PseudoMoves 2020-01-10 01:58:27 +01:00
bitboard.h Determine opposite colors mathematically 2020-01-23 17:59:03 +01:00
endgame.cpp Updated KNNKP endgame. 2020-02-20 08:32:17 +01:00
endgame.h Small cleanups. 2020-02-05 15:32:29 +01:00
evaluate.cpp Use single param for Outpost and ReachableOutpost. 2020-02-25 21:03:42 +01:00
evaluate.h Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
main.cpp Small cleanups. 2020-02-05 15:32:29 +01:00
Makefile Assorted trivial cleanups 2019-10-26 00:29:12 +02:00
material.cpp Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
material.h Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
misc.cpp Small cleanups. 2020-02-05 15:32:29 +01:00
misc.h Small cleanups. 2020-02-05 15:32:29 +01:00
movegen.cpp Small cleanups. 2020-02-05 15:32:29 +01:00
movegen.h Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
movepick.cpp Improve move order near the root 2020-02-22 21:32:32 +01:00
movepick.h Improve move order near the root 2020-02-22 21:32:32 +01:00
pawns.cpp Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
pawns.h Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
position.cpp Fix wrong assert. 2020-02-10 09:12:07 +01:00
position.h Simplify signature of remove_piece() 2020-01-23 17:31:45 +01:00
psqt.cpp Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
search.cpp Fix TT write in MultiPV case. 2020-02-25 21:10:10 +01:00
search.h Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
thread.cpp Improve move order near the root 2020-02-22 21:32:32 +01:00
thread.h Improve move order near the root 2020-02-22 21:32:32 +01:00
thread_win32_osx.h Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
timeman.cpp Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
timeman.h Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
tt.cpp Small cleanups. 2020-02-05 15:32:29 +01:00
tt.h Advise the kernel to use huge pages (Linux) 2020-01-27 11:16:10 +01:00
types.h Fix for incorrect VALUE_MATE_IN_MAX_PLY usage. 2020-02-15 15:10:07 +01:00
uci.cpp Show compiler info at startup 2020-01-12 11:54:15 +01:00
uci.h Update lists of authors and contributors 2020-01-09 01:43:47 +01:00
ucioption.cpp Update lists of authors and contributors 2020-01-09 01:43:47 +01:00