From 1bc7c46e03a923cc36c857d47191ca1568988ab6 Mon Sep 17 00:00:00 2001 From: Asriel Camora Date: Sun, 28 Jul 2024 19:37:15 -0700 Subject: [PATCH] Extra scoring changes, mark expert recipes as difficult --- Craftimizer/Windows/Settings.cs | 10 +++++----- Solver/Simulator.cs | 2 +- Solver/SolverConfig.cs | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Craftimizer/Windows/Settings.cs b/Craftimizer/Windows/Settings.cs index 4ec59c7..909579e 100644 --- a/Craftimizer/Windows/Settings.cs +++ b/Craftimizer/Windows/Settings.cs @@ -674,7 +674,7 @@ public sealed class Settings : Window, IDisposable "Amount of weight to give to the craft's progress.", config.ScoreProgress, 0, - 1, + 100, v => config = config with { ScoreProgress = v }, ref isDirty ); @@ -684,7 +684,7 @@ public sealed class Settings : Window, IDisposable "Amount of weight to give to the craft's quality.", config.ScoreQuality, 0, - 1, + 100, v => config = config with { ScoreQuality = v }, ref isDirty ); @@ -694,7 +694,7 @@ public sealed class Settings : Window, IDisposable "Amount of weight to give to the craft's remaining durability.", config.ScoreDurability, 0, - 1, + 100, v => config = config with { ScoreDurability = v }, ref isDirty ); @@ -704,7 +704,7 @@ public sealed class Settings : Window, IDisposable "Amount of weight to give to the craft's remaining CP.", config.ScoreCP, 0, - 1, + 100, v => config = config with { ScoreCP = v }, ref isDirty ); @@ -715,7 +715,7 @@ public sealed class Settings : Window, IDisposable "the step count, the higher the score.", config.ScoreSteps, 0, - 1, + 100, v => config = config with { ScoreSteps = v }, ref isDirty ); diff --git a/Solver/Simulator.cs b/Solver/Simulator.cs index b11f73b..7e63d3d 100644 --- a/Solver/Simulator.cs +++ b/Solver/Simulator.cs @@ -67,7 +67,7 @@ internal sealed class Simulator : SimulatorNoRandom if (action == ActionType.TrainedEye) return baseAction.CouldUse(this); - var isDifficult = Input.Stats.Level - Input.Recipe.ClassJobLevel < 10; + var isDifficult = Input.Stats.Level - Input.Recipe.ClassJobLevel < 10 || Input.Recipe.IsExpert; // don't allow quality moves under Muscle Memory for difficult crafts if (isDifficult && diff --git a/Solver/SolverConfig.cs b/Solver/SolverConfig.cs index eff8969..d43b49f 100644 --- a/Solver/SolverConfig.cs +++ b/Solver/SolverConfig.cs @@ -44,18 +44,18 @@ 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 75% of all cores if less than 12 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.75f))); // Use 32 forks at minimum, or the number of cores, whichever is higher. ForkCount = Math.Max(Environment.ProcessorCount, 32); FurcatedActionCount = ForkCount / 2; StrictActions = true; - ScoreProgress = .20f; - ScoreQuality = .65f; - ScoreDurability = .05f; - ScoreCP = .05f; - ScoreSteps = .05f; + ScoreProgress = 10; + ScoreQuality = 80; + ScoreDurability = 2; + ScoreCP = 3; + ScoreSteps = 5; ActionPool = DeterministicActionPool; Algorithm = SolverAlgorithm.StepwiseGenetic;