Get rid of ActionPool, use ulong for ActionSet
This commit is contained in:
+36
-2
@@ -1,3 +1,4 @@
|
||||
using Craftimizer.Simulator.Actions;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Craftimizer.Solver;
|
||||
@@ -31,7 +32,7 @@ public readonly record struct SolverConfig
|
||||
public float ScoreCP { get; init; }
|
||||
public float ScoreSteps { get; init; }
|
||||
|
||||
public ActionPool ActionPool { get; init; }
|
||||
public ActionType[] ActionPool { get; init; }
|
||||
public SolverAlgorithm Algorithm { get; init; }
|
||||
|
||||
public SolverConfig()
|
||||
@@ -55,10 +56,43 @@ public readonly record struct SolverConfig
|
||||
ScoreCP = .05f;
|
||||
ScoreSteps = .05f;
|
||||
|
||||
ActionPool = ActionPool.Default;
|
||||
ActionPool = DefaultActionPool;
|
||||
Algorithm = SolverAlgorithm.StepwiseFurcated;
|
||||
}
|
||||
|
||||
public static ActionType[] OptimizeActionPool(IEnumerable<ActionType> actions) =>
|
||||
actions.Order().ToArray();
|
||||
|
||||
public static readonly ActionType[] DefaultActionPool = OptimizeActionPool(new[]
|
||||
{
|
||||
ActionType.StandardTouchCombo,
|
||||
ActionType.AdvancedTouchCombo,
|
||||
ActionType.FocusedTouchCombo,
|
||||
ActionType.FocusedSynthesisCombo,
|
||||
ActionType.TrainedFinesse,
|
||||
ActionType.PrudentSynthesis,
|
||||
ActionType.Groundwork,
|
||||
ActionType.AdvancedTouch,
|
||||
ActionType.CarefulSynthesis,
|
||||
ActionType.TrainedEye,
|
||||
ActionType.DelicateSynthesis,
|
||||
ActionType.PreparatoryTouch,
|
||||
ActionType.Reflect,
|
||||
ActionType.PrudentTouch,
|
||||
ActionType.Manipulation,
|
||||
ActionType.MuscleMemory,
|
||||
ActionType.ByregotsBlessing,
|
||||
ActionType.WasteNot2,
|
||||
ActionType.BasicSynthesis,
|
||||
ActionType.Innovation,
|
||||
ActionType.GreatStrides,
|
||||
ActionType.StandardTouch,
|
||||
ActionType.Veneration,
|
||||
ActionType.WasteNot,
|
||||
ActionType.MastersMend,
|
||||
ActionType.BasicTouch,
|
||||
});
|
||||
|
||||
public static readonly SolverConfig SimulatorDefault = new SolverConfig() with
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user