summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
619d66b)
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
else
defendedSquares = squaresToQueen & ei.attackedBy[Us][ALL_PIECES];
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;
-
- // 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 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;
+
+ // 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)
if (defendedSquares == squaresToQueen)
k += 6;
else if (defendedSquares & blockSq)
- k += (unsafeSquares & defendedSquares) == unsafeSquares ? 4 : 2;
mbonus += Value(k * rr), ebonus += Value(k * rr);
}
mbonus += Value(k * rr), ebonus += Value(k * rr);
}