diff options
| -rw-r--r-- | include/negamax.c | 5 | ||||
| -rw-r--r-- | src/ctaklm.c | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/include/negamax.c b/include/negamax.c index cfe2643..3db5867 100644 --- a/include/negamax.c +++ b/include/negamax.c @@ -59,7 +59,7 @@ negamax(const uint8_t cur_depth, float alpha, float beta, uint64_t hash = zobrist_compute(); tt_entry_t *entry = tt_seek(hash); - // CAUTION: >= breaks search stability + // CAUTION: ≥ breaks search stability (vs =) on shallow depths if (entry != NULL && entry->depth >= cur_depth) { if (entry->flag == TT_EXACT) { return entry->value; @@ -84,6 +84,7 @@ negamax(const uint8_t cur_depth, float alpha, float beta, float best_value = -infty; for (action_node_t *node=list->head; node!=NULL; node=node->next) { + negamax_display_progress(cur_depth, list->length); action_take(node->action); @@ -105,8 +106,6 @@ negamax(const uint8_t cur_depth, float alpha, float beta, } action_undo(node->action); - negamax_display_progress(cur_depth, list->length); - if (node_value > best_value) { best_value = node_value; best_action = node->action; diff --git a/src/ctaklm.c b/src/ctaklm.c index 2e0e2b3..e0022d1 100644 --- a/src/ctaklm.c +++ b/src/ctaklm.c @@ -312,8 +312,6 @@ negamax_display_progress(const uint8_t depth, const uint32_t length) { static int negamax_turn(void) { if (won == 0xFF) { - fputs("Computing: 0%", stdout); - fflush(stdout); // Run the minimax sum_depth = 0; num_check = 0; progress = 0; float minimax = negamax_generate(); |
