top of page
Writer's pictureDarius

Engine Parameters

  • What are chess engine parameters ?

  • Is it worth changing them?

  • When is it worth changing engine parameters ?

  • What does changing parameters do ?

  • What influence do they have on the strength and style of the engine?

  • ....


Before we answer these questions, I propose we watch a chess game between the Zappa and Nimzo engines.


15 white's move. Zappa sacrifices Knight.

Fen: r2q1rk1/p2nbNp1/b1p1pn1p/8/2pP4/2B3PB/P1QNPP1P/R4RK1 b - - 0 15


White's 20th move. Zappa sacrifices a second figure.

Fen: r6r/p2nbk2/b3Bnpp/q1p1B3/2pP4/5NP1/P1Q1PP1P/R4RK1 b - - 0 20


Paul Morpy, Mikhail Tal - giants of the tactical games.

The difficulty of playing against such strong and aggressive chess players is that all it takes is one mistake or sometimes one inaccurate move and the game is lost or - at most - ends in a draw (with a lot of luck).


Nimzo has just committed such an inaccuracy. He had the game won, but instead of playing 21...Nxe5 he chose 21... Bb7, which according to Stockfish engine, equalized the game.


Zappa took advantage of this inaccuracy by playing a strong 22.e4!


In the end, after all the storming on the chessboard, this game ended in a draw.


Zappa played with a parameters called Dessident Aggressor, (parameters author: Robert Flesher) which transformed the playing style of this engine to that of a mad attacking grandmaster who doesn't hesitate to sacrifice pawns and pieces to smash the opponent's King.


Zappa version Mexico II on my hardware (4 processors) with default parameters plays with a strength of about 2950 Elo. Nimzo in version 8 on my hardware plays with a strength of 2500 Elo.


Based specifically on this change in Zappa's engine parameters (Dessident Aggressor), you can see that his style of play has changed dramatically, the strength of play has decreased by about 300 Elo points.

Ultimately, this match consisting of 10 chess games won by Zappa, but Nimzo was not without chances.


I am making 10 games of this match available for download in .PGN format.


From a chess man's point of view, this match played by engines at grandmaster level in fascinating style. It was certainly not a boring duel.


The author of this article found it hard to tear himself away from looking at chess games played in beautiful style, full of sacrifices and various tactics.


Okay. That is, we know that changing the parameters affects the strength and playing style of the chess engine.

Now let's see what parameters we can change in several different engines: both older and newest ones.



Phalanx XXII engine - we do not have the ability to change any parameter.


Booot engine - we can only change the number of Threads (cores).


Tiger engine in Gambit version - we have several parameters to change, including Gambit level.


Goliath Light 1.5 engine, also we can change several parameters, including Selectivity for example.


Modern Nemorino 6.00 engine - and here we can change several parameters, including selecting EvalFile.


Another modern and very powerful Fire 8 engine - also we can change several parameters, including Contempt.


Currently (March 2022) the most powerful chess engine Stockfish 14.1 - gives us the possibility to change parameters including e.g. Skill Level.


Zappa Mexico II, which was one of the participants in the match described above. We can configure Zappa with many parameters, including for example Enable mate Extensions.


Nimzo, an engine that has many different parameters to change, including the value of figures. As you can see in the picture, for example, Nimzo values Bishop (435) a bit more than Knight (420).


Deep Hiarcs 14 WSCS, an engine with a reputation for playing in a very human-like style - has some interesting paraemtras to change, including Position Learning.


Dragon 2.6.1 by Komodo, is a super powerful engine that has many parameters in the configuration menu to change, including Use MCTS.


And the last of the engines I chose for the purpose of this article - TheKing 3.50, which is the engine that drives the Chessmaster series programs. It has a lot of parameters to change including, for example, Selective Search.


The potential for change in TheKing engine, has encouraged many talented chess players to change its parameters. As we can see in the listing below, in the case of Chessmaster 11 the default parameter settings of the TheKing engine turned out to be weaker than the parameters set by users !

Source: CCRL

From the data I've shown, we can infer that it's worth changing the engine parameters if we want to try to increase the engine's play strength and/or change the engine's play style.

Dear reader, you should know that there is not some standard of names for parameters that affect the play of chess engines. Each developer at his own discretion introduces (or not) parameters for possible engine reconfiguration.


Below I will try to collect the most commonly used chess engine parameters, name them, and describe the effect on the engine's behavior during play and analysis.


Let me not discuss in detail the parameters whose names clearly indicate the function they perform, e.g. Enable Mate Extensions or Eval File, etc.


Hash

Hash arrays are areas of memory where a program can store positions and ratings when calculating moves in a game. If the program encounters the same position again, it can simply retrieve its rating from the hash tables instead of analyzing it all over again (which takes more time).

Hash tables greatly increase the playing power of a program. This is especially true with modern and powerful engines. Some of them fill up the Hash very quickly.


Specifies the maximum amount of memory (in MB = Mega Byte) that can be used per transposition table - a major factor in performance - especially the performance of modern chess engines. It is usually best to use half the available RAM per Hash, but a smaller Hash size will slightly improve performance in a fast game, such as 5 minutes for the entire game.


In modern chess programs, hash tables can fill up very quickly, so an optimal hash table size may not be achievable, especially when deep searching or using a deep analysis program, or when the amount of memory on a given machine is limited. In these cases, the rule of thumb is to set the hash table size as large as possible without sacrificing system performance. If your computer uses a super-fast SSD (solid state drive), then even exceeding half the RAM for the hash table may not slow down the chess engine and operating system.


If you use the chess engine for deep analysis or playing long time games, then I recommend setting the Hash parameter to the highest possible value, keeping in mind the engine and operating system speed.

For ordinary applications, the engine needs only 128 to 512 MB of memory for Hash; slightly smaller and larger values should not affect its operation negatively.


In some GUIs, such as Fritz, Shredder while the engine is running, we can see the rate expressed in percentage, which capacity of the Hash is used.


This is a useful information, which without the need for complex calculations shows if the engine is "choking" on available Hash memory, or if it has enough.



Threads

Threads / Cores / CPU. This is an important parameter that affects the speed (calculation) of the chess engine.


If you need the maximum playing power of a chess engine, then set the Threads configuration option to a value smaller than the number of physical cores of your computer. For example: use 7 on a 8-core computer. This will leave one core available for other programs and operating system while the chess engine runs in the background.

There is a Hyper-Threading option in some processors.

As new processors evolve, their capabilities change—the general rule is not to use more threads than physical cores.


For ordinary uses, such as quick analysis of a chess game, finding threats, or training with the engine - just set Threads to 1.

Nowadays, modern chess engines even on a single Threads play at more than 3000 Elo, enough power for most purposes.



Contempt

The Contempt option lets you override the chess engine so that it more or less avoids draws. More precisely, this option sets how much the engine should favor its own positions and the values of its pieces and pawns. In simpler words, Contempt makes the chess engine more or less confident in its work.


Different engines accept different range of Contempt values, so I suggest you read the technical documentation of the engine in question, where this parameter and its influence on engine operation should be described.


The default Contempt value of an engine means its optimal play against any opponent. It is a good idea to change the Contempt value if you expect to play against a much weaker opponent or against a much stronger opponent; this can improve game results. For example, by appropriately setting Contempt against a weaker opponent, an engine will only exchange and dispose of pieces and pawns when it determines that its position evaluation will significantly increase in its favor.

With Contempt against a stronger opponent, the engine will try to get rid of pieces as often as possible to weaken the opponent's strength.



Selectivity

The Selectivity parameter can be used to adjust the aggressiveness of the position tree search while the engine is running. Usually higher values encourage the chess engine to trim the position tree more aggressively which leads to deeper overall searches and increases the risk of missing some moves.


Changing the selectivity parameter makes sense when, for example, analyzing a position full of tactical possibilities - which can help the engine find the precise line of play faster.

For complex positions with positional play - I do not recommend changing the Selectivity parameter.



King Safety

This controls how high the engine rates the King security. The higher the value, the greater the effects of attacks on the King.

Like Selectivity, this parameter can have a significant impact on a chess engine's play style. I suggest looking at the Dessident Agressor parameters of the Zappa engine.

Here are the parameters Dessident Agressor for the Zappa Mexico II chess engine, created by Robert Flesher.

After changing the King Safety parameter (and others) from the default 100 to 500, this engine pays much less attention to the safety of your King when playing, throwing all your forces into the attack,



LMR

LMR = Late Move Reduction is a search technique that aims to reduce certain moves in the search tree so that you can get more overall depth. However, this can sometimes result in good moves being missed.

I don't recommend turning on LMR during, for example, a position analysis where we need a very accurate search.



Null Move

This is another technique (like LMR) for removing moves from the search tree.

This parameter can be useful when you have a difficult position that cannot be solved easily and you want to see if a shallower but more accurate search would help you find a good move - then it is worth turning off the Null Move parameter.


Most modern engines play much more strongly with the Null Move option enabled, because they use different techniques and have very effective position evaluation functions, which in the vast majority of cases do not miss important moves and lines.



Numa

This is a parameter that affects the organization of RAM and Threads usage by the chess engine.

For engines running in Linux and Mac systems, this parameter is automatically set to the best value in 99% of engines.

On Windows system, NUMA should be left unchanged in most cases. NUMA can have a very significant impact on engine performance up to +-25%. Changing this parameter can also be useful when running, for example, two or more instances of the same chess engine.

If you are not sure whether changing this parameter is beneficial, I suggest leaving its default value.


Large Pages

Some chess engines can use so-called Large Memory Pages.

It is only possible, if Large Pages is provided by the operating system.

When Large Pages is enabled, engine speedup can range from 5% to 15%, depending on the size of the Hash board.


How to enable access to Large Pages ?

For example, in Windows this requires changes in advanced system settings. Inquisitive readers may be referred to the website of the operating system manufacturer.



Futulity / Futulity Pruning

This parameter turns on or off the use of the technique by the chess engine to discard moves that are not promising to find the best line.

Futulity Pruning is another way to increase the speed and depth of the search. In the vast majority of cases turning this parameter on gives good results.



Mobility

It is a parameter that describes a measure of the number of choices (legal moves) a player has in a given position. It is often used as a term in the chess engine evaluation function. It is based on the assumption that the more choices a player has, the stronger the position. There is a correlation between a player's mobility and the number of games won.


Depending on the position in question, changing this parameter can have a big impact on the strength and playing style of the chess engine.



Learning (Book, Position, etc.)

This is a parameter that determines the chess engine's ability to learn certain behaviors when analyzing and playing chess. It allows chess engine to learn from the games it plays. This can improve its play in future games.

For example, in the initial phase of the game a move made by the chess engine which resulted in a worse position will not be selected in the next game with the same position.


It is a good idea to have this parameter turned on if you frequently use the same engine.



Level of play / Skill / Strength / Elo / UCI Elo

This is a parameter that affects the play strength of the chess engine.

Since this parameter is implemented differently in engines, depending on the engine you choose, I suggest you read the technical documentation.


If we need the maximum playing strength of the engine, then I suggest not changing the default value of this parameter.



Tablebases / Use Tablebases / Nalimov / Syzygy / Gaviota

Don't use this parameter if you don't want the engine to access database tables to improve endgame.

Why should you not use this parameter ?

Because, for example, you don't have access to Tablebases, or you want to see how the engine evaluates endgame position using its own algorithm instead of using Tablebases.



MCTS

Monte-Carlo Tree Search this is the name of the parameters enabling MCTS algorithm with which the chess engine will work.


Enabling MCTS can dramatically change the way a chess engine plays.

Today (March 2022), engines running with the MCTS parameter enabled play with a playing strength slightly lower than when using the traditional algorithm (from the Alpha-Beta family) by about 50-100 Elo.

It is worth noting that over the last few years, engines using the MCTS algorithm have made colossal strides in terms of playing strength. It is possible that in the near future the development and use of the MCTS algorithm by chess engines will further increase their playing strength.


Due to the nature of the MCTS algorithm, it is worth using it in complex poses where you want to see the result of multi-line analysis. Multi-line analysis in an engine using the MCTS algorithm will not lead to a decrease in its speed.



NNUE

This is a parameter that determines whether the chess engine should use neural network architecture to evaluate positions during search.

Engines that support NNUE typically play 100 or more Elo points stronger than their predecessors using traditional chess position evaluation methods.


If you want the engine to play at maximum strength, then turn on the NNUE parameter.


It is worth noting that according to some chess players and experts, engines that use NNUE play stronger, but more "machine-like". This is, for example, one of the reasons why the author of the Hiarcs engine, Mr. Mark Uniacke, did not implement this technique in his engine, wanting to preserve its characteristic - human style of play.



Lines / PV / Multi PV

Typically, we can choose a number. This parameter will determine the number of analysis lines that the engine will show during operation.

For example, if you only want to see the best move that the engine "sees", then the Multi PV parameter should be set to 1. If, for example, you want to see 2 best moves along with analysis lines, then set this parameter to 2.


In some chess GUIs like Hiarcs, Fritz we can set this parameter with clicks.


This parameter is often not available in older chess engines or development versions.



Log / Logs

Logging the GUI / engine communication to a file in the (custom) same directory as the chess engine.


 

For chess players using chess engines for lengthy and difficult analysis of chess positions (e.g. for correspondence chess players), setting engine parameters can be a key factor in achieving an advantage or even winning a chess game.

Undoubtedly, a good correspondence chess player, in addition to being able to adjust the engine's play through parameters, has a wealth of chess knowledge that allows him to win chess games and tournaments.


Why change the parameters of chess engines ?

In addition to the answers given when discussing the various parameters, I might add... for fun or to search for interesting ideas in chess openings or middle games :-)

If talented experimenters did not change the settings of, for example, TheKing engine, we would not get a stronger version of it. Similarly for the Zappa engine and others.

If you want an engine to work for you, to choose from: tactical monster, precise defender or optimistic position player, etc., etc. then it's worth at least trying to enjoy playing with the chess engine parameters.


I am not urging you to change the parameters of chess engines. For the average chess player, the engine parameters are set optimally, providing play and analysis at the expected level. But if you want to "squeeze" the maximum out of the engine, then maybe it's worth to start experimenting ?




 

Comments


bottom of page