]> git.sesse.net Git - stockfish/commitdiff
Store node evaluation in SearchStack
authorMarco Costalba <mcostalba@gmail.com>
Sun, 10 Jan 2010 16:19:49 +0000 (17:19 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 11 Jan 2010 20:18:30 +0000 (21:18 +0100)
This info will be used by future patches.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp
src/search.h

index 44bd9530d3e6a5f362de24fcb1ce438b5e86d24c..76db6d69217f4d53c3d007d808a0b1b952554111 100644 (file)
@@ -652,6 +652,7 @@ void SearchStack::init(int ply) {
   pv[ply] = pv[ply + 1] = MOVE_NONE;
   currentMove = threatMove = MOVE_NONE;
   reduction = Depth(0);
+  eval = VALUE_NONE;
 }
 
 void SearchStack::initKillers() {
@@ -1391,6 +1392,7 @@ namespace {
     const int FutilityValueMargin = 112 * bitScanReverse32(int(depth) * int(depth) / 2);
 
     // Enhance score accuracy with TT value if possible
+    ss[ply].eval = staticValue;
     futilityValue = staticValue + FutilityValueMargin;
     staticValue = refine_eval(tte, staticValue, ply);
 
index e87d0d2c2c33020f4c4b992f19872abe5dde75a1..db9bef3c69fec6bed8d21a0386a08972321b7160 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "depth.h"
 #include "move.h"
+#include "value.h"
 
 
 ////
@@ -54,6 +55,7 @@ struct SearchStack {
   Move threatMove;
   Move killers[KILLER_MAX];
   Depth reduction;
+  Value eval;
 
   void init(int ply);
   void initKillers();