1
0
Fork 0

Small simplification to passed pawns

Tested in no-regression mode.

Passed both STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 28521 W: 5066 L: 4958 D: 18497

And LTC
LLR: 3.04 (-2.94,2.94) [-3.00,1.00]
Total: 21939 W: 3261 L: 3138 D: 15540

bench: 8165681
pull/358/head
Arjun Temurnikar 2014-04-17 21:41:22 -07:00 committed by Marco Costalba
parent 619d66b7ab
commit a4d058bca2
1 changed files with 6 additions and 8 deletions

View File

@ -633,19 +633,17 @@ namespace {
else
defendedSquares = squaresToQueen & ei.attackedBy[Us][ALL_PIECES];
// If there aren't any enemy attacks, then assign a huge bonus.
// The bonus will be a bit smaller if at least the block square
// isn't attacked, otherwise assign the smallest possible bonus.
int k = !unsafeSquares ? 15 : !(unsafeSquares & blockSq) ? 9 : 3;
// If there aren't any enemy attacks, assign a big bonus. Otherwise
// assign a smaller bonus if the block square isn't attacked.
int k = !unsafeSquares ? 15 : !(unsafeSquares & blockSq) ? 9 : 0;
// Assign a big bonus if the path to the queen is fully defended,
// otherwise assign a bit less of a bonus if at least the block
// square is defended.
// If the path to queen is fully defended, assign a big bonus.
// Otherwise assign a smaller bonus if the block square is defended.
if (defendedSquares == squaresToQueen)
k += 6;
else if (defendedSquares & blockSq)
k += (unsafeSquares & defendedSquares) == unsafeSquares ? 4 : 2;
k += 4;
mbonus += Value(k * rr), ebonus += Value(k * rr);
}