Skip to content

Commit

Permalink
Decay material advantage with time
Browse files Browse the repository at this point in the history
Bench: 3964888
  • Loading branch information
snicolet committed Sep 11, 2019
1 parent ee8cc3f commit 89948d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/evaluate.cpp
Expand Up @@ -531,7 +531,7 @@ namespace {

b = ~attackedBy[Them][ALL_PIECES]
| (nonPawnEnemies & attackedBy2[Us]);
score += (Hanging * popcount(weak & b)) / (1 + pos.rule50_count() / 8);
score += Hanging * popcount(weak & b);
}

// Bonus for restricting their piece moves
Expand Down Expand Up @@ -783,7 +783,9 @@ namespace {
// Initialize score by reading the incrementally updated scores included in
// the position object (material + piece square tables) and the material
// imbalance. Score is computed internally from the white point of view.
Score score = pos.psq_score() + me->imbalance() + pos.this_thread()->contempt;
Score score = pos.psq_score() / (1 + pos.rule50_count() / 8)
+ me->imbalance()
+ pos.this_thread()->contempt;

// Probe the pawn hash table
pe = Pawns::probe(pos);
Expand Down

0 comments on commit 89948d3

Please sign in to comment.