mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 12:07:43 +00:00
Translation
Files in /eval, /extra, & /learn - comments translated from Japanese to English
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// NNUE評価関数に関するUSI拡張コマンド
|
||||
// USI extended command for NNUE evaluation function
|
||||
|
||||
#if defined(ENABLE_TEST_CMD) && defined(EVAL_NNUE)
|
||||
|
||||
@@ -19,15 +19,15 @@ namespace NNUE {
|
||||
|
||||
namespace {
|
||||
|
||||
// 主に差分計算に関するRawFeaturesのテスト
|
||||
// Testing RawFeatures mainly for difference calculation
|
||||
void TestFeatures(Position& pos) {
|
||||
const std::uint64_t num_games = 1000;
|
||||
StateInfo si;
|
||||
pos.set(StartFEN, false, &si, Threads.main());
|
||||
const int MAX_PLY = 256; // 256手までテスト
|
||||
const int MAX_PLY = 256; // test up to 256 hands
|
||||
|
||||
StateInfo state[MAX_PLY]; // StateInfoを最大手数分だけ
|
||||
int ply; // 初期局面からの手数
|
||||
StateInfo state[MAX_PLY]; // StateInfo only for the maximum number of steps
|
||||
int ply; // Trouble from the initial phase
|
||||
|
||||
PRNG prng(20171128);
|
||||
|
||||
@@ -96,13 +96,13 @@ void TestFeatures(Position& pos) {
|
||||
for (std::uint64_t i = 0; i < num_games; ++i) {
|
||||
auto index_sets = make_index_sets(pos);
|
||||
for (ply = 0; ply < MAX_PLY; ++ply) {
|
||||
MoveList<LEGAL> mg(pos); // 全合法手の生成
|
||||
MoveList<LEGAL> mg(pos); // Generate all legal hands
|
||||
|
||||
// 合法な指し手がなかった == 詰み
|
||||
// There was no legal move == Clog
|
||||
if (mg.size() == 0)
|
||||
break;
|
||||
|
||||
// 生成された指し手のなかからランダムに選び、その指し手で局面を進める。
|
||||
// Randomly choose from the generated moves and advance the phase with the moves.
|
||||
Move m = mg.begin()[prng.rand(mg.size())];
|
||||
pos.do_move(m, state[ply]);
|
||||
|
||||
@@ -113,7 +113,7 @@ void TestFeatures(Position& pos) {
|
||||
|
||||
pos.set(StartFEN, false, &si, Threads.main());
|
||||
|
||||
// 100回に1回ごとに'.'を出力(進んでいることがわかるように)
|
||||
// Output'.' every 100 times (so you can see that it's progressing)
|
||||
if ((i % 100) == 0)
|
||||
std::cout << "." << std::flush;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ void TestFeatures(Position& pos) {
|
||||
<< ") features" << std::endl;
|
||||
}
|
||||
|
||||
// 評価関数の構造を表す文字列を出力する
|
||||
// Output a string that represents the structure of the evaluation function
|
||||
void PrintInfo(std::istream& stream) {
|
||||
std::cout << "network architecture: " << GetArchitectureString() << std::endl;
|
||||
|
||||
@@ -178,7 +178,7 @@ void PrintInfo(std::istream& stream) {
|
||||
|
||||
} // namespace
|
||||
|
||||
// NNUE評価関数に関するUSI拡張コマンド
|
||||
// USI extended command for NNUE evaluation function
|
||||
void TestCommand(Position& pos, std::istream& stream) {
|
||||
std::string sub_command;
|
||||
stream >> sub_command;
|
||||
|
||||
Reference in New Issue
Block a user