From 9c151da7ce0d00ecf04e4be9c395604d4c8882ad Mon Sep 17 00:00:00 2001 From: tslil clingman Date: Mon, 25 Jan 2021 23:48:42 -0500 Subject: Stripping debug stuff --- include/negamax.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'include/negamax.c') diff --git a/include/negamax.c b/include/negamax.c index abb4e27..912705d 100644 --- a/include/negamax.c +++ b/include/negamax.c @@ -115,16 +115,11 @@ negamax(const uint8_t cur_depth, float alpha, float beta, const float colour) { float value = -infty; - - data_t bd[5*5]; - colour_stack_t bc[25]; - action_list_t *list = action_list_generate(); if (list == NULL) return value; // ??? for (action_node_t *node=list->head; node!=NULL; node=node->next) { - for (int k=0; k<25; k++) { bd[k]=celldat[k]; bc[k]=colours[k]; } action_take(node); // Compute the value of the node @@ -143,31 +138,6 @@ negamax(const uint8_t cur_depth, float alpha, float beta, } action_undo(node); - for (int k=0; k<25; k++) { - if (bd[k]!=celldat[k]) { - printf("Depth %d %.3f %.3f %d: { .type = %s, .loc = 0x%02X, .data0 = 0x%02X, .data1 = 0x%02X} DIFF 0x%02X \n", - cur_depth, - alpha, - beta, - ply, - (node->type == A_PLACE) ? "A_PLACE" : "A_MOVE", - node->loc, - node->data0, - node->data1, - k); - puts("Before:"); - for (int j=0; j<25;j++) printf("0x%02X ",bd[j]); - putchar('\n'); - for (int j=0; j<25;j++) printf("0x%02X ",bc[j]); - putchar('\n'); - puts("After:"); - for (int j=0; j<25;j++) printf("0x%02X ",celldat[j]); - putchar('\n'); - for (int j=0; j<25;j++) printf("0x%02X ",colours[j]); - putchar('\n'); - exit(1); - } - } negamax_display_progress(cur_depth, list->length); @@ -178,7 +148,7 @@ negamax(const uint8_t cur_depth, float alpha, float beta, if (alpha >= beta) break; } } - prune: + action_list_free(list); return value; } -- cgit v1.2.3