Skip to content

Commit

Permalink
Adjust eval target for check counting variants
Browse files Browse the repository at this point in the history
  • Loading branch information
ianfab committed Sep 9, 2024
1 parent 57c31d2 commit b0ec00a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tools/training_data_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,12 @@ namespace Stockfish::Tools
// Result is added after the whole game is done.
pos.sfen_pack(psv.sfen);

// For check counting variants the training target should subtract the check bonus
if (pos.check_counting())
{
search_value -= 6 * 1200 / (5 * pos.checks_remaining( pos.side_to_move()))
- 6 * 1200 / (5 * pos.checks_remaining(~pos.side_to_move()));
}
psv.score = search_value;
psv.move = search_pv[0];
psv.gamePly = ply;
Expand Down

0 comments on commit b0ec00a

Please sign in to comment.