1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-02 09:39:36 +00:00

Do not hardcode default values of UCI variables

If a variable will be populated reading an UCI option
then do not hard code its default values.

This avoids misleadings when reading the sources.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-04-25 15:26:06 +01:00
parent 7c267587fc
commit f010b6db71
2 changed files with 23 additions and 29 deletions

View file

@ -129,18 +129,17 @@ namespace {
}; };
/// Constants and variables /// Constants and variables initialized from UCI options
// Minimum number of full depth (i.e. non-reduced) moves at PV and non-PV // Minimum number of full depth (i.e. non-reduced) moves at PV and non-PV
// nodes: // nodes
int LMRPVMoves = 15; int LMRPVMoves, LMRNonPVMoves;
int LMRNonPVMoves = 4;
// Depth limit for use of dynamic threat detection: // Depth limit for use of dynamic threat detection
Depth ThreatDepth = 5*OnePly; Depth ThreatDepth;
// Depth limit for selective search: // Depth limit for selective search
Depth SelectiveDepth = 7*OnePly; Depth SelectiveDepth;
// Use internal iterative deepening? // Use internal iterative deepening?
const bool UseIIDAtPVNodes = true; const bool UseIIDAtPVNodes = true;
@ -177,33 +176,28 @@ namespace {
const bool PruneBlockingMoves = false; const bool PruneBlockingMoves = false;
// Use futility pruning? // Use futility pruning?
bool UseQSearchFutilityPruning = true; bool UseQSearchFutilityPruning, UseFutilityPruning;
bool UseFutilityPruning = true;
// Margins for futility pruning in the quiescence search, and at frontier // Margins for futility pruning in the quiescence search, and at frontier
// and near frontier nodes // and near frontier nodes
Value FutilityMarginQS = Value(0x80); Value FutilityMarginQS;
Value FutilityMargins[6] = { Value(0x100), Value(0x200), Value(0x250), Value FutilityMargins[6] = { Value(0x100), Value(0x200), Value(0x250),
Value(0x2A0), Value(0x340), Value(0x3A0) }; Value(0x2A0), Value(0x340), Value(0x3A0) };
// Razoring // Razoring
const bool RazorAtDepthOne = false; const bool RazorAtDepthOne = false;
Depth RazorDepth = 4*OnePly; Depth RazorDepth;
Value RazorMargin = Value(0x300); Value RazorMargin;
// Last seconds noise filtering (LSN) // Last seconds noise filtering (LSN)
bool UseLSNFiltering = false; bool UseLSNFiltering;
bool looseOnTime = false; bool looseOnTime = false;
int LSNTime = 4 * 1000; // In milliseconds int LSNTime; // In milliseconds
Value LSNValue = Value(0x200); Value LSNValue;
// Extensions. Array index 0 is used at non-PV nodes, index 1 at PV nodes. // Extensions. Array index 0 is used at non-PV nodes, index 1 at PV nodes.
Depth CheckExtension[2] = {OnePly, OnePly}; Depth CheckExtension[2], SingleReplyExtension[2], PawnPushTo7thExtension[2];
Depth SingleReplyExtension[2] = {OnePly / 2, OnePly / 2}; Depth PassedPawnExtension[2], PawnEndgameExtension[2], MateThreatExtension[2];
Depth PawnPushTo7thExtension[2] = {OnePly / 2, OnePly / 2};
Depth PassedPawnExtension[2] = {Depth(0), Depth(0)};
Depth PawnEndgameExtension[2] = {OnePly, OnePly};
Depth MateThreatExtension[2] = {Depth(0), Depth(0)};
// Search depth at iteration 1 // Search depth at iteration 1
const Depth InitialDepth = OnePly /*+ OnePly/2*/; const Depth InitialDepth = OnePly /*+ OnePly/2*/;
@ -221,7 +215,7 @@ namespace {
int BestMoveChangesByIteration[PLY_MAX_PLUS_2]; int BestMoveChangesByIteration[PLY_MAX_PLUS_2];
// MultiPV mode // MultiPV mode
int MultiPV = 1; int MultiPV;
// Time managment variables // Time managment variables
int SearchStartTime; int SearchStartTime;
@ -241,15 +235,15 @@ namespace {
int ExactMaxTime; int ExactMaxTime;
// Show current line? // Show current line?
bool ShowCurrentLine = false; bool ShowCurrentLine;
// Log file // Log file
bool UseLogFile = false; bool UseLogFile;
std::ofstream LogFile; std::ofstream LogFile;
// MP related variables // MP related variables
Depth MinimumSplitDepth = 4*OnePly; Depth MinimumSplitDepth;
int MaxThreadsPerSplitPoint = 4; int MaxThreadsPerSplitPoint;
Thread Threads[THREAD_MAX]; Thread Threads[THREAD_MAX];
Lock MPLock; Lock MPLock;
bool AllThreadsShouldExit = false; bool AllThreadsShouldExit = false;

View file

@ -38,7 +38,7 @@
//// Variables //// Variables
//// ////
bool Chess960 = false; bool Chess960;
//// ////