Author: Tijs van Dam
Date: 05:08:01 01/26/00
Hello, Looking at the crafty code, i stumbled upon something i don't understand. It is in search.c, in the part for internal iterative deepening. I left out the abort checks: tree->next_status[ply].phase=FIRST_PHASE; if (tree->hash_move[ply]==0 && do_null && depth>=3*INCPLY) do { < ... check if this is indeed a pv node ... > tree->current_move[ply]=0; value=ABSearch(tree,alpha,beta,wtm,depth-2*INCPLY,ply,DO_NULL); if (value <= alpha) { value=ABSearch(tree,-MATE,beta,wtm,depth-2*INCPLY,ply,DO_NULL); } else if (value < beta) { if ((int) tree->pv[ply-1].pathl >= ply) tree->hash_move[ply]=tree->pv[ply-1].path[ply]; } else tree->hash_move[ply]=tree->current_move[ply]; tree->last[ply]=tree->last[ply-1]; tree->next_status[ply].phase=FIRST_PHASE; } while(0); I understand this: to get a good move, you do a search with depth-2. When the search returns something in the range (alpha,beta), you are happy and use this move to search first. When the search returns a value >=beta, you use the move that caused the cutoff, because there is a good chance that it will also cause a cutoff at this depth. But when you get a value<=alpha, you do a research on (-MATE,beta). The outcome of this search is not used, although a move must have come out of it?! Why is the best move from this search not used, even if it is below alpha in a shallower search? I want to implement iterative deepening too, but i keep puzzling over this code. Dear Dr. Hyatt, could you please explain? BTW, this is crafty 16.something. Greets, Tijs van Dam
This page took 0.02 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.