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

View File

@@ -3,7 +3,7 @@
#if defined(EVAL_NNUE) || defined(EVAL_LEARN)
// BonaPiecemirror(左右反転)やinverse(盤上の180度回転)させた駒を得るためのツール類。
// BonaPiece's mirror (horizontal flip) and inverse (180° on the board) tools to get pieces.
#include "../types.h"
#include "../evaluate.h"
@@ -15,33 +15,33 @@ namespace Eval
// tables
// -------------------------------------------------
// --- BonaPieceに対してMirrorInverseを提供する。
// --- Provide Mirror and Inverse to BonaPiece.
// これらの配列は、init()init_mir_inv_tables();を呼び出すと初期化される。
// このテーブルのみを評価関数のほうから使いたいときは、評価関数の初期化のときに
// init_mir_inv_tables()を呼び出すと良い。
// これらの配列は、以下のKK/KKP/KPPクラスから参照される。
// These arrays are initialized by calling init() or init_mir_inv_tables();.
// If you want to use only this table from the evaluation function,
// Call init_mir_inv_tables().
// These arrays are referenced from the KK/KKP/KPP classes below.
// あるBonaPieceを相手側から見たときの値を返す
// Returns the value when a certain BonaPiece is seen from the other side
extern Eval::BonaPiece inv_piece(Eval::BonaPiece p);
// 盤面上のあるBonaPieceをミラーした位置にあるものを返す。
// Returns the one at the position where a BonaPiece on the board is mirrored.
extern Eval::BonaPiece mir_piece(Eval::BonaPiece p);
// mir_piece/inv_pieceの初期化のときに呼び出されるcallback
// fe_endをユーザー側で拡張するときに用いる。
// この初期化のときに必要なのでinv_piece_inv_piece_を公開している。
// mir_piece_init_functionが呼び出されたタイミングで、fe_old_endまでは
// これらのテーブルの初期化が完了していることが保証されている。
// callback called when initializing mir_piece/inv_piece
// Used when extending fe_end on the user side.
// Inv_piece_ and inv_piece_ are exposed because they are necessary for this initialization.
// At the timing when mir_piece_init_function is called, until fe_old_end
// It is guaranteed that these tables have been initialized.
extern std::function<void()> mir_piece_init_function;
extern int16_t mir_piece_[Eval::fe_end];
extern int16_t inv_piece_[Eval::fe_end];
// この関数を明示的に呼び出すか、init()を呼び出すかしたときに、上のテーブルが初期化される。
// The table above will be initialized when you call this function explicitly or call init().
extern void init_mir_inv_tables();
}
#endif // defined(EVAL_NNUE) || defined(EVAL_LEARN)
#endif
#endif