printing in ID and storing scores in datagen in white relative format | bench 1857933
This commit is contained in:
1 parent
5619ced265
commit
61a68e5bcf
4 files changed
+10
-3
No files matched your search
+2
-2
@@ -249,7 +249,7 @@ void PlayGame(std::atomic<int>& positions, int targetPositions) {
|
|||||||
if (!results.bestMove) break;
|
if (!results.bestMove) break;
|
||||||
safeResults = results;
|
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);
|
board.MakeMove(results.bestMove);
|
||||||
MOVEGEN::GenerateMoves<All>(board);
|
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");
|
WriteToFile(game, "data.binpack");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -437,7 +437,7 @@ static SearchResults ID(Board &board, SearchParams params) {
|
|||||||
std::cout << "info ";
|
std::cout << "info ";
|
||||||
std::cout << "depth " << depth;
|
std::cout << "depth " << depth;
|
||||||
std::cout << " time " << elapsed;
|
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 << " nodes " << nodes << " nps " << int(nodes/sw.GetElapsedSec());
|
||||||
std::cout << " hashfull " << TT.GetUsedPercentage();
|
std::cout << " hashfull " << TT.GetUsedPercentage();
|
||||||
std::cout << " pv ";
|
std::cout << " pv ";
|
||||||
|
|||||||
@@ -181,4 +181,9 @@ std::array<uint8_t, 16> CompressPieces(Board board) {
|
|||||||
|
|
||||||
return compressed;
|
return compressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ConvertToWhiteRelative(Board &board, int score) {
|
||||||
|
return board.sideToMove == White ? score : -score;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -32,4 +32,6 @@ Move parseMove(Board &board, std::string_view str);
|
|||||||
|
|
||||||
std::array<uint8_t, 16> CompressPieces(Board board);
|
std::array<uint8_t, 16> CompressPieces(Board board);
|
||||||
|
|
||||||
|
int ConvertToWhiteRelative(Board &board, int score);
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user