]> git.sesse.net Git - stockfish/commitdiff
Sync with master
authorMarco Costalba <mcostalba@gmail.com>
Sat, 28 Feb 2015 19:21:38 +0000 (20:21 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 28 Feb 2015 19:22:28 +0000 (20:22 +0100)
bench: 8285241

1  2 
src/evaluate.cpp
src/pawns.cpp

index 25449771ed8388609737d23b4e511faed1d13fcf,c880b7c7845f3c881ba2d7600a662c393e6a9436..30e4c59a040ea1761ebbfa9d6526f5e7f4ee94bc
@@@ -154,8 -147,8 +154,8 @@@ namespace 
  
    // ThreatenedByPawn[PieceType] contains a penalty according to which piece
    // type is attacked by an enemy pawn.
 -  const Score ThreatenedByPawn[] = {
 +  const Score ThreatenedByPawn[PIECE_TYPE_NB] = {
-     S(0, 0), S(0, 0), S(87, 118), S(84, 122), S(114, 203), S(121, 217)
+     S(0, 0), S(0, 0), S(107, 138), S(84, 122), S(114, 203), S(121, 217)
    };
  
    // Assorted bonuses and penalties used by evaluation
diff --cc src/pawns.cpp
index 1ae1b17fb1554d110b345c92633c7d6f87edf3b4,c5f1b22c270e2bd40bb7fb2537720a12fa5dcad4..0b5c59d3fae0df6048f7852f872557af5274f16b
@@@ -149,9 -143,13 +143,13 @@@ namespace 
          opposed     =   theirPawns & forward_bb(Us, s);
          passed      = !(theirPawns & passed_pawn_mask(Us, s));
          lever       =   theirPawns & pawnAttacksBB[s];
+         phalanx     =   neighbours & rank_bb(s);
+         supported   =   neighbours & rank_bb(s - Up);
+         connected   =   supported | phalanx;
+         isolated    =  !neighbours;
  
          // Test for backward pawn.
 -        // If the pawn is passed, isolated, connected or a lever it cannot be
 +        // If the pawn is passed, isolated, lever or connected it cannot be
          // backward. If there are friendly pawns behind on adjacent files
          // it cannot be backward either.
          if (   (passed | isolated | lever | connected)