From b855ba59aaeb3ba1f1ef26b9b47b6f056b43a969 Mon Sep 17 00:00:00 2001 From: Bruno Raoult Date: Thu, 13 Jul 2023 10:39:36 +0200 Subject: [PATCH] do not generate moves in pvs() terminal nodes --- src/search.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/search.c b/src/search.c index 0e1d893..4e39f22 100644 --- a/src/search.c +++ b/src/search.c @@ -45,7 +45,6 @@ eval_t negamax(pos_t *pos, int depth, int color) } moves_gen_all(pos); list_for_each_entry(move, &pos->moves[pos->turn], list) { - log(1, "%.*s", 5 - depth, " "); newpos = move_do(pos, move); score = -negamax(newpos, depth - 1, -color); pos->node_count += newpos->node_count; @@ -86,7 +85,7 @@ eval_t pvs(pos_t *pos, int depth, int alpha, int beta, int color) if (depth == 0) { //return quiesce(p, alpha, beta); /* leaf node */ - moves_gen_all(pos); + moves_gen_all_nomoves(pos); score = eval(pos) * color; log_f(2, "Terminal: depth=%d ", depth); log_f(2, "score=%d alpha=%d beta=%d\n", score, alpha, beta);