mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 11:36:51 +08:00
Merge branch 'master' of github.com:official-stockfish/Stockfish into nnue-player-merge
# Conflicts: # README.md # Readme.md # src/Makefile # src/evaluate.cpp # src/evaluate.h # src/misc.cpp # src/nnue/architectures/halfkp_256x2-32-32.h # src/nnue/evaluate_nnue.cpp # src/nnue/evaluate_nnue.h # src/nnue/features/feature_set.h # src/nnue/features/features_common.h # src/nnue/features/half_kp.cpp # src/nnue/features/half_kp.h # src/nnue/features/index_list.h # src/nnue/layers/affine_transform.h # src/nnue/layers/clipped_relu.h # src/nnue/layers/input_slice.h # src/nnue/nnue_accumulator.h # src/nnue/nnue_architecture.h # src/nnue/nnue_common.h # src/nnue/nnue_feature_transformer.h # src/position.cpp # src/position.h # src/types.h # src/ucioption.cpp # stockfish.md
This commit is contained in:
@@ -627,7 +627,7 @@ void MultiThinkGenSfen::thread_worker(size_t thread_id)
|
||||
// If the depth is 8 or more, it seems faster not to calculate this difference.
|
||||
#if defined(EVAL_NNUE)
|
||||
if (depth < 8)
|
||||
Eval::evaluate_with_no_return(pos);
|
||||
Eval::NNUE::update_eval(pos);
|
||||
#endif // defined(EVAL_NNUE)
|
||||
}
|
||||
|
||||
@@ -825,7 +825,7 @@ void MultiThinkGenSfen::thread_worker(size_t thread_id)
|
||||
pos.do_move(m, states[ply]);
|
||||
|
||||
// Call node evaluate() for each difference calculation.
|
||||
Eval::evaluate_with_no_return(pos);
|
||||
Eval::NNUE::update_eval(pos);
|
||||
|
||||
} // for (int ply = 0; ; ++ply)
|
||||
|
||||
@@ -1697,7 +1697,7 @@ void LearnerThink::calc_loss(size_t thread_id, uint64_t done)
|
||||
for (size_t i = 0; i < pv.size(); ++i)
|
||||
{
|
||||
pos.do_move(pv[i], states[i]);
|
||||
Eval::evaluate_with_no_return(pos);
|
||||
Eval::NNUE::update_eval(pos);
|
||||
}
|
||||
shallow_value = (rootColor == pos.side_to_move()) ? Eval::evaluate(pos) : -Eval::evaluate(pos);
|
||||
for (auto it = pv.rbegin(); it != pv.rend(); ++it)
|
||||
@@ -2106,7 +2106,7 @@ void LearnerThink::thread_worker(size_t thread_id)
|
||||
pos.do_move(m, state[ply++]);
|
||||
|
||||
// Since the value of evaluate in leaf is used, the difference is updated.
|
||||
Eval::evaluate_with_no_return(pos);
|
||||
Eval::NNUE::update_eval(pos);
|
||||
}
|
||||
|
||||
if (illegal_move) {
|
||||
@@ -2135,9 +2135,6 @@ void LearnerThink::thread_worker(size_t thread_id)
|
||||
// Write evaluation function file.
|
||||
bool LearnerThink::save(bool is_final)
|
||||
{
|
||||
// Calculate and output check sum before saving. (To check if it matches the next time)
|
||||
std::cout << "Check Sum = "<< std::hex << Eval::calc_check_sum() << std::dec << std::endl;
|
||||
|
||||
// Each time you save, change the extension part of the file name like "0","1","2",..
|
||||
// (Because I want to compare the winning rate for each evaluation function parameter later)
|
||||
|
||||
@@ -3089,14 +3086,14 @@ void learn(Position&, istringstream& is)
|
||||
}
|
||||
if (use_convert_plain)
|
||||
{
|
||||
init_nnue(true);
|
||||
Eval::init_NNUE();
|
||||
cout << "convert_plain.." << endl;
|
||||
convert_plain(filenames, output_file_name);
|
||||
return;
|
||||
}
|
||||
if (use_convert_bin)
|
||||
{
|
||||
init_nnue(true);
|
||||
Eval::init_NNUE();
|
||||
cout << "convert_bin.." << endl;
|
||||
convert_bin(filenames,output_file_name, ply_minimum, ply_maximum, interpolate_eval);
|
||||
return;
|
||||
@@ -3104,7 +3101,7 @@ void learn(Position&, istringstream& is)
|
||||
}
|
||||
if (use_convert_bin_from_pgn_extract)
|
||||
{
|
||||
init_nnue(true);
|
||||
Eval::init_NNUE();
|
||||
cout << "convert_bin_from_pgn-extract.." << endl;
|
||||
convert_bin_from_pgn_extract(filenames, output_file_name, pgn_eval_side_to_move);
|
||||
return;
|
||||
@@ -3170,7 +3167,7 @@ void learn(Position&, istringstream& is)
|
||||
cout << "init.." << endl;
|
||||
|
||||
// Read evaluation function parameters
|
||||
init_nnue(true);
|
||||
Eval::init_NNUE();
|
||||
|
||||
#if !defined(EVAL_NNUE)
|
||||
cout << "init_grad.." << endl;
|
||||
|
||||
Reference in New Issue
Block a user