1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 09:13:08 +00:00
BadFish/src
Marco Costalba 2aac860db3 Fix wrong condition in PawnEntry::king_safety()
Since revision 374c9e6b63
we use also castling information to calculate king safety.
So before to reuse the cached king safety score we have to
veify not only king position, but also castling rights are
the same of the pre-calculated ones.

This is a very subtle bug, found only becuase even after
previous patch, consecutives runs of 'bench' _still_ showed
different numbers. Pawn tables are not cleared between 'bench'
runs and in the second run a king safety score, previously
evaluated under some castling rights, was reused by another
position with different castling rights instead of being
recalculated from scratch.

Bug spotted and tracked down by Balint Pfliegel

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2012-04-27 10:59:18 +01:00
..
benchmark.cpp Clear TT before running 'bench' 2012-04-26 19:37:30 +01:00
bitbase.cpp Reformat kpk bitbase 2012-01-30 19:19:47 +01:00
bitboard.cpp Use more_than_one() instead of single_bit() 2012-04-14 09:51:59 +01:00
bitboard.h Use more_than_one() instead of single_bit() 2012-04-14 09:51:59 +01:00
bitcount.h Unify BitCountType selection 2011-12-31 10:46:14 +01:00
book.cpp Rename occupied_squares() to pieces() 2012-03-18 11:18:38 +01:00
book.h Simplify Book APIs 2012-01-01 14:46:18 +01:00
endgame.cpp Use more_than_one() instead of single_bit() 2012-04-14 09:51:59 +01:00
endgame.h Simplify Endgames::probe() 2012-04-02 09:58:29 +01:00
evaluate.cpp Use more_than_one() instead of single_bit() 2012-04-14 09:51:59 +01:00
evaluate.h Introduce Eval namespace 2012-03-07 07:39:01 +01:00
history.h Use Windows threads library with mingw 2012-01-25 07:32:31 +01:00
main.cpp Use a std::vector to store searchMoves 2012-04-01 12:45:43 +01:00
Makefile Rewrite pop_1st_bit() to be endian independent 2012-04-06 12:38:27 +01:00
material.cpp Simplify Endgames::probe() 2012-04-02 09:58:29 +01:00
material.h Use std::vector to implement HashTable 2012-03-31 19:07:11 +01:00
misc.cpp Simplify Endgames::probe() 2012-04-02 09:58:29 +01:00
misc.h Use std::vector to implement HashTable 2012-03-31 19:07:11 +01:00
move.cpp Rename promotion_piece_type() to promotion_type() 2012-02-26 18:39:53 +01:00
movegen.cpp Use more_than_one() instead of single_bit() 2012-04-14 09:51:59 +01:00
movegen.h Rename NON_CAPTURE to QUIET 2012-01-22 00:42:59 +01:00
movepick.cpp Rename promotion_piece_type() to promotion_type() 2012-02-26 18:39:53 +01:00
movepick.h Order bad captures by MVV/LVA 2012-01-24 07:12:19 +01:00
pawns.cpp Fix wrong condition in PawnEntry::king_safety() 2012-04-27 10:59:18 +01:00
pawns.h Fix wrong condition in PawnEntry::king_safety() 2012-04-27 10:59:18 +01:00
platform.h Use thread_local compiler specifics 2012-04-06 18:03:15 +01:00
position.cpp Use more_than_one() instead of single_bit() 2012-04-14 09:51:59 +01:00
position.h Fix wrong condition in PawnEntry::king_safety() 2012-04-27 10:59:18 +01:00
psqtab.h Update copyright year to 2012 2011-12-30 13:52:16 +01:00
rkiss.h Update copyright year to 2012 2011-12-30 13:52:16 +01:00
search.cpp Retire "Active reparenting" 2012-04-22 17:52:31 +01:00
search.h Reset search time as early as possible 2012-03-31 10:01:31 +01:00
thread.cpp Retire "Active reparenting" 2012-04-22 17:52:31 +01:00
thread.h Retire "Active reparenting" 2012-04-22 17:52:31 +01:00
timeman.cpp Complete the renaming in Search::LimitsType 2012-03-31 09:16:09 +01:00
timeman.h Use UCI names in Search::LimitsType 2012-03-27 14:26:58 +01:00
tt.cpp Rename ValueType to Bound 2012-01-27 19:49:38 +01:00
tt.h Use std::vector to implement HashTable 2012-03-31 19:07:11 +01:00
types.h Active Reparenting 2012-04-10 18:22:58 +01:00
uci.cpp Use bench to implement UI 'perft' command 2012-04-07 13:45:53 +01:00
ucioption.cpp Refactor ThreadsManager::set_size() functionality 2012-03-25 10:23:49 +01:00
ucioption.h UCI buttons don't need a value 2012-03-17 21:44:50 +01:00