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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user