Author: Dan Homan
Date: 06:18:17 08/25/99
Go up one level in this thread
Do you have a switch to turn your hashing off? Try turning it off
(just the probing code is probably enough) and see if
your search has any other problems. Many times I have found that
what I thought was a single bug was actually a combination of
bugs.... Imagine that you have two bugs: one in your hash code and
another somewhere else in your search code. It is possible that you could
fix the hash bug, but it might appear that you made things worse because
now you will see the search bug in places that you didn't see it
before.
- Dan
On August 24, 1999 at 22:02:33, James Robertson wrote:
>I was looking at my code and noticed that I never get any cutoffs when there is
>no available hash move. I modifed my code a little, and it sped up, but then I
>noticed tactical problems; on a certain test position it never finds a fairly
>obvious move. Anyway, here is my hash code in my search function.
>
>The third line checks to see if the hash move is legal. Since an UPPER flagged
>position may occassionally have no move, the 'blank move' is considered illegal
>and it skips any chance of a cutoff. I changed line 3 to
>if (!hr.move || board.IsLegal(hr.move)) {
>and got the problems I mentioned above. Can anyone help me with this?
>
>Thanks,
>James
>
> HashRec hr;
> if (!hash_move[ply] && hash_table.Probe(&board, &hr)) {
> if (board.IsLegal(hr.move)) {
> // Adjust mate score.
> if (hr.score > MATE>>1) hr.score -= ply-1;
> else if (hr.score < -MATE>>1) hr.score += ply-1;
> if (hr.draft >= depth) {
> if (hr.flags & EXACT) {
> return hr.score;
> } else if (hr.flags & UPPER) {
> if (hr.score <= alpha) return hr.score;
> } else if (hr.flags & LOWER) {
> if (hr.score >= beta) return hr.score;
> }
> }
> hash_move[ply] = hr.move;
> }
> }
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.