aboutsummaryrefslogtreecommitdiff
path: root/include/negamax.c
diff options
context:
space:
mode:
Diffstat (limited to 'include/negamax.c')
-rw-r--r--include/negamax.c5
1 files changed, 2 insertions, 3 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;