a LOT of comments implying that the similarity test is highly
sensitive to pieces square tables. The way it typically is expressed is
that all you have to do is change the piece square tables to fool the
similarity tool and "that's all it really measures."
Sometimes someone will make an assertion and over time it is given
"factual" status by it's being repeated enough times that pepole start
to believe it. This is a form of social (unintended) indoctrination
because the indocrinated person is not expected to question or examine
the facts critically. They go along with what they have heard and it
becomes part of their own belief system. Could that be happening
here?
I have never seen proof of this presented, only the assertion
itself. If anyone is aware of any studies I would be very interested
in seeing them.
Meanwhile, I decided to do my own study and I'm now reporting what I
have found.
I am starting with a comparison to Ivanhoe, using a development
version of Komodo, and 3 additional modified versions of Komodo. Two of
the modified versions of Komodo incorporarte the Ivanhoe piece square
table.
I am not very familiar with the Ippo family of programs so I first had
to get familiar with the code and find the tables in the source code -
that was not too hard. It turns out the tables are computed in
static.c - so the first step was to create komodo compatible
declarations. After doing so we end up with the following Ivanhoe
tables. Note that each square in the tables are represented with 2
values (pairs) where the first is the opening value and the second is
the endgame value. Since most major programs including Komodo now do
it that way there is no compatibility issues. The actual value used
in the program is interpolated by game phase. The tables are adjusted
to appear from the WHITE point of view as it would in a diagram and I
use the same convention in Komodo too.
Code: Select all
PAWN
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-17, -2, -5, -4, 1, -6, 8, -8, 8, -8, 1, -6, -5, -4, -17, -2,
-18, -4, -6, -6, 0, -8, 7,-10, 7,-10, 0, -8, -6, -6, -18, -4,
-19, -5, -7, -7, -1, -9, 6,-11, 6,-11, -1, -9, -7, -7, -19, -5,
-21, -6, -9, -8, -3,-10, 4,-12, 4,-12, -3,-10, -9, -8, -21, -6,
-22, -7, -10, -9, -4,-11, 3,-13, 3,-13, -4,-11, -10, -9, -22, -7,
-23, -7, -11, -9, -5,-11, 2,-13, 2,-13, -5,-11, -11, -9, -23, -7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
KNIGHT
-120, -15, -21,-10, -10, -5, -6, -2, -6, -2, -10, -5, -21,-10, -120,-15,
-16, -8, 0, -1, 11, 3, 15, 5, 15, 5, 11, 3, 0, -1, -16, -8,
-7, -3, 9, 3, 20, 8, 24, 10, 24, 10, 20, 8, 9, 3, -7, -3,
-5, -4, 11, 1, 22, 6, 26, 10, 26, 10, 22, 6, 11, 1, -5, -4,
-11, -6, 5, -1, 16, 4, 20, 8, 20, 8, 16, 4, 5, -1, -11, -6,
-20,-10, -4, -4, 7, 1, 11, 3, 11, 3, 7, 1, -4, -4, -20,-10,
-36,-15, -20, -8, -9, -4, -5, -2, -5, -2, -9, -4, -20, -8, -36,-15,
-58,-22, -42,-17, -31,-12, -27, -9, -27, -9, -31,-12, -42,-17, -58,-22,
BISHOP
-2, 0, -3, -1, -6, -2, -8, -2, -8, -2, -6, -2, -3, -1, -2, 0,
-3, -1, 3, 1, 0, 0, -2, 0, -2, 0, 0, 0, 3, 1, -3, -1,
-6, -2, 0, 0, 7, 3, 6, 2, 6, 2, 7, 3, 0, 0, -6, -2,
-8, -2, -2, 0, 6, 2, 15, 5, 15, 5, 6, 2, -2, 0, -8, -2,
-8, -2, -2, 0, 6, 2, 15, 5, 15, 5, 6, 2, -2, 0, -8, -2,
-6, -2, 0, 0, 7, 3, 6, 2, 6, 2, 7, 3, 0, 0, -6, -2,
-3, -1, 3, 1, 0, 0, -2, 0, -2, 0, 0, 0, 3, 1, -3, -1,
-7, 0, -8, -1, -11, -2, -13, -2, -13, -2, -11, -2, -8, -1, -7, 0,
ROOK
-4, -2, 0, -2, 4, -2, 8, -2, 8, -2, 4, -2, 0, -2, -4, -2,
-4, 1, 0, 1, 4, 1, 8, 1, 8, 1, 4, 1, 0, 1, -4, 1,
-4, 1, 0, 1, 4, 1, 8, 1, 8, 1, 4, 1, 0, 1, -4, 1,
-4, 1, 0, 1, 4, 1, 8, 1, 8, 1, 4, 1, 0, 1, -4, 1,
-4, 0, 0, 0, 4, 0, 8, 0, 8, 0, 4, 0, 0, 0, -4, 0,
-4, 0, 0, 0, 4, 0, 8, 0, 8, 0, 4, 0, 0, 0, -4, 0,
-4, 0, 0, 0, 4, 0, 8, 0, 8, 0, 4, 0, 0, 0, -4, 0,
-4, 0, 0, 0, 4, 0, 8, 0, 8, 0, 4, 0, 0, 0, -4, 0,
QUEEN
-11,-15, -7,-10, -4, -8, -2, -7, -2, -7, -4, -8, -7,-10, -11,-15,
-7,-10, -1, -5, 1, -3, 3, -2, 3, -2, 1, -3, -1, -5, -7,-10,
-4, -8, 1, -3, 5, 0, 6, 2, 6, 2, 5, 0, 1, -3, -4, -8,
-2, -7, 3, -2, 6, 2, 9, 5, 9, 5, 6, 2, 3, -2, -2, -7,
-2, -7, 3, -2, 6, 2, 9, 5, 9, 5, 6, 2, 3, -2, -2, -7,
-4, -8, 1, -3, 5, 0, 6, 2, 6, 2, 5, 0, 1, -3, -4, -8,
-7,-10, -1, -5, 1, -3, 3, -2, 3, -2, 1, -3, -1, -5, -7,-10,
-16,-15, -12,-10, -9, -8, -7, -7, -7, -7, -9, -8, -12,-10, -16,-15,
KING
5,-53, 10,-30, -20,-14, -40, -8, -40, -8, -20,-14, 10,-30, 5,-53,
15,-35, 20,-10, -10, 2, -30, 8, -30, 8, -10, 2, 20,-10, 15,-35,
25,-24, 30, -3, 0, 12, -20, 18, -20, 18, 0, 12, 30, -3, 25,-24,
30,-18, 35, 3, 5, 18, -15, 27, -15, 27, 5, 18, 35, 3, 30,-18,
35,-23, 40, -2, 10, 13, -10, 22, -10, 22, 10, 13, 40, -2, 35,-23,
38,-29, 43, -8, 13, 7, -7, 13, -7, 13, 13, 7, 43, -8, 38,-29,
41,-40, 46,-15, 16, -3, -4, 3, -4, 3, 16, -3, 46,-15, 41,-40,
44,-73, 49,-50, 19,-34, -1,-28, -1,-28, 19,-34, 49,-50, 44,-73,
I'm pretty sure that it's 100 in Ivanhoe and the the tables represent
their true value. If anyone knows differently please let me know. My
goal was to create a more or less drop in replacement table for Komodo
but without unduly obsessing about getting it perfect.
So to get the equivalent tables I multiplied the Ivahnoe values by 10.
I believe this gives me piece square tables that are exactly like the
Ivanhoe tables. In Komodo I use tables that can be adjusted by a
multiplier so I made a version also that uses the Komodo multipliers
as a second reference point.
I also made a third version that is not based on Ivanhoe - I took the
mobility values in Komodo and reduced them to 1/10 of their current
values. The idea here is to see if it's relatively simple to change
the evaluation funciton in a way that easily defeats the similarity
test. This was something I could do quickly and easily that should
have a relatively large impact on the evaluation function and yet not
completely cripple Komodo.
For referece I threw in a couple of critter versions, stockfish
versions and Komodo 3. So the question that comes to mind is this,
did I succeed in creating a program that plays just like Ivanhoe by
simply copying their piece square table? Strangely enough the answer
seems be that it had no impact whatsoever. At the end I will explain
why this should be no big suprise.
sim version 3
------ IvanHoe 9.47b x64 (time: 100 ms scale: 1.0) ------
62.09 Critter 1.4 64-bit SSE4 (time: 100 ms scale: 1.0)
61.58 Critter 1.6 64-bit (time: 100 ms scale: 1.0)
53.12 Komodo 4476.03 64-bit (time: 100 ms scale: 1.0)
52.40 Komodo 3 (time: 100 ms scale: 1.0)
52.33 Komodo with Ivanhoe tables x 10 (time: 100 ms scale: 1.0)
51.77 Stockfish 2.0 JA 64bit (time: 100 ms scale: 1.0)
51.53 Komodo with 1/10 mobility (time: 100 ms scale: 1.0)
51.02 Stockfish 2.2.2 JA (time: 100 ms scale: 1.0)
49.79 Komodo with Ivanhoe tables (time: 100 ms scale: 1.0)
When comparing the reference development version it is interesting to
see if this major table change affects Komodo's similarity to itself.
That is useful because we can imagine a cloner starting with Komodo RE
source and then trying to change the tables in order to defeat the
similarity tool:
sim version 3
------ Komodo 4476.03 64-bit (time: 100 ms scale: 1.0) ------
67.08 Komodo with Ivanhoe tables x 10 (time: 100 ms scale: 1.0)
63.15 Komodo 3 (time: 100 ms scale: 1.0)
61.45 Komodo with Ivanhoe tables (time: 100 ms scale: 1.0)
60.57 Komodo with 1/10 mobility (time: 100 ms scale: 1.0)
53.84 Critter 1.6 64-bit (time: 100 ms scale: 1.0)
53.63 Critter 1.4 64-bit SSE4 (time: 100 ms scale: 1.0)
53.12 IvanHoe 9.47b x64 (time: 100 ms scale: 1.0)
51.06 Stockfish 2.0 JA 64bit (time: 100 ms scale: 1.0)
50.87 Stockfish 2.2.2 JA (time: 100 ms scale: 1.0)
Here is the reason this should not suprise anyone:
Komodo has roughly 200 evaluation terms, many of them configurable and
some of them hard coded into the program. You could define the piece
square tables as 64 x 6 x 2 = 768 different evaluation terms and thus
view it as a major component but if you look at the code from any of
the programs that build their tables by construction you see that in
reality they represent a minor subset of the terms. How minor this is
depends on the program itself and complexity of the evaluation
function and how much any given term impacts the play in general. So
to get a more realistic picture of the impact of piece square tables
you have to realize that an equivalent program can be constructed
without piece square tables and this could be represented with just a
small handful of evaluation terms.
Here is an example to make that clear. Suppose I wanted to have a term
in the program which penalized having a knight on the edge of the
board? A single term could express that concept and it could be
computed easily. The piece square table is just a particularly
efficient way to express that concept and other basic concepts such as
piece centralization.
So it should come as no suprise that the piece square tables does not
represent a major component of the evaluation function. This is myth
that needs to be debunked.