Impact of the setoption Hash value

Discussion of chess software programming and technical issues.

Moderator: Ras

Peperoni
Posts: 72
Joined: Sun Nov 01, 2020 5:27 pm
Full name: Richard Porti

Impact of the setoption Hash value

Post by Peperoni »

Hello,

Sorry for this naïve question, but I would like to know in which conditions this value really makes a difference.
Is it only the case with very big depth?

This is not too clear to me :|

Thanks
User avatar
hgm
Posts: 28441
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Impact of the setoption Hash value

Post by hgm »

It depends a bit on the engine. But with a good hash table the setting should hardly matter at all when the table is large enough to store some 10% of the reported number of nodes in a typical search. For smaller hash tables the search time increases approximately as the inverse 12th root of the hash side. That is, reducing the hash size by a facttor 4096 would double the search time, which again reduces strength by 50-70 Elo in fast games.
Peperoni
Posts: 72
Joined: Sun Nov 01, 2020 5:27 pm
Full name: Richard Porti

Re: Impact of the setoption Hash value

Post by Peperoni »

hgm wrote: Thu Nov 12, 2020 4:21 pm It depends a bit on the engine. But with a good hash table the setting should hardly matter at all when the table is large enough to store some 10% of the reported number of nodes in a typical search. For smaller hash tables the search time increases approximately as the inverse 12th root of the hash side. That is, reducing the hash size by a facttor 4096 would double the search time, which again reduces strength by 50-70 Elo in fast games.
Thanks :-)
Does that mean that running games one at a time with max Threads and max hash size is less efficient than running multiple games in parallel ?
User avatar
hgm
Posts: 28441
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Impact of the setoption Hash value

Post by hgm »

Indeed it does. Doubling the number of threads (or pondering) is not as good as doubling thinking time. Doubling hash has only about 1/12 the effect of doubling thinking time. So the most efficient way to use, say, 8 cores is to run 8 games in parallel, each using 1 thread and 1/8 of the free memory for hash, at a TC 8 times slower than you would otherwise have done.
Peperoni
Posts: 72
Joined: Sun Nov 01, 2020 5:27 pm
Full name: Richard Porti

Re: Impact of the setoption Hash value

Post by Peperoni »

hgm wrote: Sat Nov 14, 2020 10:55 am Indeed it does. Doubling the number of threads (or pondering) is not as good as doubling thinking time. Doubling hash has only about 1/12 the effect of doubling thinking time. So the most efficient way to use, say, 8 cores is to run 8 games in parallel, each using 1 thread and 1/8 of the free memory for hash, at a TC 8 times slower than you would otherwise have done.
Fantastic, many thanks :D