mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 14:27:45 +00:00
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:
+7
-5
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user