aboutsummaryrefslogtreecommitdiff
path: root/src/ctaklm.c
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2021-01-26 14:38:19 -0500
committertslil <tslil@posteo.de>2026-08-28 19:37:41 +0100
commit277b3150630878f83a6895bea73c6d5d36ed0dbf (patch)
tree5c59f6214d662721e83ff2218cba88a4a096deba /src/ctaklm.c
parentfb48dd17615d7380d1b78bd6d32ebe7ea989af1f (diff)
Stable negamax-alpha-beta fail-soft
Diffstat (limited to 'src/ctaklm.c')
-rw-r--r--src/ctaklm.c8
1 files changed, 4 insertions, 4 deletions
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);