Goldilocks and the Hash Table

Sherwood, Russell  Tuesday, October 20, 2020

Following on from selecting the "best" version of an engine to use we now move onto setting the Hash table.

The Hash table is a storage location the engine uses to store position evaluations. If it sees the same position come up again it looks it up in the Hash table.

In theory, as long as looking up the position is faster than evaluating it again, the engine will search more efficiently. This means setting the Hash table to the "right" size can have a significant impact on both the efficiency and effectiveness of the engine search. 

If the table is too small then, it will fill up quickly and all positions will have to be calculated every time met, slowing down the search.

If the table is too large then it will be slower to search for the position that it is to recalculate it from scratch.

So how to we get the Goldilocks zone? It is a combination of:

  1. The Processor speed
  2. The available RAM
  3. The number of Cores being used to analyse
  4. The time being spent analysing each move

Processor Speed and Available RAM can be determined from the Windows system settings or via utilities such as CPU-Z. In general the amount of RAM being allocated to Hash should be no more than 50% the Total RAM of the system. Going above this level tends to slow down the PC in general

The number of Cores (not threads) you set for the engine - if you are using the PC mainly for analysis this will normally be the maximum, less one being used for the Windows system.

The time being spent on each move is a function of your analysis methods.  Rather than go through the formula, a small spreadsheet is attached which will estimate the setting to use.  

 

 

Download

Engine SettingsHashStockfish

Updated Tuesday, October 20, 2020 by Russell Sherwood

Welsh Correspondence Chess FederationBritish Correspondence Chess AssociationClergy Correspondence Chess ClubSchemingMind Internet Correspondence Chess ClubSocial Correspondence Chess AssociationNational Correspondence Chess ClubWelsh Chess UnionInternational Correspondence Chess Association