mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 10:06:26 +08:00
Pawn clean up
Non functional simplification when we find the passed pawns in pawn.cpp and some code clean up. It also better follows the pattern "flag the pawn" and "score the pawn". ------------------------- The idea behind the third condition for candidate passed pawn is a little bit difficult to visualize. Just for the record, the idea is the following: Consider White e5 d4 against black e6. d4 can (in some endgames) push to d5 and lever e6. Thanks to this sacrifice, or after d5xe6, we consider e5 as "passed". However: - if White e5/d4 against black e6/c6: d4 cannot safely push to d5 since d5 is double attacked; - if White e5/d4 against black e6/d5: d4 cannot safely push to d5 since it is occupied. This is exactly what the following expression does: ``` && (shift<Up>(support) & ~(theirPawns | dblAttackThem))) ``` -------------------------- http://tests.stockfishchess.org/tests/view/5d3325bb0ebc5925cf0e6e91 LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 124666 W: 27586 L: 27669 D: 69411 Closes https://github.com/official-stockfish/Stockfish/pull/2255 No functional change
This commit is contained in:
committed by
Stéphane Nicolet
parent
dc243a3c88
commit
33c3a04653
@@ -1152,7 +1152,7 @@ moves_loop: // When in check, search starts from here
|
||||
: -stat_bonus(newDepth);
|
||||
|
||||
if (move == ss->killers[0])
|
||||
bonus += bonus / 4;
|
||||
bonus += bonus / 4;
|
||||
|
||||
update_continuation_histories(ss, movedPiece, to_sq(move), bonus);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user