Using UCI to get deterministic output from engine

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Using UCI to get deterministic output from engine

Post by mcostalba »

bob wrote: Clearing hash is not even close to being enough. You need to clear primary hash (yes), clear pawn hash (no), clear eval hash (no), clear history counters (yes), clear killer moves (no, automaticaly cleared in search), clear counter-moves (yes)
Well 3 out of 6, not bad, could have been worse :-)
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Using UCI to get deterministic output from engine

Post by Evert »

mcostalba wrote:
bob wrote: Clearing hash is not even close to being enough. You need to clear primary hash (yes), clear pawn hash (no), clear eval hash (no), clear history counters (yes), clear killer moves (no, automaticaly cleared in search), clear counter-moves (yes)
Well 3 out of 6, not bad, could have been worse :-)
Where does it say that you have to clear killer moves in search?

Agreed that you probably don't need to clear pawn hash and eval cache though, except if you're paranoid about false hash hits.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Using UCI to get deterministic output from engine

Post by bob »

mcostalba wrote:
bob wrote: Clearing hash is not even close to being enough. You need to clear primary hash (yes), clear pawn hash (no), clear eval hash (no), clear history counters (yes), clear killer moves (no, automaticaly cleared in search), clear counter-moves (yes)
Well 3 out of 6, not bad, could have been worse :-)
Killer moves are not cleared automatically in most programs. Eval and pawn hash need to be cleared if the goal is deterministic behavior with respect to time as well as score.

I gave the safe approach.