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:
@@ -0,0 +1,12 @@
|
||||
using Node = Craftimizer.Solver.Crafty.ArenaNode<Craftimizer.Solver.Crafty.SimulationNode>;
|
||||
|
||||
namespace Craftimizer.Solver.Crafty;
|
||||
|
||||
public interface ISolver
|
||||
{
|
||||
abstract static void LoadChildData(Span<float> scoreSums, Span<int> visits, Span<float> maxScores, ref Node[] chunk, int iterCount);
|
||||
|
||||
abstract static bool SearchIter(ref SolverConfig config, Node rootNode, Random random, Simulator simulator);
|
||||
|
||||
abstract static void Search(ref SolverConfig config, Node rootNode, CancellationToken token);
|
||||
}
|
||||
Reference in New Issue
Block a user