Rodent III Manual

User Manual: Pdf

Open the PDF directly: View PDF PDF.
Page Count: 17

Rodent III UCI
There are different kinds of chess engines. Some are programmed for strength. Komodo by Mark
Lefer, Larry Kaufman and late Don Dailey has been able to beat human grandmasters giving them
material odds. Some, like Stockfish, merge the pursuit of strength with adherence to software
engineering principles. Some are programmed to prove a research hypothesis. Giraffe by Matthew
Lai plays strong chess using neural networks for evaluation and highly unusual search algorithm.
Some are programmed for style, like legendary Chess System Tal by Chris Whittington.
Rodent III has been programmed for tunability. You can turn it into a crazy attacker, an old-
fashioned positional player, or a sparring partner for Your kids. Its tuning options are both intuitive
and relevant from the chess point of view, making it a perfect free replacement of commercial
Uses UCI protocol
Playing strength above 2900 Elo on the CCRL scale
Multi-core support, tested up to 4 threads
Powerful mechanism of personality files that can totally transform Rodent's playing style
Weakening (weak personalities or lower UCI_Elo levels are the same on different machines)
Can use two Polyglot opening books (typically smaller "guide book" and bigger main book)
Internal opening book as a backup
Multi-PV (up to 12 lines)
To be added
endgame tablebaes
Facts and numbers
Rodent III is an open source chess engine by Pawel Koziol, licensed under GPL 3.0. It is based on
a much weaker engine Sungorus 1.4 by Pablo Vazquez (
This marks Rodent as it a derivative work.
Rodent III is just a chess engine, so in order to enjoy it you will need a graphical user interface
(GUI). Some of possible choices are: Winboard, Arena, TarraschGUI, or recently discontinued
ChessGUI. If You are using another GUI, You should be fine as long as it understands UCI protocol
(which is usually the case, since top engines like Stockfish and Komodo use it).
Rodent's strength probably exceeds 2940 Elo on the CCRL scale. This should allow the engine to
hover slightly above the 50th place on CCRL and CEGT rating lists. You can conclude that Rodent
III is a decent engine, albeit far from the top dogs or from aspiring engines like Fizbo or ICE.
Notes about recent releases
Rodent III is a complete rewrite. It has been rather draining to do it relatively soon after a rewrite of
Rodent II, but unfortunately I failed several times trying to add multicore support to that codebase.
So it was necessary to start anew from the Sungorus code base, add multi-core support and only
then start adding all the features of Rodent II.
The first release of the multi-core engine, marked as Rodent III version 0.172, has been a little too
hasty. At that time I seriously considered handing over the engine developement to someone else,
and treated multi-core code as a kind of bait. However, no developer stepped in at that time.
Despite good results in bullet tests, on the rating lists the new engine scored a bit worse than Rodent
II. Naturally I wanted to fix that. Around this time, a new contributor appeared Siergiey Ivanov,
going under the GitHub handle of tico-tico. He proposed numerous changes improving user's
experience, such as faster loading of the opening book, reduced probablility of crashes upon
receiving malformed input, modernized the code, made transposition table thread-safe and acted as
a human debugger far too many times to mention.
He has also provided AppVeyor build scripts, thoroughly remodelling the notion of "Rodent
release". As of now, each change on Rodent's GitHub account results in a new build.
Out-Of-The-Box experience
Rodent package is shipped as ready to go all you have to do is to download the distribution
package and inastall it under Your favourite graphical user interface. Later on it is possible to
improve upon initial experience even further, but why not start by playing a couple of games from
the get go?
Assuming the original, unmodified basic.ini file, initial options will look like that:
All the options are supposed to have clear, unambigous meanings, but I will explain them
Threads is the number of processors/cores that are to be used while playing or analysing.
Increasing their number makes te engine stronger (even though occasionally it can require more
time to find a tactical shot). Of course, this is applicable only on multi-core machines. Rodent III
supports up to 8 threads and has been tested at 4.
MultiPV option useful for game analysis. If greater than one, Rodent displays up to 12 diffrent
lines together with their scores.
TimeBuffer is an emergency option. If you notice that Rodent loses on time, which can be caused
by a delay of communication between the engine and the graphical user interface, increase this
value. On my laptop, Arena 3.5 needs TimeBuffer set to 200, whereas LittleBlitzer works with
default value of 10. Your mileage may vary.
PersonalityFile gives You access to the real Rodent magic. It allows you to choose between
opponents of different strength and playing styles. Upon downloading Rodent, you probably got a
folder of personality files. If not, download books folder and personalities folder, and then place
them in the folder where you keep the engine. Then you can locate the desired file in the folder
called "personalities" and play against the opponent of Your choice.
Verbose – when this option is ticked, Rodent displays some additional comments and informations.
Ponder tells the engine to be prepared to think on opponent's time. Please note the exact wording of
the sentence you will probably have to activate pondering wherever Your graphial user's interface
gives access to this option. Here you only tell the engine to expect it. Currently this option does
nothing, being added only to satisfy those graphical user interafaces that require its presence to
initiate pondering. Later on it will probably influence the time management.
UseBook – decides whether the engine will use opening book. Disabling it is important if You want
to run a fair test, because Rodent normally uses internal opening book.
VerboseBook if this option is activated, Rodent displays additional information about moves
inthe opening book
ClearHash a button that resets hash table and all remaining information that Rodent gathered
during analysis.
Personality tuner
It is perfectly possible to edit personality files by hand. I have done so in the past, so I know that it is a
tedious, error-prone process. Fortunately, you do not have to follow suit. Rodent comes with a little
html/JavaScript tool, capable of working offline, serving as a graphical interface for personality creation.
The tool looks more or less like that (depending on the browser used to open it):
As you can see, the tool highlights certain options. If you hover a cursor over the highlighted option, a
short description of its meaning should appear. Some options are highlited more strongly this is an
indication that I consider them more important for shaping program's style. Of course as a user you are
free to disagree and experiment (but please remember that increasing "N likes closed" leads to preferring
closed positions).
Explanations of all the options can be found in the section Evaluation parameters. General ideas about
personality creation are described in the document
Different kinds of magic – basic.ini file
As it has been stated before, Rodent allows its users to modify several options influencing its
playing style. The way of accessing all of them may seem a little clumsy. It is a result of an attempt
to have the best of both worlds: instantly accessible predefined styles for a casual user and a
possibility to tweak the engine for those who like it.
The choice between these scenarios must be made in basic.ini file. That file does not initialize the
engine itself, but drastically changes the way how it talks to the GUI. There are two setups:
"HIDE_OPTIONS", now considered default, and "SHOW_OPTIONS", retained for backward
compatibility. The first one lets the user play with predefined personalities, the second – to set them
manually via UCI options panel, which exposes significantly less parameters.
The second choice made in basic.ini relates to HIDE_OPTIONS mode only. The string
"PERSONALITY_BOOKS" means that opening books are read from personality files. This works
fine under Windows, but under Linux you must actually type correct paths to opening books in the
personality files. The string "GENERAL_BOOKS", on the other hand, allows to set opening book
independently and orders the engine to ignore book settings from personality file.
The third choice is between "ELO_SLIDER" and "NPS_BLUR". If ELO_SLIDER setting is in
effect, user gets the chance to set engine's Elo via standard UCI_Elo option. If he opts for
NPS_BLUR, he gets two independent parameters nodes per second limit and the pseudo-random
value added to evaluation function output. The first setting is more intuitive to use, the second one
gives more liberty to the user (see hilarious "Drunk" personality with full tactical strength and
hopelessly twisted evaluation).
The old way – SHOW_OPTIONS mode
As of now, SHOW_OPTIONS mode is considered obsolete. It is retained for compatibility, but
anyone who wants to tune the engine is encouraged to use personality creator instead. The reason is
simple even under relatively liberal Arena GUI displays more than 40 options in an ugly window
with sidebars, hiding some important buttons in the process. For that reason, in this mode only a
selection of options will be displayed, limiting user experience somewhat. This way of using
Rodent III is recommended only if you have problems accessing personality files.
Personality files
Operating in the "HIDE_OPTIONS" mode Rodent is initialized by a personality file, which uses the same
syntax as UCI parser, but may contain much more parameters than UCI options dialogue window.
Personality files can invoke the other (which may be useful if You want to change just one or two
parameters). Moreover, on reading a personality file all the parameters are reset to values that make sense
from a human point of view, so that tuning is safe and intuitive.
Automatic pre-setting of values is important, because default Rodent evaluation has been modified using
Texel tuning method, which arrived at some unexpected values. For example, endgame king tropism
bonus has become negative. This may even make sense from the chess point ov wiev, encouraging play
on both wings, but it totally changes the meaning of king tropism parameter.
If you want maximum strength, coming at the expense of a few such oddities, just load personality
called default.txt.
Personality files are simple text files, using the same syntax as the UCI options parser. Inslide, they look
like that:
; Preston
; Personality for Rodent III chess engine, version 0.210 or later
; Slightly materialistic, likes to pressurize the opponent in various ways
setoption name PawnValueMg value 95
setoption name KnightValueMg value 310
setoption name BishopValueMg value 322
setoption name RookValueMg value 514
setoption name QueenValueMg value 1013
setoption name PawnValueEg value 110
This kind of text spans through roughly 70 lines. Lines starting with a semicolon are comments, and are
not read by the parser.
Available personalities
Depending on the Rodent distribution, You will obtain a set of personalities predefined playing
styles, often together with tailormade opening books. That is where Rodent's powerful and
expressive option set really shines. For user's convenience, personalities are grouped in folders.
Again, not every distribution package will contain all the folders. Most of Rodnt personalities that
are in use, are described in a separate document personalities_list.pdf. Broad outline of what to
expect is shown below.
Personalities from the folder "famous" try to reenact the famous players.
"masters" are accomplished players in 2000-2300 range.
"league" contains players in 1700-2000 Elo range, often with certain quirks.
"club" players are meant to be in 1400-1700 Elo range.
"school" players are probably 1200-1400 Elo and they are prone to tactical mistakes.
"kids" folder packs even weaker players.
"fun" folder contains rather unusual opponents, some of them quite strong, but decidedly quirky
Evaluation parameters
Material options:
QueenValue, RookValue, BishopValue, KnightValue, PawnValue
These are material values, expressed in centipawns. This is how they appear in the obsolete
SHOW_OPTIONS mode, retained for backward compatibility (for its description see a chapter on
the basic.ini file).
QueenValueMg, RookValueMg, BishopValueMg, KnightValueMg, PawnValueMg,
QueenValueEg, RookValueEg, BishopValueEg, KnightValueEg, PawnValueEg
Material options as they appear within personality files and in the personality tuner tool. As you can
see, different values are set for midgame and endgame.
Usage guidelines: Generally pawns and rooks are a bit stronger in the endgame, knights slightly
KeepQueen, KeepRook, KeepBishop, KeepKnight, KeepPawn
preference for a given piece for the computer side. These values should be rather low.
Usage guidelines: KeepQueen = 20 is generally a good addition for aggressive personalities, since
Rodent does not evaluate king attacks for the side without a queen. KeepPawn value of 2 or 3
together with KeepKnight set at 5 and KeepBishop set at -5 should be a good starting point for a
personality that likes closed positions.
basic bonus for a Bishop pair. Default 50 is a reasonable value.
Usage guidelines: You might lower it while trying to emulate Nimzowitsch or Tchigorin.
for best play this value should be negative.
Usage guidelines: making it positive has interesting, if weakening effect on engine's personality, as
long as opening book allows Rodent to keep its options open.
Penalty for having two rooks. It is meaningful for the side with exchange advantage, and makes it
want to simplify by exchanging rooks.
this bonus is applied to a side is exchange up (having a rook against a minor piece).
Usage guidelines: Lowering this setting to makes the engine more inclined to exchange sacrifices.
Useful if You want to emulate Petrosian (coupled with defensive play and preference for closed
positions) or Topalov (coupled with attacking play).
a bonus given for each pawn if a knight of the same side is present. Actually it is tuned in such a
way that knight gains value with 5 or more pawns on the board, and loses otherwise. This option
should generally have a single-digit value (default is 6).
Usage guidelines: KnightLikesClosed may sound like a dry, technical option, but its effects are
rather interesting: increasing it causes the engine to love and cherish its knights, and in case it ends
with knight(s) against bishop(s) it urges Rodent to keep as many pawns as possible, thus keeping
position closed. Predefined "Hedgehog" personality makes use of this trick.
rooks gain power with more open files available, and therefore with less pawns on the board. Both
this and the previous option come from the classic article Evaluation of material imbalances by GM
Larry Kaufman.
this is a bonus for each minor piece opposing opponent's queen. Higher value will make the engine
more likely to go for positions with unbalanced material.
percentage of material value used in actual evaluation. This idea comes from Rhetoric chess engine.
For consistency, it changes both visible and hidden material-related options.
Usage guidelines: Use it with caution! 90% is enough to see a lot of pawn sacrifices without
compromising playing strength, anything below that leads to much weaker, but very entertaining
play style.
Positional options
basic positional score from piece/square tables, kings not included. Explanation for non-
programmers is that raising it exaggerates the effect defined by PstStyle, whereas lowering it makes
engine more dependent on mobility evaluation.
percentage of mobility value for engine side.
percentage of mobility value for non-engine side.
percentage value of engine's king attack.
percentage value of opponent's king attack.
Usage guidelines: Mobility and attack options may be set independently to create asymmetric
evaluation. This is the core of personality tuning mechanism. The engine can concentrate on
carrying out own attacks, on preventing opponent's agression, on activating own pieces or on
blocking enemy movements.
Fiddling with mobility can also have an interesting side effect: if opponent's mobility weight is
bigger, engine will be slightly more inclined to exchange pieces. You might want to compensate this
effect by using small positive values for keeping own pieces on the board.
Since Rodent's evaluation is rather speculative, value around 150 would already create a ferocious
attacker. However, personalities created by Ferdinand Mosca (Kinghunter) and Brendan J. Norman
(Henny, Remy) successfully use even higher values.
percentage of value awarded for piece proximity to enemy king. Pieces that are far get a penalty,
those that are near get a bonus, different weights are used for each piece (there ar two sets: for
midgame and for endgame). Exact values are derived from GambitFruit. Initially I thought that it is
only a "flavour" option, but tests have shown that low values tend to score slightly better than 0.
Usage guidelines: aggressive personalities with high tropism and low tropism behave differently:
the first kind amasses pieces around the enemy king, the other one shoots from afar. Negative king
tropism might make sense for certain positional personalities (Petrosian rather than Nimzowitsch),
but its impact is untested.
weight for a bonus for attacking enemy pieces.
Center Control
Additional mobility bonus for controlling central squares. Default is 50.
percentage of penalty for isolated, backward and doubled pawns, as well as for pawns supporting
each other (defended or standing side by side).
Usage guidelines: Increasing this option results in more tight game and may be suitable for some of
the positional personalities.
percentage of bonus for passed and candidate passed pawns. Engine increases this bonus for
connected passers, decreases it for blocked passers and makes a correction for control of a stop
weight of a bonus for occupying good squares immune from attacks by enemy pawns or defended
by own pawns. This deals with positioning of minor pieces.
Usage guidelines: this value might be increased for positional personalities, but it is not strictly
weight of a bonuses for open files, semi-open files and major pieces on the 7th rank.
Pawn shield
this option determines engine's desire to protect king with own pawns.
Pawn storm
this option determines the willingness to attack enemy king with pawns.
this option determines the bonus for placing pieces on enemy half of the board (generally: the more,
the merrier and stronger pieces have bigger weight)
Small bonus for any fianchettoed bishop
Bonus for a fianchetoed bishop near own king. Default is 0, but even ludicrously high values like 50
tend to test rather well.
Returning Bish
Bonus for a bishop that returned to its initial square after castling (say, 1.e4 c5 2.Nf3 Nc6 3.Bb5 d6
4.0-0 Bd7 5.c3 Nf6 6.Re1 a6 7.Ba4 b5 8.Bf1
Binus for a minor on 2nd, 3rd or 4th rank with a pawn in front of it.
Bonus for a pawn that can attack enemy piece
Pst style
this option is rather difficult to describe – it makes the engine choose between three different sets of
piece/square tables. These are the backbone of evaluation function, telling which piece belongs
where. The available choices are likely to be expanded, but for now three distinct styles are
Number in UCI options dialog Name in personality creator About
0 quirky dynamic, likes advancing edge
1 classic likes to centralize pieces
2 normal balanced style
3 blunt Weaker, primitive, centralizing
This options gives two possiblilties. Mobility can be either linear (gain from 1 to 2 possible moves
is the same as from 7 to 8) or autotuned (values generated using Texel tuning method, looking a bit
strange but surprisingly efficient nevertheless). In personality creator, we use the aforementioned
names, in UCI options dialog 0 is linear and 1 is autotuned.
Other options
irrelevant for eval tuning, influences usage of Polyglot books by eliminating moves with the value
lesser than a given percentage of best move's value. Read more in "Opening book" section.
nodes per second. This option is meant to slow the engine down, and used to create weak
personalities. This needs more testing, but NPS of about 5000 puts Rodent somewhere within the
1600-1800 Elo range (FIDE scale).
Random value added to evaluation function, used to create weak personalities.
Represents the unwillingness to draw. For example, value "12" means that in the opening position
Rodent will prefer to be 11 centipawns behind than to accept a draw by repetition.
percentage modifier for time usage. Values < 100 make the engine play faster at the beginning of
the game, values > 100 make it use more time.
Another way of weakening the engine. Search skill lower than 10 means that certain search
techniques are disabled.
Search skill 1 – transposition table enabled
Search skill 2 – null move enabled
Search skill 3 – LMR of quiet moves enabled
Search skill 4 – razoring enabled
Search skill 5 – futility pruning enabled
Search skill 6 – late move pruning enabled
Search skill 7 – aspiration window enabled
Search skill 8 – static null move enabled
Search skill 9 – reduction of bad captures
Search skill 10 – null move verification
Contribution from Roman T. Savonyan. If above 0, it denotes depth at which score is modified by a
formula that makes engine to like risky continuations.
Determines how often Rodent uses pruning and reduction heuristics at move level. This option
affects late move reduction, late move pruning and futility pruning, but has no effect on null move
pruning and razoring. Minimum value of 0 switches these techniques off, maximum value of 200
means using them on any eligible move. Values in between indicate how often a move that has been
successfull in the past searches is exempt from pruning. Default value is 175.
Usage guidelines: Default has been tested to be stronger than 150 and 200. Values around 100 can
be used to emulate primarily positional players.
Describing personalities
When creating new personality for Rodent III, it might be a good idea to prepare a description,
telling the user what to expect. Description can be brief (just a couple of adjectives) or more
"artistic" (describing a set of parameters as if it was a human character). Here I propose a couple of
terms. Please treat them as guidelines, not as
Proposed term Meaning
active OwnMobility increased
restricting, grinder OppMobility increased
aggressive OwnAttack increased
careful, prophylactic OppAttack increased
dynamic both OwnAttack and OwnMobility increased
materialist MaterialWeight > 100
sacrificing MaterialWeight at about 90
romantic MaterialWeight < 90
classical PiecePlacement > 100
improvising PiecePlacement < 100
solid PawnStructure > 100, possibly also Outposts > 100
undervalues/overvalues X piece value different from default
likes blocked positions KnightLikesClosed > 6 KeepPawn > 0
moderate NPSLimit at about 2000
weak NPSLimit < 1000
careless high evalBlur
fast MoveTime < 100
slow MoveTime > 100
Opening book
Rodent uses two Polyglot (*.bin) books in succession. The idea behind this design is that first book
may be a narrow, handmade repertoire book, whereas the second one, usually bigger and more
general, constitutes a fallback option.
Rodent has a unique feature allowing it to filter moves that would be used with the frequency lower
than n% of best move frequency. Default settings use n = 10. If you set it to 100%, engine will pick
only the book moves played with the greatest frequency. Most of the time it will be just one move,
sometimes two or three. When using rodent.bin, 50% will give you a narrow book exploring only
major alternatives.
Elo NPS Rejected version weak below
1000 50 54 200
1100 130 58 180
1200 210 64 160
1300 34 72 140
1400 71 98 120
1500 141 128 100
1600 276 186 80
1700 630 303 60
1800 1.140 540 40
1900 2.000 1007 20
2000 5.000 3800 0
2100 8.400 7560 0
2200 17.600 15051 0
2300 38.000 30000 0
2400 63.000 60000 0
2500 132.000 241000 0
2600 330.000 482000 0
2700 570.000 964000 0
2800 1mln+ 1 mln+ 0
TODO: multiply speed below 1600 Elo
As it has been told at the beginning of this document, Rodent III is a derivative of much weaker, yet
very cleanly written engine Sungorus by Pablo Vazquez ( Its
concise and logical code served as a base to add further enhancements.
Throughout the developement cycle, a lot of knowledge from other open-source programs has been
added. I have signed "Programmers code of Honor" initiated by Ed Schroeder, and it obliges me to
list all the stuff that comes from external sources.
Ideas taken from the outside sources and external code usage
codebase of Rodent originated from Sungorus by Pablo Vazquez
penalty for minor pieces that cannot reach enemy half of the board inspired by a post of
Andscacs author
material imbalance table and penalty for a c3/c6 knight blocking pawn on its initial square
came from Crafty by Robert Hyatt
many evaluation weights, including piece square tables (PstStyle = 1 / "classic") and
mobility values (MobilityStyle = 1 / "linear") came from Fruit via Toga log user manual.
Fruit values served as reasonable first guesses and some of them were subsequently retuned.
PstStyle = 0 / "quirky" is symmetricised and tweaked version of Hakapeliitta piece/square
razoring implementation and forwardness evaluation from Toga II 3.0
Texel tuning algorithm
test positions used in Bench() taken from DiscoCheck by Lucas Braesch
hanging piece evaluation based on DiscoCheck by Lucas Braesch (expanded to defended
and undefended pieces)
material imbalance table is based on Crafty by Robert Hyatt
king tropism formula comes from GambitFruit by Ryan Benitez (who has modified Fruit by
Fabien Letouzey)
forwardness eval term is based on space evaluation from Toga II 3.0 (another Fruit
derivative by Thomas Gaksch and Jerry Donald)
razoring code is also based on Toga II 3.0
aspiration search based on Senpai 1.0 by Fabien Letouzey
late move reduction formula and the way of initializing king safety tables is based on
pawn island evaluation comes from Texel by Peter Österlund
GetBetween() function used to generate discovered checks has been lifted from
Chessprogramming Wiki via code of Laser by Jeffrey An and Michael An
non-magic move generation from Chesprogramming Wiki (occluded attacks)
magic bitboard move generator by Pradyumna Kannan
One of the great properties of open source is that it encourages peopole to improve somebody else's
work. Rodent started like that and in turn obtained a fair share of similar help. These people helped
to improve Rodent.
Jim Ablett supplied Android compiles
Graham Banks made a funny, cartoon-like logo
Matthew R. Brades, Denis Mendoza and Martin Sedlak supplied Linux compiles of some
1.x versions
Lucas Braesch prompted me repeteadly to maintain Linux compatibility
Dann Corbit has sent a patch allowing to use popcount intrinsics and fast 64-bit compiles,
pointed some bugs.
Jon Dart supplied a Linux patch of some bitboard functions
Kestutis Gasaitis made a thorough code inspection of 0.xx versions, spotting bugs and
suggesting improvements.
Raimar Goldschmidt supplied several bugfixes and created personality testing framework
Sergei Ivanov made transposition table thread-safe, cleaned up multithreading code, sped
up initialization and compilation of opening book, created alternative way of accessing
personalities, fixed several interface bugs and yet refused to be listed as co-author.
Dave Kaye prepared Rodent II to be compiled under Linux
Norman B. Leisner created a pack of logos for various Rodent personalities
Denis Mendoza created a logo featuring Speedy Gonzales
Ferdinand Mosca created very funny KingHunter personality
Brendan J. Norman created several interesting personalities for different Rodent versions
and reviewed engine on his web page
Frank Quasinsky tested Rodent II for FCP rating list
Mike Sherwin had an interesting reduction idea – I changed it into something else, but the
basic premise is the same, and relevant code is triggered by sherwin_flag in search.cpp
Roman T. Sovanyan created Rodent Risky branch, and his weakening code has been
accepted in Rodent III
Pablo Vazquez, has kindly allowed me to use the codebase of Sungorus to start this project,
which actof good will is never mentioned enough

Navigation menu