From 67b0d0b1cc7add779ef18b6f1215d2a1513f3e61 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 16 Apr 2011 10:25:22 +0100 Subject: [PATCH] Use only history to score non captures It seems gain is practically unuseful, so remove. After 13554 games: Mod vs Orig 2252 - 2319 - 8983 ELO -1 (+- 3.4) Signed-off-by: Marco Costalba --- src/movepick.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/movepick.cpp b/src/movepick.cpp index c6c25d7b..fa30de55 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -216,18 +216,15 @@ void MovePicker::score_captures() { } void MovePicker::score_noncaptures() { - // Score by history and max gain for the move. + Move m; - Piece piece; - Square from, to; + Square from; for (MoveStack* cur = moves; cur != lastMove; cur++) { m = cur->move; from = move_from(m); - to = move_to(m); - piece = pos.piece_on(from); - cur->score = H.value(piece, to) + H.gain(piece, to); + cur->score = H.value(pos.piece_on(from), move_to(m)); } } -- 2.39.2