From bda3a7edb76c9fe3dc21cbe5a0836829b705b407 Mon Sep 17 00:00:00 2001 From: tslil Date: Fri, 29 Jan 2021 17:52:58 -0500 Subject: Purged uninteresting statistics --- src/ctaklm.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ctaklm.c b/src/ctaklm.c index 4ef02be..681f29c 100644 --- a/src/ctaklm.c +++ b/src/ctaklm.c @@ -313,16 +313,15 @@ load_ptn(const char* fn) { return EXIT_SUCCESS; } -static float sum_depth, num_check, progress; +static float num_check, progress; // Set up output function for negamax inline void negamax_display_progress(const uint8_t depth, const uint32_t length) { - sum_depth += depth; num_check += 1; if (depth == negamax_search_depth) { progress++; - printf("\x1B[1GComputing: %.0f/%d", + printf("\x1B[0GComputing: %.0f/%d", progress,length); fflush(stdout); } @@ -332,19 +331,18 @@ static int negamax_turn(void) { if (won == 0xFF) { // Run the minimax - sum_depth = 0; num_check = 0; progress = 0; + num_check = 0; progress = 0; float minimax = negamax_generate(); - printf(" [%d]\n", tt_num_cached); + putchar('\n'); // Failed to find a move? if (minimax <= -infty) { puts("Opponent failed to find a move!"); return EXIT_FAILURE; } else { - printf("Result: %s (%.2f, %.1e, %.2f)\n", + printf("Result: %s (%.2f, checked %.1e)\n", negamax_ptn, minimax*100.0, - num_check, - sum_depth/num_check); + num_check); return handle_turn(negamax_ptn); } } else { -- cgit v1.2.3