aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/negamax_cnn1986.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/negamax_cnn1986.c b/include/negamax_cnn1986.c
index b9d618d..6c834f1 100644
--- a/include/negamax_cnn1986.c
+++ b/include/negamax_cnn1986.c
@@ -194,7 +194,11 @@ float
negamax_cnn1986(const uint8_t cur_depth, float alpha, float beta,
const float colour) {
- if (cnn1986_cache_seek(&alpha)) {
+ int sought = EXIT_FAILURE;
+ if (cur_depth < negamax_cnn1986_cache_threshold) {
+ sought = cnn1986_cache_seek(&alpha);
+ }
+ if (sought) {
const uint8_t black = (ply & 1),
material = (black) ? black_count : white_count,
flat = material & 127,