diff options
| author | tslil <tslil@posteo.de> | 2021-01-29 17:52:58 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | bda3a7edb76c9fe3dc21cbe5a0836829b705b407 (patch) | |
| tree | fdc5904631f3503ba2bb2c04be92bccfbd319eb6 /src | |
| parent | fcface1079b1c44c7ccca3d117c698347c978f20 (diff) | |
Purged uninteresting statistics
Diffstat (limited to 'src')
| -rw-r--r-- | src/ctaklm.c | 14 |
1 files changed, 6 insertions, 8 deletions
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 { |
