private void IterativeDeepening_OnSearchUpdate(object sender, SearchStatistics statistics) { // Main search result _interactiveConsole.WriteLine($" === Depth: {statistics.Depth}, Score: {statistics.Score}, Best: {statistics.PrincipalVariation[0]}, " + $"Time: {((float) statistics.SearchTime / 1000):F} s"); // Normal search _interactiveConsole.WriteLine($" Normal search: Nodes: {statistics.Nodes}, Leafs: {statistics.Leafs}, " + $"Branching factor: {statistics.BranchingFactor:F}, Beta cutoffs: {statistics.BetaCutoffs}"); // Quiescence search _interactiveConsole.WriteLine($" Q search: Nodes: {statistics.QNodes}, Leafs: {statistics.QLeafs}, " + $"Branching factor: {statistics.QBranchingFactor:F}, Beta cutoffs: {statistics.QBetaCutoffs}"); // Total _interactiveConsole.WriteLine($" Total: Nodes: {statistics.TotalNodes} ({((float)statistics.TotalNodesPerSecond / 1000000):F} MN/s), " + $"Leafs: {statistics.TotalLeafs}, Branching factor: {statistics.TotalBranchingFactor:F}, " + $"Beta cutoffs: {statistics.TotalBetaCutoffs}"); #if DEBUG // Beta cutoffs at first move _interactiveConsole.WriteLine($" Beta cutoffs at first move: {statistics.BetaCutoffsAtFirstMove} ({statistics.BetaCutoffsAtFirstMovePercent:F} %), " + $"Q Beta cutoffs at first move: {statistics.QBetaCutoffsAtFirstMove} ({statistics.QBetaCutoffsAtFirstMovePercent:F} %)"); // Transposition statistics _interactiveConsole.WriteLine($" TT: " + $"Added: {statistics.TTAddedEntries}, " + $"Replacements: {statistics.TTReplacements} ({statistics.TTReplacesPercent:F} %), " + $"Hits: {statistics.TTHits} ({statistics.TTHitsPercent:F} %), " + $"Missed: {statistics.TTNonHits}, " + $"Filled: {TranspositionTable.GetFillLevel():F} %"); // Pawn hash table statistics _interactiveConsole.WriteLine($" PHT: " + $"Added: {statistics.EvaluationStatistics.PHTAddedEntries}, " + $"Replacements: {statistics.EvaluationStatistics.PHTReplacements} ({statistics.EvaluationStatistics.PHTReplacesPercent:F} %), " + $"Hits: {statistics.EvaluationStatistics.PHTHits} ({statistics.EvaluationStatistics.PHTHitsPercent:F} %), " + $"Missed: {statistics.EvaluationStatistics.PHTNonHits}, " + $"Filled: {PawnHashTable.GetFillLevel():F} %"); // Evaluation hash table statistics _interactiveConsole.WriteLine($" EHT: " + $"Added: {statistics.EvaluationStatistics.EHTAddedEntries}, " + $"Replacements: {statistics.EvaluationStatistics.EHTReplacements} ({statistics.EvaluationStatistics.EHTReplacesPercent:F} %), " + $"Hits: {statistics.EvaluationStatistics.EHTHits} ({statistics.EvaluationStatistics.EHTHitsPercent:F} %), " + $"Missed: {statistics.EvaluationStatistics.EHTNonHits}, " + $"Filled: {EvaluationHashTable.GetFillLevel():F} %"); _interactiveConsole.WriteLine($" Valid TT moves: {statistics.TTValidMoves}, Invalid TT moves: {statistics.TTInvalidMoves}, " + $"IID hits: {statistics.IIDHits}, Loud generations: {statistics.LoudMovesGenerated}, " + $"Quiet generations: {statistics.QuietMovesGenerated}"); #endif _interactiveConsole.WriteLine(); }