1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Fix "pass ss->eval to qsearch()" condition

The seocond check is no more needed now and
anyhow is wrong to overwrite a TT entry if
present.

Spotted by Ralph Stoesser.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2010-07-19 12:28:33 +01:00
parent 201f924d53
commit 0fb5d7a737

View file

@ -1108,7 +1108,7 @@ namespace {
&& !pos.has_pawn_on_7th(pos.side_to_move())) && !pos.has_pawn_on_7th(pos.side_to_move()))
{ {
// Pass ss->eval to qsearch() and avoid an evaluate call // Pass ss->eval to qsearch() and avoid an evaluate call
if (!tte || tte->static_value() == VALUE_NONE) if (!tte)
TT.store(posKey, ss->eval, VALUE_TYPE_EXACT, Depth(-127*OnePly), MOVE_NONE, ss->eval, ei.kingDanger[pos.side_to_move()]); TT.store(posKey, ss->eval, VALUE_TYPE_EXACT, Depth(-127*OnePly), MOVE_NONE, ss->eval, ei.kingDanger[pos.side_to_move()]);
Value rbeta = beta - razor_margin(depth); Value rbeta = beta - razor_margin(depth);