Skip to content

Commit

Permalink
Use PawnValueEg to express the caping interval
Browse files Browse the repository at this point in the history
Bench: 5791090
  • Loading branch information
snicolet committed Feb 10, 2018
1 parent cb13243 commit 5ea5fa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,9 @@ void Thread::search() {
beta = std::min(rootMoves[PVIdx].previousScore + delta, VALUE_INFINITE);

// Adjust contempt based on current situation
contempt = Options["Contempt"] * PawnValueEg / 100; // From centipawns
contempt += bestValue > 500 ? 50: // Dynamic contempt
bestValue < -500 ? -50:
contempt = Options["Contempt"] * PawnValueEg / 100; // From centipawns
contempt += bestValue > 2 * PawnValueEg ? PawnValueEg / 5: // Dynamic contempt
bestValue < -2 * PawnValueEg ? -PawnValueEg / 5:
bestValue / 10;

Eval::Contempt = (us == WHITE ? make_score(contempt, contempt / 2)
Expand Down

1 comment on commit 5ea5fa6

@snicolet
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See official-stockfish/Stockfish#1394 (comment) for a discussion of why it wasn't included in current master.

Please sign in to comment.