Skip to content

Commit

Permalink
Extend King Threats to all pieces (other than pawns).
Browse files Browse the repository at this point in the history
STC
LLR: 2.99 (-2.94,2.94) [-1.50,4.50]
Total: 20559 W: 4261 L: 4095 D: 12203

LTC
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 75232 W: 13097 L: 12696 D: 49439

Bench: 7543790

Resolves official-stockfish#63
  • Loading branch information
ajithcj authored and glinscott committed Oct 3, 2014
1 parent 82d065b commit 4b926f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/evaluate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ namespace {
};

// Assorted bonuses and penalties used by evaluation
const Score KingOnPawnOne = S(0 , 64);
const Score KingOnPawnMany = S(0 ,128);
const Score KingOnOne = S(2 , 58);
const Score KingOnMany = S(6 ,125);
const Score RookOnPawn = S(10, 28);
const Score RookOpenFile = S(43, 21);
const Score RookSemiOpenFile = S(19, 10);
Expand Down Expand Up @@ -530,9 +530,9 @@ namespace {
if (b)
score += more_than_one(b) ? Hanging * popcount<Max15>(b) : Hanging;

b = weakEnemies & pos.pieces(Them, PAWN) & ei.attackedBy[Us][KING];
b = weakEnemies & ei.attackedBy[Us][KING];
if (b)
score += more_than_one(b) ? KingOnPawnMany : KingOnPawnOne;
score += more_than_one(b) ? KingOnMany : KingOnOne;
}

if (Trace)
Expand Down

0 comments on commit 4b926f2

Please sign in to comment.