Author: GBes
Date: 11:21:16 01/15/99
Hi all, a month ago i start writing a chessprogram. The part of the program that generates moves ( with bitboards ) works fine, also the hashtable seems to work. The evaluation function returns simply (-MATE + ply) or 0; For the alpha/beta search i have trouble with keeping track of the principal variation. After doing a HashProbe that returns EXACT, i have a BestMove and its Score from the hashtable. What i don't have is the sequence of moves that comes after this BestMove. This okay if BestMove is not part of the PV after all (IMHO) but if it is then i only have a first part of the PV, and i want more... so my question is : "How to keep track of the principal variation when using results from the hashtable ?" Hope someone can shine some light over this thanks a lot gerritbes. this is how i am doing it now : int ABSearch( alpha, beta, depth, ply ) { if ( depth == 0 ) return Evaluate(); switch ( HashProbe( hashKey, depth, ply, *lHashScore, *lHashMove ) ) { case EXACT: if ( alpha < lHashScore < beta ) { // could return lHashScore here // but then don't have the PV ????? // so... continue } else { return lHashScore; } break; } while ( lMoreMove ) { // calls to ABSearch... } // update PV if a move was found in while loop if ( initial_alpha < alpha < beta ) { PV_Moves[ply][0] = lBestMove_found_in_while_loop; PV_Moves[ply][1...] = PV_Moves[ply+1][0...]; PV_Moves[ply+1].Empty(); // also store here this position with type = EXACT in hashtable } else { // PV_Moves[ply] is empty // or contains MoveSequence that leads to score alpha (IMHO) } return alpha; }
This page took 0 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.