This feature makes sense during development, but
It doesn't seem to make sense for normal users.
Also fix a possible race where the GUI adjudicates
the game a fraction of second before the engine sets
looseOnTime flag so that it will bogusly waits until
it ran out of time at the beginning of the next new game.
The fix is to always reset looseOnTime at the beginning
of a new game.
Race condition spotted by Tord.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
// Depth limit for use of dynamic threat detection
Depth ThreatDepth; // heavy SMP read access
// Depth limit for use of dynamic threat detection
Depth ThreatDepth; // heavy SMP read access
+ // Last seconds noise filtering (LSN)
+ const bool UseLSNFiltering = true;
+ const int LSNTime = 4000; // In milliseconds
+ const Value LSNValue = value_from_centipawns(200);
+ bool looseOnTime = false;
+
// Extensions. Array index 0 is used at non-PV nodes, index 1 at PV nodes.
// There is heavy SMP read access on these arrays
Depth CheckExtension[2], SingleReplyExtension[2], PawnPushTo7thExtension[2];
// Extensions. Array index 0 is used at non-PV nodes, index 1 at PV nodes.
// There is heavy SMP read access on these arrays
Depth CheckExtension[2], SingleReplyExtension[2], PawnPushTo7thExtension[2];
// Read UCI option values
TT.set_size(get_option_value_int("Hash"));
if (button_was_pressed("Clear Hash"))
// Read UCI option values
TT.set_size(get_option_value_int("Hash"));
if (button_was_pressed("Clear Hash"))
+ looseOnTime = false; // reset at the beginning of a new game
+ }
bool PonderingEnabled = get_option_value_bool("Ponder");
MultiPV = get_option_value_int("MultiPV");
bool PonderingEnabled = get_option_value_bool("Ponder");
MultiPV = get_option_value_int("MultiPV");
if (UseLogFile)
LogFile.open(get_option_value_string("Search Log Filename").c_str(), std::ios::out | std::ios::app);
if (UseLogFile)
LogFile.open(get_option_value_string("Search Log Filename").c_str(), std::ios::out | std::ios::app);
- bool UseLSNFiltering = get_option_value_bool("LSN filtering");
- int LSNTime = get_option_value_int("LSN Time Margin (sec)") * 1000;
- Value LSNValue = value_from_centipawns(get_option_value_int("LSN Value Margin"));
-
MinimumSplitDepth = get_option_value_int("Minimum Split Depth") * OnePly;
MaxThreadsPerSplitPoint = get_option_value_int("Maximum Number of Threads per Split Point");
MinimumSplitDepth = get_option_value_int("Minimum Split Depth") * OnePly;
MaxThreadsPerSplitPoint = get_option_value_int("Maximum Number of Threads per Split Point");
// We're ready to start thinking. Call the iterative deepening loop function
// We're ready to start thinking. Call the iterative deepening loop function
- static bool looseOnTime = false;
-
// FIXME we really need to cleanup all this LSN ugliness
if (!looseOnTime)
{
// FIXME we really need to cleanup all this LSN ugliness
if (!looseOnTime)
{
o["Full Depth Moves (PV nodes)"] = Option(14, 1, 100);
o["Full Depth Moves (non-PV nodes)"] = Option(3, 1, 100);
o["Threat Depth"] = Option(5, 0, 100);
o["Full Depth Moves (PV nodes)"] = Option(14, 1, 100);
o["Full Depth Moves (non-PV nodes)"] = Option(3, 1, 100);
o["Threat Depth"] = Option(5, 0, 100);
- o["LSN filtering"] = Option(true);
- o["LSN Time Margin (sec)"] = Option(4, 1, 10);
- o["LSN Value Margin"] = Option(200, 100, 600);
o["Randomness"] = Option(0, 0, 10);
o["Minimum Split Depth"] = Option(4, 4, 7);
o["Maximum Number of Threads per Split Point"] = Option(5, 4, 8);
o["Randomness"] = Option(0, 0, 10);
o["Minimum Split Depth"] = Option(4, 4, 7);
o["Maximum Number of Threads per Split Point"] = Option(5, 4, 8);