mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 09:47:46 +00:00
Convert gains to use a piece-to mapping
Instead of piece-from-to, in this way it is similar to what we already do for history. Almost no change, but seems a bit simpler in this way. After 995 games at 1+0 Mod vs Orig +207 =596 -192 +5 ELO Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+2
-2
@@ -1607,7 +1607,7 @@ namespace {
|
||||
if (predictedDepth >= OnePly)
|
||||
preFutilityValueMargin = FutilityMargins[int(predictedDepth)];
|
||||
|
||||
preFutilityValueMargin += H.gain(pos.piece_on(move_from(move)), move_from(move), move_to(move)) + 45;
|
||||
preFutilityValueMargin += H.gain(pos.piece_on(move_from(move)), move_to(move)) + 45;
|
||||
|
||||
futilityValueScaled = ss[ply].eval + preFutilityValueMargin - moveCount * IncrementalFutilityMargin;
|
||||
|
||||
@@ -2704,7 +2704,7 @@ namespace {
|
||||
&& pos.captured_piece() == NO_PIECE_TYPE
|
||||
&& !move_is_castle(m)
|
||||
&& !move_is_promotion(m))
|
||||
H.set_gain(pos.piece_on(move_to(m)), move_from(m), move_to(m), -(before + after));
|
||||
H.set_gain(pos.piece_on(move_to(m)), move_to(m), -(before + after));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user