Lifting the Hood

Russell Sherwood  Sunday, April 16, 2017

Taking a look at Chess Engine Settings

 

Most players will use Engines with their default settings, yet for Correspondence Chess this could be a major mistake as most engines are tuned for fast time control Engine v Engine games, not Analysis or Correspondence play.

Most Engines are very poorly documented (Komodo being a notable exception!) so it can be hard without extensive research to determine the effects of various parameters, options and settings, hence this brief (and superficial) review. In general I won’t suggest the best settings as these can be very hardware dependent.

Before we move onto some of the common adjustable settings its worth thinking about the Engine itself. Chess Engines have two main working parts – Search and Evaluation:

Search is the method by which the engine decides which moves to evaluate. It has to do this because the number of possible moves is beyond astronomical and the number of moves it can evaluate, even with the best possible hardware is finite.

A very simple example – if we look at 20 (half) moves deep we are looking in the region of 10,000,000,000,000,000,000,000,000 possible positions – yet a typical engine on fairly modest hardware will reach this depth in a few seconds – during which time it will have “only” looked at a few million positions – clearly a tiny fraction of a fraction of a percent of the possible positions.

This means that search techniques have evolved that aim to reduce the number of positions looked at but the problem from our perspective is that sometimes the “Baby goes out the with bathwater”. This has been recognised and so a number of options exist which we can adjust which can make the engine stronger for Analysis even though it will be weaker in rapid gameplay.

Evaluation

This is the method by which the positions are evaluated – Options here tend to alter the relative impact of certain parts of the evaluation – e.g. Structure vs Initiative.

Onto the options – not all are available in every engine and even then the might have a slightly different implementation.

LMR (Late Move Reduction)

This is a technique where the amount of time spent analysing each move is proportionate to its prior rating – so moves considered better get more time and worse moves get less time. This can be observed if you watch an engine – it seems to spend a fair bit of time on the first few moves then rush through the later ones. If switched off this gives more time to worse moves, the benefit of this is that moves, where the real impact is “down the line”, can be picked up, the downside is that the engine analyses much slower.

Null move Pruning

This has a similar impact as LMR but is based here on the concept that in a position that doing something is almost always better than doing nothing (A null move). If switched off a much slower but more through search results which can be useful finding deep threats and zugzwang.

Reduction

This determines how deeply the engine search along some lines. When used in Komodo higher values will encourage a narrower, deeper search but with a consequence that it may miss a move!

Threads

If you are using a single engine this should be set to either the number of processors you have or this minus one if you intend to do other light work whilst analysing. There is an alternative view that this should be the number of physical processors your pc has but this is beyond this discussion.

Hashtable Size

This is the working memory your processors will use. General rule of thumb is that this should be around half the total RAM on your machine.

Smart CPU Usage

This determines the default number of Cores the engine starts with. Should be on.

Contempt

Should be set to zero. This is a setting for engine v engine play used to improve results against inferior opponents.

Syzygy Probe Depth

This determines the search depth at which the engine will probe the tablebases. Generally left at default value.

Syzygy Probe Limit

This is the minimum number of pieces on the board before the engine will start to access any available Tablebases. Should be set to what size of tablebases you have installed.

Large Pages

Where available this allows the memory allocation to be “together” generating a slight speed increase.

Tactical Mode

When utilised much more emphasis is given to Tactics in both the search and Evaluation. The is the equivalent of looking for a knock out punch. Of course, this is at the cost of positional concerns. This mode is very useful is tactically charged positions where the feeling is that “Something is on”!

Razoring

Is a method used to reduce the search based upon the assumption the opponent will be able to find at least one good move. Generally best left in its default state but if a wider but shallower search is required then experimentation is required.

Futility Pruning

Is another method used to prune the search tree – again best left at default.

Split Depth

This determines the depth at which the analysis will be split between multiple Cores.

Load Hash/Save Hash

A very useful tool where available for CC players. Here the Hashtable can be saved and then reloaded at a later date so that analysis can continue from the same or very near point.

Table Memory

This is a Komodo internal setting utilised for various helper tables. The default of 128 is for fast games and for CC the player should experiment with higher values up to a maximum of 1024 as this is hardware dependent.

King Safety

This is the relative weight given in the evaluation to King Safety. Set too high is can cause play to become stodgy and defensive, set too low it can cause the engine to become rather more carefree in its attacks but potentially leaving itself open to counter-attacks.

Selectivity

Another Komodo setting which controls how aggressively prunes the tree, higher values mean Komodo will search deeper but is more likely to miss something, lower values lead to a much more shallow search but is less likely to miss a move.

Dynamism

Controls the relative weighting of Dynamic and Static parts of the evaluation. An interesting comment in the Komodo Readme file is that values of 80 will give more accurate evaluations than the default of 100 but the engine will be around 20-30 elo weaker.

Progress Threshold

This parameter determines how quickly the engine starts to look at the 50 move rule.

Variety

Is a setting for engine v engine and determines how likely the engine will make a different move in the same position.

Extend Checks

This is an option seen in some Stockfish variants. This is related to extending the search certain positions. Generally best left at the default setting.

 

This brings us to the end of this review – for the aspiring player much suggestion is to experiment with settings to see which gives the optimal results!

Welsh Correspondence Chess FederationClergy Correspondence Chess ClubSchemingMind Internet Correspondence Chess ClubSocial Correspondence Chess AssociationNational Correspondence Chess ClubWelsh Chess UnionInternational Correspondence Chess Association