]> git.sesse.net Git - stockfish/commitdiff
Merge cosmetics from Glaurung 2.2
authorMarco Costalba <mcostalba@gmail.com>
Sun, 21 Dec 2008 16:02:34 +0000 (17:02 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 21 Dec 2008 16:02:34 +0000 (17:02 +0100)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/evaluate.cpp
src/search.h

index 9c35a0dbb6c61cda3bab77ad64766e3e984af94e..263a99091811d2ce7ebdde7f29b117bb8512a1aa 100644 (file)
@@ -637,7 +637,6 @@ namespace {
 
   void evaluate_rook(const Position &p, Square s, Color us, EvalInfo &ei) {
 
-    //Bitboard b = p.rook_attacks(s);
     Bitboard b = rook_attacks_bb(s, p.occupied_squares() & ~p.rooks_and_queens(us));
     ei.attackedBy[us][ROOK] |= b;
 
@@ -768,14 +767,14 @@ namespace {
       Bitboard occ = p.occupied_squares(), b, b2;
 
       // Initialize the 'attackUnits' variable, which is used later on as an
-      // index to the SafetyTable[] array.  The initial is based on the number
-      // and types of the attacking pieces, the number of attacked and
+      // index to the SafetyTable[] array.  The initial value is based on the
+      // number and types of the attacking pieces, the number of attacked and
       // undefended squares around the king, the square of the king, and the
       // quality of the pawn shelter.
       int attackUnits =
             Min((ei.kingAttackersCount[them] * ei.kingAttackersWeight[them]) / 2, 25)
           + (ei.kingAdjacentZoneAttacksCount[them] + count_1s_max_15(undefended)) * 3
-          + InitKingDanger[relative_square(us, s)] - shelter / 32;
+          + InitKingDanger[relative_square(us, s)] - (shelter >> 5);
 
       // Analyse safe queen contact checks
       b = undefended & ei.attacked_by(them, QUEEN) & ~p.pieces_of_color(them);
index 03179190cb7419fce0a8246607c77e08b789e7de..c8d841a12f5778bd56f84fb22eab04b86b76dabb 100644 (file)
@@ -25,7 +25,6 @@
 //// Includes
 ////
 
-#include "types.h"
 #include "depth.h"
 #include "history.h"
 #include "lock.h"