public static void Main() { var cb = ChessBoardInstances.Get(0); MainEngine.MaxDepth = MaxPly; UciOut.NoOutput = true; EngineConstants.Power2TtEntries = 2; TtUtil.Init(false); long totalNodesSearched = 0; var epdStrings = BestMoveTest.GetEpdStrings("Resources/WAC-201.epd"); for (var index = 0; index < NumberOfPositions; index++) { Console.WriteLine(index); var epdString = epdStrings[index + 20]; Statistics.Reset(); var epd = new Epd(epdString); ChessBoardUtil.SetFen(epd.GetFen(), cb); SearchUtil.Start(cb); totalNodesSearched += ChessBoardUtil.CalculateTotalMoveCount(); } Console.WriteLine("Total " + totalNodesSearched); Console.WriteLine("Average " + totalNodesSearched / NumberOfPositions); }
public static void SendInfo() { if (NoOutput) { return; } if (Stopwatch.IsRunning && Stopwatch.ElapsedMilliseconds < 2000) { return; } var totalMoveCount = ChessBoardUtil.CalculateTotalMoveCount(); Console.WriteLine("info nodes " + totalMoveCount + " nps " + CalculateNps(totalMoveCount) + " hashfull " + TtUtil.GetUsagePercentage()); }
public static void SendPlyInfo(ThreadData threadData) { if (NoOutput) { return; } Stopwatch.Restart(); var totalMoveCount = ChessBoardUtil.CalculateTotalMoveCount(); // info depth 1 seldepth 2 score cp 50 pv d2d4 d7d5 e2e3 hashfull 0 nps 1000 nodes 22 // info depth 4 seldepth 10 score cp 40 upperbound pv d2d4 d7d5 e2e3 hashfull 0 nps 30000 nodes 1422 Console.WriteLine("info depth " + threadData.Depth + " time " + TimeUtil.GetPassedTimeMs() + " score cp " + threadData.BestScore + threadData.ScoreType.ToFriendlyName() + "nps " + CalculateNps(totalMoveCount) + " nodes " + totalMoveCount + " hashfull " + TtUtil.GetUsagePercentage() + " pv " + PvUtil.AsString(threadData.Pv)); }