summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
69240a9)
STC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 45239 W: 8913 L: 8591 D: 27735
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 21046 W: 3200 L: 2989 D: 14857
Bench:
8012530
Resolves #526
// Evaluation weights, indexed by the corresponding evaluation term
// Evaluation weights, indexed by the corresponding evaluation term
- enum { Mobility, PawnStructure, PassedPawns, Space, KingSafety, Threats };
+ enum { Mobility, PawnStructure, PassedPawns, Space, KingSafety };
const struct Weight { int mg, eg; } Weights[] = {
const struct Weight { int mg, eg; } Weights[] = {
- {266, 334}, {214, 203}, {193, 262}, {47, 0}, {330, 0}, {404, 241}
+ {266, 334}, {214, 203}, {193, 262}, {47, 0}, {330, 0}
};
Score operator*(Score s, const Weight& w) {
};
Score operator*(Score s, const Weight& w) {
// bonuses according to which piece type attacks which one.
// Attacks on lesser pieces which are pawn defended are not considered.
const Score Threat[2][PIECE_TYPE_NB] = {
// bonuses according to which piece type attacks which one.
// Attacks on lesser pieces which are pawn defended are not considered.
const Score Threat[2][PIECE_TYPE_NB] = {
- { S(0, 0), S(0, 32), S(25, 39), S(28, 44), S(42, 98), S(35,105) }, // Minor attacks
- { S(0, 0), S(0, 27), S(26, 57), S(26, 57), S( 0, 30), S(23, 51) } // Rook attacks
+ { S(0, 0), S(0, 33), S(45, 43), S(46, 47), S(72, 107), S(48,118) }, // Minor attacks
+ { S(0, 0), S(0, 25), S(40, 62), S(40, 59), S( 0, 34), S(35, 48) } // Rook attacks
};
// ThreatenedByPawn[PieceType] contains a penalty according to which piece
// type is attacked by a pawn.
const Score ThreatenedByPawn[PIECE_TYPE_NB] = {
};
// ThreatenedByPawn[PieceType] contains a penalty according to which piece
// type is attacked by a pawn.
const Score ThreatenedByPawn[PIECE_TYPE_NB] = {
- S(0, 0), S(0, 0), S(107, 138), S(84, 122), S(114, 203), S(121, 217)
+ S(0, 0), S(0, 0), S(176, 139), S(131, 127), S(217, 218), S(203, 215)
};
// Passed[mg/eg][Rank] contains midgame and endgame bonuses for passed pawns.
};
// Passed[mg/eg][Rank] contains midgame and endgame bonuses for passed pawns.
S(-27, -12), S( 1, -8), S( 3, 10), S( 12, 10)
};
S(-27, -12), S( 1, -8), S( 3, 10), S( 12, 10)
};
- const Score ThreatenedByHangingPawn = S(40, 60);
+ const Score ThreatenedByHangingPawn = S(70, 63);
// Assorted bonuses and penalties used by evaluation
// Assorted bonuses and penalties used by evaluation
- const Score KingOnOne = S( 2, 58);
- const Score KingOnMany = S( 6,125);
+ const Score KingOnOne = S( 3, 62);
+ const Score KingOnMany = S( 9,138);
const Score RookOnPawn = S( 7, 27);
const Score RookOnOpenFile = S(43, 21);
const Score RookOnSemiOpenFile = S(19, 10);
const Score RookOnPawn = S( 7, 27);
const Score RookOnOpenFile = S(43, 21);
const Score RookOnSemiOpenFile = S(19, 10);
const Score MinorBehindPawn = S(16, 0);
const Score TrappedRook = S(92, 0);
const Score Unstoppable = S( 0, 20);
const Score MinorBehindPawn = S(16, 0);
const Score TrappedRook = S(92, 0);
const Score Unstoppable = S( 0, 20);
- const Score Hanging = S(31, 26);
- const Score PawnAttackThreat = S(20, 20);
+ const Score Hanging = S(48, 28);
+ const Score PawnAttackThreat = S(31, 19);
const Score Checked = S(20, 20);
// Penalty for a bishop on a1/h1 (a8/h8 for black) which is trapped by
const Score Checked = S(20, 20);
// Penalty for a bishop on a1/h1 (a8/h8 for black) which is trapped by
score += popcount<Max15>(b) * PawnAttackThreat;
if (DoTrace)
score += popcount<Max15>(b) * PawnAttackThreat;
if (DoTrace)
- Trace::add(THREAT, Us, score * Weights[Threats]);
+ Trace::add(THREAT, Us, score);
- return score * Weights[Threats];