Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        public static void Print()
        {
            if (!Enabled)
            {
                return;
            }

            var totalMoveCount = ChessBoardUtil.CalculateTotalMoveCount();

            Console.WriteLine("AB-nodes      " + AbNodes);
            Console.WriteLine("PV-nodes      " + _pvNodes + " = 1/" + (_pvNodes + _cutNodes + _allNodes) / _pvNodes);
            Console.WriteLine("Cut-nodes     " + _cutNodes);
            PrintPercentage("Cut 1         ", FailHigh[0], _cutNodes - FailHigh[0]);
            PrintPercentage("Cut 2         ", FailHigh[1], _cutNodes - FailHigh[1]);
            PrintPercentage("Cut 3         ", FailHigh[2], _cutNodes - FailHigh[2]);
            Console.WriteLine("All-nodes     " + _allNodes);
            Console.WriteLine("Q-nodes       " + QNodes);
            Console.WriteLine("See-nodes     " + SeeNodes);
            Console.WriteLine("Evaluated     " + EvalNodes);
            Console.WriteLine("Moves         " + totalMoveCount);

            var threadData = ThreadData.GetInstance(0);

            Console.WriteLine("### Caches #######");
            PrintPercentage("TT            ", TtHits, TtMisses);
            Console.WriteLine("usage         " + TtUtil.GetUsagePercentage() / 10 + "%");
            PrintPercentage("Eval          ", EvalCacheHits, EvalCacheMisses);
            Console.WriteLine("usage         " + Util.GetUsagePercentage(threadData.EvalCache) + "%");
            PrintPercentage("Pawn eval     ", PawnEvalCacheHits, PawnEvalCacheMisses);
            Console.WriteLine("usage         " + Util.GetUsagePercentage(threadData.PawnCache) + "%");
            PrintPercentage("Material      ", MaterialCacheHits, MaterialCacheMisses);
            Console.WriteLine("usage         " + Util.GetUsagePercentage(threadData.MaterialCache) + "%");

            Console.WriteLine("## Best moves #####");
            Console.WriteLine("TT            " + _bestMoveTt);
            Console.WriteLine("TT-upper      " + _bestMoveTtUpper);
            Console.WriteLine("TT-lower      " + _bestMoveTtLower);
            Console.WriteLine("Win-cap       " + _bestMoveWinningCapture);
            Console.WriteLine("Los-cap       " + _bestMoveLosingCapture);
            Console.WriteLine("Promo         " + _bestMovePromotion);
            Console.WriteLine("Killer1       " + _bestMoveKiller1);
            Console.WriteLine("Killer2       " + _bestMoveKiller2);
            Console.WriteLine("Killer1 evasi " + _bestMoveKillerEvasive1);
            Console.WriteLine("Killer2 evasi " + _bestMoveKillerEvasive2);
            Console.WriteLine("Counter       " + _bestMoveCounter);
            Console.WriteLine("Other         " + _bestMoveOther);

            Console.WriteLine("### Outcome #####");
            Console.WriteLine("Checkmate     " + MateCount);
            Console.WriteLine("Stalemate     " + StaleMateCount);
            Console.WriteLine("Repetitions   " + Repetitions + "(" + _repetitionTests + ")");

            Console.WriteLine("### Extensions #####");
            Console.WriteLine("Check         " + CheckExtensions);

            Console.WriteLine("### Pruning #####");
            PrintPercentage("Null-move     ", NullMoveHit, NullMoveMiss);
            PrintDepthTotals("Static nmp    ", StaticNullMoved, false);
            PrintDepthTotals("Razored       ", Razored, false);
            PrintDepthTotals("Futile        ", Futile, false);
            PrintDepthTotals("LMP           ", Lmped, false);
        }