printing in ID and storing scores in datagen in white relative format | bench 1857933

This commit is contained in:
rektdie committed 2025-04-03 03:53:22 +02:00
1 parent 5619ced265
commit 61a68e5bcf
4 files changed
+10 -3

No files matched your search

+2 -2
View File
@@ -249,7 +249,7 @@ void PlayGame(std::atomic<int>& positions, int targetPositions) {
if (!results.bestMove) break;
safeResults = results;
game.moves.push_back(ScoredMove(results.bestMove.ConvertToViriMoveFormat(), results.score));
game.moves.push_back(ScoredMove(results.bestMove.ConvertToViriMoveFormat(), UTILS::ConvertToWhiteRelative(board, results.score)));
board.MakeMove(results.bestMove);
MOVEGEN::GenerateMoves<All>(board);
@@ -264,7 +264,7 @@ void PlayGame(std::atomic<int>& positions, int targetPositions) {
}
}
game.format.packFrom(board, staticEval, wdl);
game.format.packFrom(board, UTILS::ConvertToWhiteRelative(board, staticEval), wdl);
WriteToFile(game, "data.binpack");
}
}
+1 -1
View File
@@ -437,7 +437,7 @@ static SearchResults ID(Board &board, SearchParams params) {
std::cout << "info ";
std::cout << "depth " << depth;
std::cout << " time " << elapsed;
std::cout << " score cp " << safeResults.score;
std::cout << " score cp " << UTILS::ConvertToWhiteRelative(board, safeResults.score);
std::cout << " nodes " << nodes << " nps " << int(nodes/sw.GetElapsedSec());
std::cout << " hashfull " << TT.GetUsedPercentage();
std::cout << " pv ";
+5
View File
@@ -181,4 +181,9 @@ std::array<uint8_t, 16> CompressPieces(Board board) {
return compressed;
}
int ConvertToWhiteRelative(Board &board, int score) {
return board.sideToMove == White ? score : -score;
}
}
+2
View File
@@ -32,4 +32,6 @@ Move parseMove(Board &board, std::string_view str);
std::array<uint8_t, 16> CompressPieces(Board board);
int ConvertToWhiteRelative(Board &board, int score);
}