Fixed stepwise solver never finishing
This commit is contained in:
+1
-1
@@ -311,7 +311,7 @@ public sealed class Solver : IDisposable
|
|||||||
if (sim.IsComplete)
|
if (sim.IsComplete)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
var solver = new MCTS(MCTSConfig, State);
|
var solver = new MCTS(MCTSConfig, state);
|
||||||
|
|
||||||
var s = Stopwatch.StartNew();
|
var s = Stopwatch.StartNew();
|
||||||
solver.Search(Config.Iterations, Token);
|
solver.Search(Config.Iterations, Token);
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
namespace Craftimizer.Solver;
|
||||||
|
|
||||||
|
internal static class Trace
|
||||||
|
{
|
||||||
|
[Conditional("IS_TRACE")]
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||||
|
public static void Log(string msg) =>
|
||||||
|
Console.WriteLine(msg);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user