From: Marco Costalba Date: Sat, 28 Feb 2015 19:21:38 +0000 (+0100) Subject: Sync with master X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=0da7295795448fc826cb5b2613ac64a6e0c4adcd Sync with master bench: 8285241 --- 0da7295795448fc826cb5b2613ac64a6e0c4adcd diff --cc src/evaluate.cpp index 25449771,c880b7c7..30e4c59a --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@@ -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 1ae1b17f,c5f1b22c..0b5c59d3 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@@ -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)