mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 02:47:45 +00:00
Add a nodes bound for the multiPV search in "generate_training_data".
This commit is contained in:
@@ -44,6 +44,8 @@ Currently the following options are available:
|
|||||||
|
|
||||||
`random_multi_pv_depth` - the depth to use for multiPV search for random move. Default: `depth2`.
|
`random_multi_pv_depth` - the depth to use for multiPV search for random move. Default: `depth2`.
|
||||||
|
|
||||||
|
`random_multi_pv_nodes` - the maximum number of nodes for a multiPV search for random move. Default: `nodes`.
|
||||||
|
|
||||||
`write_min_ply` - minimum ply for which the training data entry will be emitted. Default: 16.
|
`write_min_ply` - minimum ply for which the training data entry will be emitted. Default: 16.
|
||||||
|
|
||||||
`write_max_ply` - maximum ply for which the training data entry will be emitted. Default: 400.
|
`write_max_ply` - maximum ply for which the training data entry will be emitted. Default: 400.
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ namespace Stockfish::Tools
|
|||||||
int random_multi_pv = 0;
|
int random_multi_pv = 0;
|
||||||
int random_multi_pv_diff = 32000;
|
int random_multi_pv_diff = 32000;
|
||||||
int random_multi_pv_depth = -1;
|
int random_multi_pv_depth = -1;
|
||||||
|
uint64_t random_multi_pv_nodes = 0;
|
||||||
|
|
||||||
// The minimum and maximum ply (number of steps from
|
// The minimum and maximum ply (number of steps from
|
||||||
// the initial phase) of the sfens to write out.
|
// the initial phase) of the sfens to write out.
|
||||||
@@ -108,7 +109,11 @@ namespace Stockfish::Tools
|
|||||||
|
|
||||||
num_threads = Options["Threads"];
|
num_threads = Options["Threads"];
|
||||||
|
|
||||||
random_multi_pv_depth = std::max(search_depth_max, random_multi_pv_depth);
|
if (random_multi_pv_depth == -1)
|
||||||
|
random_multi_pv_depth = search_depth_max;
|
||||||
|
|
||||||
|
if (random_multi_pv_nodes == 0)
|
||||||
|
random_multi_pv_nodes = nodes;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -633,7 +638,7 @@ namespace Stockfish::Tools
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Search::search(pos, params.random_multi_pv_depth, params.random_multi_pv);
|
Search::search(pos, params.random_multi_pv_depth, params.random_multi_pv, params.random_multi_pv_nodes);
|
||||||
|
|
||||||
// Select one from the top N hands of root Moves
|
// Select one from the top N hands of root Moves
|
||||||
auto& rm = pos.this_thread()->rootMoves;
|
auto& rm = pos.this_thread()->rootMoves;
|
||||||
@@ -828,6 +833,8 @@ namespace Stockfish::Tools
|
|||||||
is >> params.random_multi_pv_diff;
|
is >> params.random_multi_pv_diff;
|
||||||
else if (token == "random_multi_pv_depth")
|
else if (token == "random_multi_pv_depth")
|
||||||
is >> params.random_multi_pv_depth;
|
is >> params.random_multi_pv_depth;
|
||||||
|
else if (token == "random_multi_pv_nodes")
|
||||||
|
is >> params.random_multi_pv_nodes;
|
||||||
else if (token == "write_min_ply")
|
else if (token == "write_min_ply")
|
||||||
is >> params.write_minply;
|
is >> params.write_minply;
|
||||||
else if (token == "write_max_ply")
|
else if (token == "write_max_ply")
|
||||||
@@ -913,6 +920,7 @@ namespace Stockfish::Tools
|
|||||||
<< " - random_multi_pv = " << params.random_multi_pv << endl
|
<< " - random_multi_pv = " << params.random_multi_pv << endl
|
||||||
<< " - random_multi_pv_diff = " << params.random_multi_pv_diff << endl
|
<< " - random_multi_pv_diff = " << params.random_multi_pv_diff << endl
|
||||||
<< " - random_multi_pv_depth = " << params.random_multi_pv_depth << endl
|
<< " - random_multi_pv_depth = " << params.random_multi_pv_depth << endl
|
||||||
|
<< " - random_multi_pv_nodes = " << params.random_multi_pv_nodes << endl
|
||||||
<< " - write_min_ply = " << params.write_minply << endl
|
<< " - write_min_ply = " << params.write_minply << endl
|
||||||
<< " - write_max_ply = " << params.write_maxply << endl
|
<< " - write_max_ply = " << params.write_maxply << endl
|
||||||
<< " - book = " << params.book << endl
|
<< " - book = " << params.book << endl
|
||||||
|
|||||||
Reference in New Issue
Block a user