Skip to content

Commit 3fd0185

Browse files
committed
bugfix: hashmove at root
1 parent 0a7d2d0 commit 3fd0185

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

search.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ static int AlphaBeta(BOARD *board, unsigned int depth, int alpha, int beta,
118118
char hash_flag = HASH_ALPHA;
119119

120120
if(depth){
121-
val = GetHashEval(&hash_table, board->zobrist_key, depth, alpha, beta);
122-
if(val != ERRORVALUE){
123-
return val;
121+
if(root > 0){
122+
val = GetHashEval(&hash_table, board->zobrist_key, depth, alpha, beta);
123+
if(val != ERRORVALUE) return val;
124124
}
125125
if(!skip_null && depth > 2
126126
&& board->piece_material[board->white_to_move] != 0

0 commit comments

Comments
 (0)