Files
Craftimizer/Solver/Crafty/SolverConfig.cs
T
2023-07-08 14:38:35 +02:00

29 lines
867 B
C#

using System.Runtime.InteropServices;
namespace Craftimizer.Solver.Crafty;
[StructLayout(LayoutKind.Auto)]
public readonly record struct SolverConfig
{
public int Iterations { get; init; }
public float ScoreStorageThreshold { get; init; }
public float MaxScoreWeightingConstant { get; init; }
public float ExplorationConstant { get; init; }
public int MaxStepCount { get; init; }
public int MaxRolloutStepCount { get; init; }
public int ForkCount { get; init; }
public bool StrictActions { get; init; }
public SolverConfig()
{
Iterations = 300000;
ScoreStorageThreshold = 1f;
MaxScoreWeightingConstant = 0.1f;
ExplorationConstant = 4;
MaxStepCount = 25;
MaxRolloutStepCount = MaxStepCount;
ForkCount = Environment.ProcessorCount;
StrictActions = true;
}
}