]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Remove history counters
[stockfish] / src / evaluate.cpp
index 1e8dae9585026ab8cda57e5f6e7834af57b965d4..71f6cf79afaa594af2e6245285816e7b44898d37 100644 (file)
@@ -64,8 +64,7 @@ namespace {
   const Score WeightKingOppSafetyInternal = make_score(259,   0);
 
   // Mobility and outposts bonus modified by Joona Kiiski
-  //
-  // Visually better to define tables constants
+
   typedef Value V;
   #define S(mg, eg) make_score(mg, eg)
 
@@ -111,7 +110,7 @@ namespace {
 
   // Pointers table to access mobility tables through piece type
   const Score* MobilityBonus[8] = { 0, 0, KnightMobilityBonus, BishopMobilityBonus,
-                                   RookMobilityBonus, QueenMobilityBonus, 0, 0 };
+                                    RookMobilityBonus, QueenMobilityBonus, 0, 0 };
 
   // Outpost bonuses for knights and bishops, indexed by square (from white's
   // point of view).
@@ -141,7 +140,7 @@ namespace {
 
   // ThreatBonus[][] contains bonus according to which piece type
   // attacks which one.
-  #define Z make_score(0, 0)
+  #define Z S(0, 0)
 
   const Score ThreatBonus[8][8] = {
       { Z, Z, Z, Z, Z, Z, Z, Z }, // not used
@@ -253,8 +252,8 @@ namespace {
   Value SafetyTable[100];
 
   // Pawn and material hash tables, indexed by the current thread id
-  PawnInfoTable* PawnTable[8] = {0, 0, 0, 0, 0, 0, 0, 0};
   MaterialInfoTable* MaterialTable[8] = {0, 0, 0, 0, 0, 0, 0, 0};
+  PawnInfoTable* PawnTable[8] = {0, 0, 0, 0, 0, 0, 0, 0};
 
   // Sizes of pawn and material hash tables
   const int PawnTableSize = 16384;
@@ -330,7 +329,7 @@ Value do_evaluate(const Position& pos, EvalInfo& ei, int threadID) {
 
   // Probe the pawn hash table
   ei.pi = PawnTable[threadID]->get_pawn_info(pos);
-  ei.value += apply_weight(ei.pi->value(), WeightPawnStructure);
+  ei.value += apply_weight(ei.pi->pawns_value(), WeightPawnStructure);
 
   // Initialize king attack bitboards and king attack zones for both sides
   ei.attackedBy[WHITE][KING] = pos.attacks_from<KING>(pos.king_square(WHITE));