aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2021-01-13 23:50:09 -0500
committertslil <tslil@posteo.de>2026-08-28 19:37:41 +0100
commitc78258adc03936fff70707ebf1942710a7b59416 (patch)
tree43f37ba2f8bf9a678cac5e72db1b7d3787a08791 /src
parentcf7d665598e34e32d258775b583968e758c8f2fb (diff)
There are still some bugs somewhere in minimax ...
In tinue it doesn't seem to choose a move
Diffstat (limited to 'src')
-rw-r--r--src/ctaklm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ctaklm.c b/src/ctaklm.c
index 9d0f867..7d6cedd 100644
--- a/src/ctaklm.c
+++ b/src/ctaklm.c
@@ -365,8 +365,12 @@ main(int argc, char **argv) {
} else {
int r = handle_turn(line);
if (r == EXIT_SUCCESS && won == 0xFF) {
- fputs("Thinking [", stdout);
- float minimax = ct1986_minimax(0, 1, 0);
+ // Prepare progress bar
+ fputs("Computing [", stdout);
+ for (int k = 0; k < board_size * board_size; k++) putchar(' ');
+ fputs("]\033[26D",stdout);
+ // Run the minimax
+ float minimax = ct1986_minimax(0, 2, 0);
printf("] Result: %s (%.3f)\n",
ct1986_ptn,
minimax*100.0);