mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 07:27:46 +00:00
Merge branch 'nodchip_master' into wdl_20200824
This commit is contained in:
@@ -32,6 +32,13 @@
|
|||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "uci.h"
|
#include "uci.h"
|
||||||
|
|
||||||
|
#ifdef EVAL_LEARN
|
||||||
|
namespace Learner
|
||||||
|
{
|
||||||
|
extern bool use_raw_nnue_eval;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Eval {
|
namespace Eval {
|
||||||
|
|
||||||
bool useNNUE;
|
bool useNNUE;
|
||||||
@@ -941,6 +948,11 @@ make_v:
|
|||||||
/// evaluation of the position from the point of view of the side to move.
|
/// evaluation of the position from the point of view of the side to move.
|
||||||
|
|
||||||
Value Eval::evaluate(const Position& pos) {
|
Value Eval::evaluate(const Position& pos) {
|
||||||
|
#ifdef EVAL_LEARN
|
||||||
|
if (Learner::use_raw_nnue_eval) {
|
||||||
|
return NNUE::evaluate(pos);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (Eval::useNNUE)
|
if (Eval::useNNUE)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -133,6 +133,10 @@ double dest_score_max_value = 1.0;
|
|||||||
// 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.
|
||||||
bool convert_teacher_signal_to_winning_probability = true;
|
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
|
||||||
|
bool use_raw_nnue_eval = true;
|
||||||
// Using WDL with win rate model instead of sigmoid
|
// Using WDL with win rate model instead of sigmoid
|
||||||
bool use_wdl = false;
|
bool use_wdl = false;
|
||||||
|
|
||||||
@@ -1052,6 +1056,8 @@ void gen_sfen(Position&, istringstream& is)
|
|||||||
is >> detect_draw_by_consecutive_low_score;
|
is >> detect_draw_by_consecutive_low_score;
|
||||||
else if (token == "detect_draw_by_insufficient_mating_material")
|
else if (token == "detect_draw_by_insufficient_mating_material")
|
||||||
is >> detect_draw_by_insufficient_mating_material;
|
is >> detect_draw_by_insufficient_mating_material;
|
||||||
|
else if (token == "use_raw_nnue_eval")
|
||||||
|
is >> use_raw_nnue_eval;
|
||||||
else
|
else
|
||||||
cout << "Error! : Illegal token " << token << endl;
|
cout << "Error! : Illegal token " << token << endl;
|
||||||
}
|
}
|
||||||
@@ -3278,6 +3284,7 @@ void learn(Position&, istringstream& is)
|
|||||||
else if (option == "dest_score_min_value") is >> dest_score_min_value;
|
else if (option == "dest_score_min_value") is >> dest_score_min_value;
|
||||||
else if (option == "dest_score_max_value") is >> dest_score_max_value;
|
else if (option == "dest_score_max_value") is >> dest_score_max_value;
|
||||||
else if (option == "convert_teacher_signal_to_winning_probability") is >> convert_teacher_signal_to_winning_probability;
|
else if (option == "convert_teacher_signal_to_winning_probability") is >> convert_teacher_signal_to_winning_probability;
|
||||||
|
else if (option == "use_raw_nnue_eval") is >> use_raw_nnue_eval;
|
||||||
|
|
||||||
// Otherwise, it's a filename.
|
// Otherwise, it's a filename.
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user