Tweak byregot scoring system, add bonuses to config

This commit is contained in:
Asriel Camora
2023-07-13 12:27:45 +02:00
parent 7787ae32d5
commit 9a75542e4b
8 changed files with 80 additions and 75 deletions
+2 -2
View File
@@ -199,7 +199,7 @@ public sealed class Solver
ref var initialState = ref initialNode.State;
// expand once
if (initialState.IsComplete)
return (initialNode, initialState.CalculateScore(config.MaxStepCount) ?? 0);
return (initialNode, initialState.CalculateScore(config) ?? 0);
var poppedAction = initialState.AvailableActions.PopRandom(random);
var expandedNode = initialNode.Add(Execute(simulator, initialState.State, poppedAction, true));
@@ -225,7 +225,7 @@ public sealed class Solver
}
// store the result if a max score was reached
var score = SimulationNode.CalculateScoreForState(currentState, currentCompletionState, config.MaxStepCount) ?? 0;
var score = SimulationNode.CalculateScoreForState(currentState, currentCompletionState, config) ?? 0;
if (currentCompletionState == CompletionState.ProgressComplete)
{
if (score >= config.ScoreStorageThreshold && score >= MaxScore)