]> git.sesse.net Git - stockfish/commitdiff
Use only history to score non captures
authorMarco Costalba <mcostalba@gmail.com>
Sat, 16 Apr 2011 09:25:22 +0000 (10:25 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 17 Apr 2011 21:32:12 +0000 (22:32 +0100)
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 <mcostalba@gmail.com>
src/movepick.cpp

index c6c25d7b42a53eff8daf1e19634367a25d37d310..fa30de554b59de4864821326c8b5765d83b7a22f 100644 (file)
@@ -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));
   }
 }