From 2439dc2ab6a6c2a840c2d2c1deb3949b7b88f415 Mon Sep 17 00:00:00 2001 From: tslil clingman Date: Sat, 23 Jan 2021 15:37:33 -0500 Subject: Not correct usage, need to try hashing --- include/negamax_cnn1986.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/negamax_cnn1986.c') diff --git a/include/negamax_cnn1986.c b/include/negamax_cnn1986.c index 6c834f1..1dd0e72 100644 --- a/include/negamax_cnn1986.c +++ b/include/negamax_cnn1986.c @@ -391,9 +391,13 @@ negamax_cnn1986(const uint8_t cur_depth, float alpha, float beta, negamax_cnn1986_display_progress(cur_depth); } } - // Insert into the cache if we're not too deep + // Insert into the cache if we're not too deep, and make it + // useable for both min and max (colour * colour == 1) if (cur_depth < negamax_cnn1986_cache_threshold) - cnn1986_cache_insert(alpha); + cnn1986_cache_insert(colour*alpha); + } else { + // Impose the colour + alpha *= colour; } return alpha; } -- cgit v1.3.1