Add MaxThreadCount default
This commit is contained in:
@@ -43,6 +43,9 @@ public readonly record struct SolverConfig
|
||||
ExplorationConstant = 4;
|
||||
MaxStepCount = 30;
|
||||
MaxRolloutStepCount = 99;
|
||||
// Use 80% of all cores if less than 20 cores are available, otherwise use all but 4 cores. Keep at least 1 core.
|
||||
MaxThreadCount = Math.Max(1, Math.Max(Environment.ProcessorCount - 4, (int)MathF.Floor(Environment.ProcessorCount * 0.8f)));
|
||||
// Use 32 forks at minimum, or the number of cores, whichever is higher.
|
||||
ForkCount = Math.Max(Environment.ProcessorCount, 32);
|
||||
FurcatedActionCount = ForkCount / 2;
|
||||
StrictActions = true;
|
||||
|
||||
Reference in New Issue
Block a user