Translation

Files in /eval, /extra, & /learn - comments translated from Japanese to English
This commit is contained in:
FireFather
2020-06-28 03:12:55 +02:00
parent 2f8c692caa
commit aea08de018
54 changed files with 1903 additions and 1905 deletions
+11 -11
View File
@@ -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;