Author: Tim Foden
Date: 09:13:15 12/18/00
Go up one level in this thread
On December 18, 2000 at 10:37:28, Ulrich Tuerke wrote: >On December 18, 2000 at 09:39:19, Tim Foden wrote: > >>On December 18, 2000 at 07:46:55, Ulrich Tuerke wrote: >> >>>Forget my remarks. If this was your problem, you would probably not reach so >>>high iterations. (Comet ususally solves this on iteration #18.) >>>I guess that rather your algo has a bug. >> >>I think you may well be right. I could try stripping *everything* out of the >>search and the evaluation function, except the hash table and material >>evaluation. >> >>Should the FINE 70 position still be solved with such a search? >> >>> >>>Sorry, Uli >> >>No problem... any ideas are appreciated. :) >> >>Cheers, Tim. > >I should rather think that it's the hashing itself which could make the problem. >My 1st idea is that you could make a mistake regarding bounds. May be you store >a bound as an exact value, or you read a bound and interprete as exact ? >Perhaps it's worthwhile to test what happens if you store and read exact values >only. > >Uli You might be right about this. Looking at the code I'm not really sure. I'll look at it in more detail, but in the mean time here is a copy of the relevant bits: Here is my current code for reading from hash table... // // look in the hash table to help us with the search // CHashTableRec* pRec; m_nTTProbes++; if( CHashTable::Lookup(pRec) ) { m_nTTHits++; int scoreType = pRec->GetScoreType(); int eval = pRec->GetValue(); // check if it would be futile to do a null move if( scoreType == CHashTableRec::flagScoreIsFailLow && depth - NULL_MOVE_REDUCTION - PLY <= pRec->GetDepth() && eval < beta ) doNull = false; if( pRec->GetDepth() >= depth ) { m_nTTUsed++; switch( scoreType ) { case CHashTableRec::flagScoreIsExact: if( abs(eval) > evalWin ) { if( eval > 0 ) eval -= ply; else eval += ply; } m_pvhash[ply] = CBoard::Hash(); return eval; case CHashTableRec::flagScoreIsFailHigh: if( eval >= beta ) { return eval; } break; case CHashTableRec::flagScoreIsFailLow: if( eval <= alpha ) { return eval; } break; } } m_searchInfo[ply].m_hashMove = pRec->GetMoveToTry(); } And now storing in the hash table... // // store the results in the hash table // int flags; int score = alpha; if( alpha <= initialAlpha ) // actually can not be smaller { flags = CHashTableRec::flagScoreIsFailLow; score = initialAlpha; } else if( alpha >= initialBeta ) // normally can not be greater { flags = CHashTableRec::flagScoreIsFailHigh; score = initialBeta; } else { flags = CHashTableRec::flagScoreIsExact; if( abs(score) > evalWin ) { if( score > 0 ) score += ply; else score -= ply; DBG_ASSERT( abs(score) <= evalCheckmate ); } } Cheers, Tim.
This page took 0.01 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.