Merge solver code with static interface

- Breaks backwards compat solver code with last version. Concurrent broke backwards compat because of race conditions with rng, but single is now broken too, despite it being 2x faster (!!!!)
- Literally twice as fast as Rust now in single thread
- Concurrent doesn't work yet, deadlocks somewhere..?
This commit is contained in:
Asriel Camora
2023-07-07 09:58:47 +02:00
parent 2894867195
commit d5a8288439
9 changed files with 332 additions and 145 deletions
+2 -2
View File
@@ -55,10 +55,10 @@ internal static class Program
Debugger.Break();
var s = Stopwatch.StartNew();
if (true)
_ = Solver.Crafty.Solver.SearchStepwise(config, input, a => Console.WriteLine(a));
_ = SolverUtils.SearchStepwise<SolverSingle>(config, input, a => Console.WriteLine(a));
else
{
(var actions, _) = Solver.Crafty.Solver.SearchOneshot(config, input);
(var actions, _) = SolverUtils.SearchOneshot<SolverConcurrent>(config, input);
foreach (var action in actions)
Console.Write($">{action.IntName()}");
Console.WriteLine();