From 74033b004e9ba8c345573606ba670df75a795cba Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 24 Aug 2010 14:48:40 +0200 Subject: [PATCH] Refresh comments in evaluate.cpp No functional change. Signed-off-by: Marco Costalba --- src/evaluate.cpp | 58 +++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 55c5014a..eb4cbef7 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -61,8 +61,9 @@ namespace { S(248, 271), S(233, 201), S(252, 259), S(46, 0), S(247, 0), S(259, 0) }; - // Pieces mobility bonus in middle game and endgame, indexed by piece type - // and number of attacked squares not occupied by friendly pieces. + // MobilityBonus[PieceType][attacked] contains mobility bonuses for middle and + // end game, indexed by piece type and number of attacked squares not occupied + // by friendly pieces. const Score MobilityBonus[][32] = { {}, {}, { S(-38,-33), S(-25,-23), S(-12,-13), S( 0, -3), S(12, 7), S(25, 17), // Knights @@ -81,8 +82,8 @@ namespace { S( 20, 35), S( 20, 35) } }; - // Outpost bonuses for knights and bishops, indexed by square (from white's - // point of view). + // OutpostBonus[PieceType][Square] contains outpost bonuses of knights and + // bishops, indexed by piece type and square (from white's point of view). const Value OutpostBonus[][64] = { { // A B C D E F G H @@ -105,9 +106,9 @@ namespace { V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0) } }; - // ThreatBonus[attacking][attacked] contains bonus according to which - // piece type attacks which one. - const Score ThreatBonus[8][8] = { + // ThreatBonus[attacking][attacked] contains threat bonuses according to + // which piece type attacks which one. + const Score ThreatBonus[][8] = { {}, {}, { S(0, 0), S( 7, 39), S( 0, 0), S(24, 49), S(41,100), S(41,100) }, // KNIGHT { S(0, 0), S( 7, 39), S(24, 49), S( 0, 0), S(41,100), S(41,100) }, // BISHOP @@ -115,9 +116,9 @@ namespace { { S(0, 0), S(15, 39), S(15, 39), S(15, 39), S(15, 39), S( 0, 0) } // QUEEN }; - // ThreatedByPawnPenalty[] contains a penalty according to which piece - // type is attacked by an enemy pawn. - const Score ThreatedByPawnPenalty[8] = { + // ThreatedByPawnPenalty[PieceType] contains a penalty according to which + // piece type is attacked by an enemy pawn. + const Score ThreatedByPawnPenalty[] = { S(0, 0), S(0, 0), S(56, 70), S(56, 70), S(76, 99), S(86, 118) }; @@ -135,26 +136,26 @@ namespace { // right to castle. const Value TrappedRookPenalty = Value(180); - // The SpaceMask[color] contains the area of the board which is considered + // The SpaceMask[Color] contains the area of the board which is considered // by the space evaluation. In the middle game, each side is given a bonus // based on how many squares inside this area are safe and available for // friendly minor pieces. const Bitboard SpaceMask[2] = { - (1ULL<