diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-26 00:32:43 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | 3d8b8a5179a9684d8b7c77c7015b17b95f7dd701 (patch) | |
| tree | 5bed3a4abed4c273c438dd4f7ce8e1783bd2609f | |
| parent | 9131e08817ae2f3bd58a8a0ba9f1e692ceb8604c (diff) | |
Actually it seems before i was mis-counting
| -rw-r--r-- | include/negamax.c | 3 | ||||
| -rw-r--r-- | src/ctaklm.c | 1 |
2 files changed, 2 insertions, 2 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 { diff --git a/src/ctaklm.c b/src/ctaklm.c index a3685db..6c37484 100644 --- a/src/ctaklm.c +++ b/src/ctaklm.c @@ -419,7 +419,6 @@ main(int argc, char **argv) { negamax_search_depth = 4; new_game(5); negamax_init(5); - tt_init(); // Test harness if (argc > 1) { |
