Fix concurrency, add forked simulations

This commit is contained in:
Asriel Camora
2023-07-07 18:13:27 +02:00
parent 7d8fc9ff8f
commit 3ab50d389e
6 changed files with 84 additions and 14 deletions
+5 -3
View File
@@ -46,14 +46,16 @@ internal static class Program
var config = new SolverConfig()
{
Iterations = 1_000_000,
Iterations = 100_000,
ThreadCount = 8,
};
Debugger.Break();
var s = Stopwatch.StartNew();
if (true)
_ = SolverUtils.SearchStepwise<SolverSingle>(config, input, a => Console.WriteLine(a));
if (true) {
(_, var state) = SolverUtils.SearchStepwise<SolverSingle>(config, input, a => Console.WriteLine(a));
Console.WriteLine($"Qual: {state.Quality}/{state.Input.Recipe.MaxQuality}");
}
else
{
(var actions, _) = SolverUtils.SearchOneshot<SolverConcurrent>(config, input);