Changed a option name more descriptive, "Training" -> "PruneAtShallowDepthOnPvNode". The default value was changed but the default behavior is not changed.

Changed to set a global option prune_at_shallow_depth_on_pv_node on a callback function.
This commit is contained in:
nodchip
2020-09-09 23:38:00 +09:00
parent 073d437384
commit e63b6088ba
3 changed files with 18 additions and 6 deletions
+7 -5
View File
@@ -54,6 +54,10 @@ using std::string;
using Eval::evaluate;
using namespace Search;
#if defined(EVAL_LEARN)
bool Search::prune_at_shallow_depth_on_pv_node = false;
#endif
namespace {
// Different node types, used as a template parameter
@@ -68,8 +72,6 @@ namespace {
return Value(223 * (d - improving));
}
bool training;
// Reductions lookup table, initialized at startup
int Reductions[MAX_MOVES]; // [depth or moveNumber]
@@ -195,8 +197,6 @@ void Search::init() {
for (int i = 1; i < MAX_MOVES; ++i)
Reductions[i] = int((22.0 + std::log(Threads.size())) * std::log(i));
training = Options["Training"];
}
@@ -1011,7 +1011,9 @@ moves_loop: // When in check, search starts from here
// Step 12. Pruning at shallow depth (~200 Elo)
if ( !rootNode
&& !(training && PvNode)
#ifdef EVAL_LEARN
&& !(!prune_at_shallow_depth_on_pv_node && PvNode)
#endif
&& pos.non_pawn_material(us)
&& bestValue > VALUE_TB_LOSS_IN_MAX_PLY)
{