Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Matevalues, hashtables and iterative deepening

Author: Koundinya Veluri

Date: 07:40:44 11/30/01

Go up one level in this thread


On November 30, 2001 at 09:02:38, Erik Robertsson wrote:

>On November 30, 2001 at 08:48:20, Odd Gunnar Malin wrote:
>
>>On November 30, 2001 at 07:25:42, Erik Robertsson wrote:
>>
>>>I´ve been trying to correct some bugs wich occur when storing mate values in the
>>>hashtable.
>>>
>>>If the position is evaluated as a mate value at the end of an iteration in the
>>>iterative deepening, I stop searching and execute the best move. In some
>>>positions however, I find that due to finding positions in the hashtable it can
>>>result in the engine alternating between two different mate variations ending in
>>>a quite embarrassing draw by repetiton.
>>>
>>>I've tried to solve this by not automatically stop the iterative deepening
>>>unless I've found a shorter mate than found in the previous move. Is there a
>>>better way of solving this? I remember reading something about this some year
>>>ago, but cannot find it.
>>>
>>>I use the draft = *infinity* for mates wich are not bounds which should result
>>>in that most positions with mate should be in the ht in the next search. Maybe
>>>it has something to do with the bounds, but I´ve tried Crafty's MATE-300 bound
>>>and it sometimes result in getting the evaluation of the position as MATE-300.
>>>
>>>This has kept me awake a few nights, please help or I will go insane.
>>
>>
>>I guess you allready do this when saving hash:
>>
>>if (bestscore>(MATE-MAX_PLY))
>>  hashscore=bestscore+ply;
>>else if (bestscore<(-MATE+MAX_PLY))
>>  hashscore=bestscore-ply;
>>else
>>  hashscore=bestscore;
>>
>>And the opposite when you reading hash:
>>
>>if (hashscore>(MATE-MAX_PLY))
>>  bestscore=hashscore-ply;
>>else if (hashscore<(-MATE+MAX_PLY))
>>  bestscore=hashscore+ply;
>>else
>>  bestscore=hashscore;
>
>This I do.
>
>>
>>If you use fail-soft alpha-beta it could be the same error that I had in my
>>little engine.
>>I was returning alpha instead of bestscore in  one of my cutoff.
>>
>>Odd Gunnar
>
>I don't think so, since I return best score in my cutoffs. I'm guessing it has
>to do with storing mate as bounds, so I tried to not doing this, and it seems to
>work fine. However, in doing I guess I throw away information that can be useful
>and reduce the size of the search tree?
>
>Erik

Hi Erik,

I still have this problem in my program. It somehow gets the mate bound back at
the rook as an exact score, but I've never actually seen my program switch
between two mate lines, although it is theoretically possible. Just a thought,
but I think this could be caused by storing the wrong depth into the hash table.
When extending, do you store the depth after the extension or the original depth
into the hash table? I found better results storing the original depth,
especially if the extensions depend on alpha, beta, or the ply. Although I don't
know how to fix this, removing all pruning seems to solve such problems in my
program. I suspect that is because pruning actually decreases the effective
searched depth in a particular line and when the original depth is stored into
the hash table at a lower ply, that misguides the rest of the search.

Regards,
Koundinya



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.