From 02a9ccf9465b0f067fa5d0768596bd01113dcad7 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 27 Mar 2016 11:58:10 +0200 Subject: [PATCH] Print average solving time of EPD suite The number of good solutions and average thinking time on them are now printed in the 2nd engine-output pane. --- backend.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index bfdba0f..7919587 100644 --- a/backend.c +++ b/backend.c @@ -8953,7 +8953,7 @@ FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book h if(appData.epd) { if(solvingTime >= 0) { snprintf(buf1, MSG_SIZ, "%d. solved %4.2fs\n", matchGame, solvingTime/100.); - totalTime += solvingTime; first.matchWins++; + totalTime += solvingTime; first.matchWins++; solvingTime = -1; } else { snprintf(buf1, MSG_SIZ, "%d. wrong (%s)\n", matchGame, parseList[backwardMostMove]); second.matchWins++; @@ -11841,6 +11841,14 @@ GameEnds (ChessMove result, char *resultDetails, int whosays) return; } else { gameMode = nextGameMode; + if(appData.epd) { + snprintf(buf, MSG_SIZ, "-------------------------------- "); + OutputKibitz(2, buf); + snprintf(buf, MSG_SIZ, "Average solving time %4.2f sec ", totalTime/(100.*first.matchWins)); + OutputKibitz(2, buf); + snprintf(buf, MSG_SIZ, "Solved %d of %d (%3.1f%%) ", first.matchWins, nextGame, first.matchWins*100./nextGame); + OutputKibitz(2, buf); + } snprintf(buf, MSG_SIZ, _("Match %s vs. %s: final score %d-%d-%d"), first.tidy, second.tidy, first.matchWins, second.matchWins, -- 1.7.0.4