diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/negamax.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/negamax.c b/include/negamax.c index 8b7345f..f6c4873 100644 --- a/include/negamax.c +++ b/include/negamax.c @@ -85,6 +85,7 @@ negamax_init(const uint8_t new_board_size) { board_size = new_board_size; action_list_init(); zobrist_init(); + tt_init(); } void @@ -129,7 +130,7 @@ negamax(const uint8_t cur_depth, float alpha, float beta, // Check win if far enough into the game if (w == WIN_ROAD_BLACK || w == WIN_FLAT_BLACK) node_value = colour*infty; else if (w == WIN_DRAW) node_value = 0; // Draw is fixed at neutral - } else if (cur_depth > 1) { + } else if (cur_depth > 0) { // If nobody won, or too early, recurse if not a leaf node_value = -negamax(cur_depth - 1, -beta, -alpha, -colour); } else { |
