Re enable random actions

This commit is contained in:
Asriel Camora
2023-06-21 11:42:22 -07:00
parent f3445f3cb9
commit 0f2267dabf
3 changed files with 22 additions and 24 deletions
+12 -19
View File
@@ -3,27 +3,20 @@ using System.Runtime.InteropServices;
namespace Craftimizer.Solver.Crafty;
[StructLayout(LayoutKind.Auto)]
public readonly struct SolverConfig
public readonly record struct SolverConfig
{
public readonly int Iterations;
public readonly float ScoreStorageThreshold;
public readonly float MaxScoreWeightingConstant;
public readonly float ExplorationConstant;
public readonly int MaxStepCount;
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 SolverConfig() : this(30000, 1f, 0.1f, 4, 25) { }
public SolverConfig(
int iterations = 30000,
float scoreStorageThreshold = 1f,
float maxScoreWeightingConstant = 0.1f,
float explorationConstant = 4f,
int maxStepCount = 25)
public SolverConfig()
{
Iterations = iterations;
ScoreStorageThreshold = scoreStorageThreshold;
MaxScoreWeightingConstant = maxScoreWeightingConstant;
ExplorationConstant = explorationConstant;
MaxStepCount = maxStepCount;
Iterations = 30000;
ScoreStorageThreshold = 1f;
MaxScoreWeightingConstant = 0.1f;
ExplorationConstant = 4f;
MaxStepCount = 25;
}
}