Update solver scoring; remove byregot adjustment
This commit is contained in:
+37
-1
@@ -11,6 +11,7 @@ public struct ActionSet
|
||||
|
||||
public static readonly ActionType[] AcceptedActions = new[]
|
||||
{
|
||||
#if !IS_TRACE
|
||||
ActionType.StandardTouchCombo,
|
||||
ActionType.AdvancedTouchCombo,
|
||||
ActionType.FocusedTouchCombo,
|
||||
@@ -40,6 +41,36 @@ public struct ActionSet
|
||||
ActionType.Observe,
|
||||
ActionType.MastersMend,
|
||||
ActionType.BasicTouch,
|
||||
#else
|
||||
//ActionType.BasicSynthesis,
|
||||
ActionType.BasicTouch,
|
||||
ActionType.MastersMend,
|
||||
ActionType.Observe,
|
||||
ActionType.WasteNot,
|
||||
ActionType.Veneration,
|
||||
ActionType.StandardTouch,
|
||||
ActionType.GreatStrides,
|
||||
ActionType.Innovation,
|
||||
ActionType.BasicSynthesis,
|
||||
ActionType.WasteNot2,
|
||||
ActionType.ByregotsBlessing,
|
||||
ActionType.MuscleMemory,
|
||||
//ActionType.CarefulSynthesis,
|
||||
ActionType.Manipulation,
|
||||
ActionType.PrudentTouch,
|
||||
ActionType.FocusedSynthesis,
|
||||
ActionType.FocusedTouch,
|
||||
ActionType.Reflect,
|
||||
ActionType.PreparatoryTouch,
|
||||
//ActionType.Groundwork,
|
||||
ActionType.DelicateSynthesis,
|
||||
ActionType.TrainedEye,
|
||||
ActionType.CarefulSynthesis,
|
||||
ActionType.AdvancedTouch,
|
||||
ActionType.Groundwork,
|
||||
ActionType.PrudentSynthesis,
|
||||
ActionType.TrainedFinesse,
|
||||
#endif
|
||||
};
|
||||
|
||||
public static readonly int[] AcceptedActionsLUT;
|
||||
@@ -64,7 +95,12 @@ public struct ActionSet
|
||||
}
|
||||
[Pure]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static ActionType ToAction(int index) => AcceptedActions[index];
|
||||
private static ActionType ToAction(int index)
|
||||
{
|
||||
if (index < 0 || index >= AcceptedActions.Length)
|
||||
throw new ArgumentOutOfRangeException(nameof(index), index, $"Index {index} is out of range for {nameof(ActionSet)}.");
|
||||
return AcceptedActions[index];
|
||||
}
|
||||
[Pure]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static uint ToMask(ActionType action) => 1u << (FromAction(action) + 1);
|
||||
|
||||
@@ -46,6 +46,9 @@ public struct SimulationNode
|
||||
if (completionState != CompletionState.ProgressComplete)
|
||||
return null;
|
||||
|
||||
if (state.Input.Recipe.MaxQuality == 0)
|
||||
return 1f - ((float)(state.ActionCount + 1) / config.MaxStepCount);
|
||||
|
||||
static float Apply(float bonus, float value, float target) =>
|
||||
bonus * (target > 0 ? Math.Min(1f, value / target) : 1);
|
||||
|
||||
@@ -55,7 +58,7 @@ public struct SimulationNode
|
||||
state.Input.Recipe.MaxProgress
|
||||
);
|
||||
|
||||
var byregotBonus = CanByregot(state) ? (state.ActiveEffects.InnerQuiet * .2f + 1) * state.Input.BaseQualityGain : 0;
|
||||
var byregotBonus = 0;// CanByregot(state) ? (state.ActiveEffects.InnerQuiet * .2f + 1) * state.Input.BaseQualityGain : 0;
|
||||
var qualityScore = Apply(
|
||||
config.ScoreQuality,
|
||||
state.Quality + byregotBonus,
|
||||
@@ -75,7 +78,7 @@ public struct SimulationNode
|
||||
);
|
||||
|
||||
var fewerStepsScore =
|
||||
config.ScoreSteps * (1f - (float)(state.ActionCount + 1) / config.MaxStepCount);
|
||||
config.ScoreSteps * (1f - ((float)(state.ActionCount + 1) / config.MaxStepCount));
|
||||
|
||||
return progressScore + qualityScore + durabilityScore + cpScore + fewerStepsScore;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user