diff --git a/src/learn/convert.cpp b/src/learn/convert.cpp index ebee8a96..387ac39b 100644 --- a/src/learn/convert.cpp +++ b/src/learn/convert.cpp @@ -1,5 +1,3 @@ -#define EVAL_LEARN - #if defined(EVAL_LEARN) // evaluate header for learning diff --git a/src/learn/gensfen.cpp b/src/learn/gensfen.cpp index 38bed2d5..e69528ac 100644 --- a/src/learn/gensfen.cpp +++ b/src/learn/gensfen.cpp @@ -1,6 +1,4 @@ -#define EVAL_LEARN - -#if defined(EVAL_LEARN) +#if defined(EVAL_LEARN) #include "../eval/evaluate_common.h" @@ -319,6 +317,7 @@ namespace Learner Position& pos, std::vector>& states, int ply, + int depth, vector& pv); // Min and max depths for search during gensfen @@ -662,9 +661,10 @@ namespace Learner } Value MultiThinkGenSfen::evaluate_leaf( - Position& pos, + Position& pos, std::vector>& states, int ply, + int depth, vector& pv) { auto rootColor = pos.side_to_move(); @@ -899,16 +899,16 @@ namespace Learner // Result is added after the whole game is done. pos.sfen_pack(psv.sfen); - // Get the value of evaluate() as seen from the + // Get the value of evaluate() as seen from the // root color on the leaf node of the PV line. - // I don't know the goodness and badness of using the + // I don't know the goodness and badness of using the // return value of search() as it is. // TODO: Consider using search value instead of evaluate_leaf. // Maybe give it as an option. - - // Use PV moves to reach the leaf node and use the value + + // Use PV moves to reach the leaf node and use the value // that evaluated() is called on that leaf node. - const auto leaf_value = evaluate_leaf(pos, states, ply, search_pv); + const auto leaf_value = evaluate_leaf(pos, states, ply, depth, search_pv); // If for some reason the leaf node couldn't yield an eval // we fallback to search value. diff --git a/src/learn/learner.cpp b/src/learn/learner.cpp index c897dd93..2cf9d9f5 100644 --- a/src/learn/learner.cpp +++ b/src/learn/learner.cpp @@ -13,8 +13,6 @@ // → I will not be involved in the engine because it is a problem that the GUI should assist. // etc.. -#define EVAL_LEARN - #if defined(EVAL_LEARN) #include "../eval/evaluate_common.h" @@ -98,10 +96,13 @@ namespace Learner // probabilities in the trainer. Sometimes we want to use the winning probabilities in the training // data directly. In those cases, we set false to this variable. static bool convert_teacher_signal_to_winning_probability = true; + // Use raw NNUE eval value in the Eval::evaluate(). If hybrid eval is enabled, training data // generation and training don't work well. // https://discordapp.com/channels/435943710472011776/733545871911813221/748524079761326192 - static bool use_raw_nnue_eval = true; + // This CANNOT be static since it's used elsewhere. + bool use_raw_nnue_eval = true; + // Using WDL with win rate model instead of sigmoid static bool use_wdl = false;