From 277b3150630878f83a6895bea73c6d5d36ed0dbf Mon Sep 17 00:00:00 2001 From: tslil clingman Date: Tue, 26 Jan 2021 14:38:19 -0500 Subject: Stable negamax-alpha-beta fail-soft --- src/ctaklm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ctaklm.c b/src/ctaklm.c index 6c37484..9b1c307 100644 --- a/src/ctaklm.c +++ b/src/ctaklm.c @@ -303,8 +303,8 @@ negamax_display_progress(const uint8_t depth, const uint32_t length) { num_check += 1; if (depth == negamax_search_depth) { progress++; - printf("\x1B[1GComputing: %.0f%%", - (progress*100)/length); + printf("\x1B[1GComputing: %.0f/%d", + progress,length); fflush(stdout); } } @@ -319,7 +319,7 @@ negamax_turn(void) { float minimax = negamax_generate(); printf(" [%d]\n", tt_num_cached); // Failed to find a move? - if (minimax < -infty) { + if (minimax <= -infty) { puts("Opponent failed to find a move!"); return EXIT_FAILURE; } else { @@ -416,7 +416,7 @@ main(int argc, char **argv) { (void)(argc); (void)(argv); - negamax_search_depth = 4; + negamax_search_depth = 3; new_game(5); negamax_init(5); -- cgit v1.2.3