Fixed stepwise solver never finishing

This commit is contained in:
Asriel Camora
2023-11-04 18:44:54 -07:00
parent 269a7f9870
commit 5bee39678c
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -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);
+12
View File
@@ -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);
}