I suspect you may have a hash table bug. What do your hash table entries look like?Cardoso wrote:My engine sometimes makes a really bad move.
But when later I analise that position with the hash tables cleared it immediately sees the right move.
And that bad move goes to the end of the root move list.
So I'm pretty sure the entries in the hash table from the previous search are causing the problem.
When time is out I set a stopsearch flag, and at the top of the search if this flag is set I return zero.
Also when the stopsearch flag is set I store nothing in the hash tables.
Is this ok? Do you clear your hash tables before searching?
What value do you return when time is out?
Have you seen this king of behaviour in your engine?
Thanks in advance,
Alvaro
If you are using Zobrist hashing like most people, I suggest further that you create a second zobrist hash that does not operate incrementally, but builds up the complete hash from scratch given the board position. Then use a special compile flag to enable total rehash calculation. When you are searching, compare the recalculated hash with the incremental hash. If you ever see a difference you have a bug.