need help with search instability

Discussion of chess software programming and technical issues.

Moderator: Ras

DrRibosome
Posts: 19
Joined: Tue Mar 12, 2013 5:31 pm

need help with search instability

Post by DrRibosome »

Are there any standard ways for dealing with search instability?

It seems like entries in the hash from previous searches somehow confuse the search, causing it to pick moves that it never would pick if I were to start the engine in that position with a cleared hash. This does not seem to be a huge problem (ie, it probably happens once every few games at most), but occasionally it picks very bad moves because of it. I know I could clear the hash, etc, before searching again, but I want to take advantage of the previously searched positions in the hash.
syzygy
Posts: 5844
Joined: Tue Feb 28, 2012 11:56 pm

Re: need help with search instability

Post by syzygy »

DrRibosome wrote:but occasionally it picks very bad moves because of it.
If your hash contains "very bad moves", you have a bug or you do something 'wrong'.

Just a guess. You should only store a move that improves alpha or fails high. In nodes where all moves fail low, you should keep the move that was previously stored for that position, if any.
User avatar
hgm
Posts: 28452
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: need help with search instability

Post by hgm »

This does not sound like 'search instability', but like a plain hash bug.
PK
Posts: 913
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: need help with search instability

Post by PK »

typical hash bug is saving stuff when time is out - been there, seen that, got a queen for free when playing against my first engine.