Add ability to set initialized sim state if needed
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ public sealed class MCTS
|
||||
public MCTS(in MCTSConfig config, in SimulationState state)
|
||||
{
|
||||
this.config = config;
|
||||
var sim = new Simulator(config.MaxStepCount);
|
||||
var sim = new Simulator(config.MaxStepCount) { State = state };
|
||||
rootNode = new(new(
|
||||
state,
|
||||
null,
|
||||
|
||||
+2
-2
@@ -240,7 +240,7 @@ public sealed class Solver : IDisposable
|
||||
{
|
||||
var actions = new List<ActionType>();
|
||||
var state = State;
|
||||
var sim = new Simulator(Config.MaxStepCount);
|
||||
var sim = new Simulator(Config.MaxStepCount) { State = state };
|
||||
while (true)
|
||||
{
|
||||
Token.ThrowIfCancellationRequested();
|
||||
@@ -303,7 +303,7 @@ public sealed class Solver : IDisposable
|
||||
{
|
||||
var actions = new List<ActionType>();
|
||||
var state = State;
|
||||
var sim = new Simulator(Config.MaxStepCount);
|
||||
var sim = new Simulator(Config.MaxStepCount) { State = state };
|
||||
while (true)
|
||||
{
|
||||
Token.ThrowIfCancellationRequested();
|
||||
|
||||
Reference in New Issue
Block a user