Skip to content

Commit

Permalink
consolidate king proximity bonuses.
Browse files Browse the repository at this point in the history
  • Loading branch information
protonspring committed Sep 13, 2018
1 parent 0fa957c commit 0563aca
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/evaluate.cpp
Expand Up @@ -652,11 +652,7 @@ namespace {

// Adjust bonus based on the king's proximity
bonus += make_score(0, ( king_proximity(Them, blockSq) * 5
- king_proximity(Us, blockSq) * 2) * w);

// If blockSq is not the queening square then consider also a second push
if (r != RANK_7)
bonus -= make_score(0, king_proximity(Us, blockSq + Up) * w);
- king_proximity(Us, blockSq) * (RANK_8-r)) * w);

// If the pawn is free to advance, then increase the bonus
if (pos.empty(blockSq))
Expand Down

0 comments on commit 0563aca

Please sign in to comment.