Fix great strides bug
This commit is contained in:
+4
-2
@@ -4,14 +4,15 @@ using BenchmarkDotNet.Diagnostics.dotTrace;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using Craftimizer.Simulator;
|
||||
using Craftimizer.Solver;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Craftimizer.Benchmark;
|
||||
|
||||
[SimpleJob(RuntimeMoniker.Net80, baseline: true)]
|
||||
[SimpleJob(RuntimeMoniker.Net90)]
|
||||
//[SimpleJob(RuntimeMoniker.Net90)]
|
||||
[MinColumn, Q1Column, Q3Column, MaxColumn]
|
||||
//[DotTraceDiagnoser]
|
||||
[MemoryDiagnoser]
|
||||
//[MemoryDiagnoser]
|
||||
[DisassemblyDiagnoser(maxDepth: 500, exportGithubMarkdown: false, exportHtml: true)]
|
||||
public class Bench
|
||||
{
|
||||
@@ -109,6 +110,7 @@ public class Bench
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
[MethodImpl(MethodImplOptions.NoInlining)]
|
||||
public (float MaxScore, SolverSolution Solution) Solve()
|
||||
{
|
||||
var config = new MCTSConfig(Config.Data);
|
||||
|
||||
@@ -3,7 +3,6 @@ namespace Craftimizer.Simulator.Actions;
|
||||
internal sealed class GreatStrides() : BaseBuffAction(
|
||||
ActionCategory.Buffs, 21, 260,
|
||||
EffectType.GreatStrides, duration: 3,
|
||||
increasesStepCount: false,
|
||||
defaultCPCost: 32)
|
||||
{
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public struct SimulationNode(in SimulationState state, ActionType? action, Compl
|
||||
public readonly float? CalculateScore(in MCTSConfig config) =>
|
||||
CalculateScoreForState(State, SimulationCompletionState, config);
|
||||
|
||||
public static float? CalculateScoreForState(in SimulationState state, CompletionState completionState, MCTSConfig config)
|
||||
public static float? CalculateScoreForState(in SimulationState state, CompletionState completionState, in MCTSConfig config)
|
||||
{
|
||||
if (completionState != CompletionState.ProgressComplete)
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user