Fix compilation issues.

This commit is contained in:
Tomasz Sobczyk
2020-09-03 11:45:14 +02:00
committed by nodchip
parent c17f2b15fd
commit 9d5dc3d33f
3 changed files with 13 additions and 14 deletions
-2
View File
@@ -1,5 +1,3 @@
#define EVAL_LEARN
#if defined(EVAL_LEARN) #if defined(EVAL_LEARN)
// evaluate header for learning // evaluate header for learning
+9 -9
View File
@@ -1,6 +1,4 @@
#define EVAL_LEARN #if defined(EVAL_LEARN)
#if defined(EVAL_LEARN)
#include "../eval/evaluate_common.h" #include "../eval/evaluate_common.h"
@@ -319,6 +317,7 @@ namespace Learner
Position& pos, Position& pos,
std::vector<StateInfo, AlignedAllocator<StateInfo>>& states, std::vector<StateInfo, AlignedAllocator<StateInfo>>& states,
int ply, int ply,
int depth,
vector<Move>& pv); vector<Move>& pv);
// Min and max depths for search during gensfen // Min and max depths for search during gensfen
@@ -662,9 +661,10 @@ namespace Learner
} }
Value MultiThinkGenSfen::evaluate_leaf( Value MultiThinkGenSfen::evaluate_leaf(
Position& pos, Position& pos,
std::vector<StateInfo, AlignedAllocator<StateInfo>>& states, std::vector<StateInfo, AlignedAllocator<StateInfo>>& states,
int ply, int ply,
int depth,
vector<Move>& pv) vector<Move>& pv)
{ {
auto rootColor = pos.side_to_move(); auto rootColor = pos.side_to_move();
@@ -899,16 +899,16 @@ namespace Learner
// Result is added after the whole game is done. // Result is added after the whole game is done.
pos.sfen_pack(psv.sfen); 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. // 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. // return value of search() as it is.
// TODO: Consider using search value instead of evaluate_leaf. // TODO: Consider using search value instead of evaluate_leaf.
// Maybe give it as an option. // 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. // 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 // If for some reason the leaf node couldn't yield an eval
// we fallback to search value. // we fallback to search value.
+4 -3
View File
@@ -13,8 +13,6 @@
// → I will not be involved in the engine because it is a problem that the GUI should assist. // → I will not be involved in the engine because it is a problem that the GUI should assist.
// etc.. // etc..
#define EVAL_LEARN
#if defined(EVAL_LEARN) #if defined(EVAL_LEARN)
#include "../eval/evaluate_common.h" #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 // 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. // data directly. In those cases, we set false to this variable.
static bool convert_teacher_signal_to_winning_probability = true; 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 // Use raw NNUE eval value in the Eval::evaluate(). If hybrid eval is enabled, training data
// generation and training don't work well. // generation and training don't work well.
// https://discordapp.com/channels/435943710472011776/733545871911813221/748524079761326192 // 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 // Using WDL with win rate model instead of sigmoid
static bool use_wdl = false; static bool use_wdl = false;