Author: Robert Hyatt
Date: 17:56:39 05/15/99
Go up one level in this thread
On May 15, 1999 at 15:14:26, William Bryant wrote: >Thanks to both Bob and Edward. > >There was a very nice but difficult to notice bug. It attribute it to a >compiler error, the compiler did what the source said to do, not what I "though" >it said to do. :) I forgot to negate the score returned from the null search. >ie >x = search(-beta, -beta+1, depth-NullRDepth, false); > >instead of > >x = -search(-beta, -beta+1, depth-NullRDepth, false); > >You miss these things at 1 am. > >Interestingly, the search was much faster (but wrong) on some positions doing >it the other way. I now only get to 9 ply in 2 minutes (actually 1:36) from the >1.e4 starting position instead of 10 ply, more work to be done. > >I still have a question on the Null move. > >If at the root, you fail high and set alpha to -infinity so that your new search >window is -Infinity, beta, then with the first call to search, >alpha becomes -beta, beta becomes -alpha which becomes Infinity. > >I assume under these circumstances, it is better to skip the null move at this >ply since there is not point is searching -beta, -beta+1 (-Infinity, >-Infinity+1). Is this correct? > yes... if you can't possibly fail high, then do not do it at all since it just 'burns nodes'... >Finally, > on your last comment >>The most common bug with null move is a fail high, and on the research where >>beta has been relaxed, you get a fail-low. _that_ can be a serious problem if >>you don't ignore the false fail-high at the root. You will occasionally play a >>totally garbage move. > >I had this problem when I implemented my aspiration window search. I would fail >high, then fail low and get stuck. What I have done is this, if I fail high, I >change the search to > alpha = beta -1; > beta = INFINITYSCORE; > and flag that I have failed high. >If fail low, I change the search to > alpha = -INFINITYSCORE; > leaving beta unchanged unless I have already failed already on this search, > then I change beta; beta = INFINITYSCORE; > >Is there a better way to handle this problem. > >Thanks again, > if I fail high on the pvs search (ie searching 2nd root move with window alpha,alpha+1, I the research with alpha,beta. If this fails low I just ignore the original fail high and keep going. Anything else leads to trouble. Because if you re-search with -infinity, alpha, what good is that? You want to let the score drop below the already found best score at the root? >William >wbryant@ix.netcom.com > >BTW, here is my Null move code to see what I have done. Please feel free to >comment. > > //No Hash table cutoff > //Now lets try a Null move >#ifndef _No_NULL_ > if (beta < INFINITYSCORE) {//Avoid doing a Null move just after fail low > if ((!check) && doNull && (depth - NullRDepth >= 0) && > (GetPieceMaterial(side) >= NULL_Threashold)) { > gNullMoveAttemps++; > makeNULLmove(); > if (depth - NullRDepth) //if depth remaining > score = -search(-beta, -beta+1, depth-NullRDepth, false); > else if (depth - NullRDepth == 0) > score = -quiesce(-beta, -beta+1); > takebackNULL(); > > if (OutOfTime) > return(0L); > > if (score >= beta) { // Null move cutoff > gNullCutoffs++; // counter for successful null moves > UPDATEHASHRECORD(mHash, theHashRecord, CurHashSig, age, 0L, > score, depth, hash_Lower); > return score; // alternatively, return beta > } > else if (score < -MateScore) > if (ply <= kAbsoluteMaxSearchDepth) > depth++; // may wish to handle null move scores that > //suggest a mate by > // increasing depth and researching >} >} >#endif
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.