Skip to content

Commit

Permalink
add memory diagnoser & go to depth 8 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
znxftw authored Dec 3, 2024
1 parent 6ba33d9 commit 03b5218
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Rudim/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static void DebugMain(string[] args)
}
}

[MemoryDiagnoser]
public class NegamaxBenchmark
{
[Benchmark]
Expand All @@ -60,14 +61,18 @@ public void BenchmarkSearch(BoardState boardState, int depth, CancellationToken

public IEnumerable<object[]> GenerateBenchmarks()
{
yield return new object[] { BoardState.ParseFEN(Helpers.AdvancedMoveFEN), 6, new CancellationToken(false) };
yield return new object[] { BoardState.ParseFEN(Helpers.AdvancedMoveFEN), 7, new CancellationToken(false) };
yield return new object[] { BoardState.ParseFEN(Helpers.StartingFEN), 6, new CancellationToken(false) };
yield return new object[] { BoardState.ParseFEN(Helpers.StartingFEN), 7, new CancellationToken(false) };
yield return new object[] { BoardState.ParseFEN(Helpers.EndgameFEN), 6, new CancellationToken(false) };
yield return new object[] { BoardState.ParseFEN(Helpers.EndgameFEN), 7, new CancellationToken(false) };
yield return new object[] { BoardState.ParseFEN(Helpers.KiwiPeteFEN), 6, new CancellationToken(false) };
yield return new object[] { BoardState.ParseFEN(Helpers.KiwiPeteFEN), 7, new CancellationToken(false) };
yield return [BoardState.ParseFEN(Helpers.AdvancedMoveFEN), 6, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.AdvancedMoveFEN), 7, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.AdvancedMoveFEN), 8, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.StartingFEN), 6, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.StartingFEN), 7, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.StartingFEN), 8, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.EndgameFEN), 6, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.EndgameFEN), 7, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.EndgameFEN), 8, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.KiwiPeteFEN), 6, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.KiwiPeteFEN), 7, new CancellationToken(false)];
yield return [BoardState.ParseFEN(Helpers.KiwiPeteFEN), 8, new CancellationToken(false)];
}
}
}

0 comments on commit 03b5218

Please sign in to comment.