Author Topic: How to Compute the Value of Chess Pieces on Boards of any size  (Read 155 times)

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
How to Compute the Value of Chess Pieces on Boards of any size
« on: January 13, 2018, 08:39:14 pm »
In March of 1876, a mathematician named Henry Taylor published a paper entitled "On the Relative Value of the Pieces in Chess" in Philosophical Magazine, Volume 5, on pages 221-229. In it he described a mathematically-sound, logical foundation upon which we can compute the (approximate) strengths of the chess pieces based on the concept of the "safe check." A so-called "safe check"exists when a piece can deliver check to an enemy king in such a way that the enemy king cannot capture it when the other king is nowhere to be found on the board. While this never happens in chess because there are always two kings on the board at least, this was a great way to gauge the relative strengths of the pieces based on a mathematical framework. It is from Taylor's work that we derived the Pawn = 1, Knight = Bishop = 3, Rook = 5, Queen = 9 rough values.

Taylor's math only works for chess boards that are perfectly square (designated nxn) and only for the "regular" chess pieces. In June 2004, I derived formulas for rectangular boards (designated r x f for number of ranks time the number of files) and extended the calculations for pieces such as the Archbishop (Bishop + Knight) and Chancellor (Rook + Knight). I also generalized formulas for pieces based on any combination of existing pieces, and proved the technique would work for pieces with any unusual move arrays if you adhered to the geometry I outlined:



The paper was published in the International Computer Games Association Journal in June 2004, Volume 27, issue 2. You can read more about it here:

https://www.semanticscholar.org/paper/80-Square-Chess-Trice/330e6cada5af2191248e09b5910527744592e10d

and here:

https://ilk.uvt.nl/icga/journal/contents/content27-2.htm

...or download it as a PDF right from my Google Drive:

https://drive.google.com/open?id=1wN2Kq8PMEO0scJOQFfVK0OD5xdjTbwdj

Share on Facebook Share on Twitter


chilipepper

  • Full Member
  • ***
  • Posts: 100
  • chilipepper
  • Location: U.S.
    • View Profile
    • QyiQ23607 Pisano
Interesting. That's a lot of stuff to read. I'm especially interested in the value of the archbishop and the chancellor. I see there are some results for those pieces (appears to be on the Gothic Chess board, i.e. 10x8)?

Any idea how much work it would be to generalize these results for even larger boards, and with a similar population of pieces?

For example, I'm curious what the value of these two pieces would be on 10x10, 12x12, 20x20, and so forth. Maybe even speculated results for an unbounded board (i.e. infinite chess)?

I presume this is not fast or easy answer, but curious what your thoughts are. :-\
the "chilipepper"👹

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
It is fast and easy to answer.

My formulas only need 2 inputs: r and f.

R is the number of rows.
F is the number of files.

Plug that in, and out pops the answer. But you have to read the paper to get the equations.

chilipepper

  • Full Member
  • ***
  • Posts: 100
  • chilipepper
  • Location: U.S.
    • View Profile
    • QyiQ23607 Pisano
That methodology looks interesting. I didn't do a bunch of calculations yet, but tried it for a very large board, using the rook chess piece.

For the situation of a rook on a 100 x 100 board, I get P(100x100) = 0.01940. Using this to compare with P(8x8) = 0.1667, it would indicate that a rook has about 11% of the power of a rook on an 8x8 board, so its value is about 0.58 (about half a pawn).

I suspect in this situation, there's something about the formulas that fall apart. I'll probably check more carefully how those formulas were derived, but for now wonder if you have any thoughts. Or is there some error in my methodology? ???
the "chilipepper"👹

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
That methodology looks interesting. I didn't do a bunch of calculations yet, but tried it for a very large board, using the rook chess piece.

For the situation of a rook on a 100 x 100 board, I get P(100x100) = 0.01940. Using this to compare with P(8x8) = 0.1667, it would indicate that a rook has about 11% of the power of a rook on an 8x8 board, so its value is about 0.58 (about half a pawn).

I suspect in this situation, there's something about the formulas that fall apart. I'll probably check more carefully how those formulas were derived, but for now wonder if you have any thoughts. Or is there some error in my methodology? ???

Let's think about this logically for a minute.

Was your operating premise that the Rook would get stronger on a larger board?

You have a board with 10,000 squares in your example, and a rook firmly planted somewhere in the middle can attack only 198 of them. That's a pretty low percentage.

Now let's look at an extreme counterexample.

A 5x5 board has 25 squares and a centralized rook can attack 8 of them. That's 32% of them.

On which board is the rook stronger?

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Using this to compare with P(8x8) = 0.1667, it would indicate that a rook has about 11% of the power of a rook on an 8x8 board, so its value is about 0.58 (about half a pawn).

You are forgetting the fact you did not scale the weight of the pawn from 8x8 to 100x100. A pawn on a 100x100 cannot possibly be worth 1.0 if it is 1.0 on an 8x8 board. Otherwise your claims is that a rook gets weaker and a pawn does not.

You need to rescale the metric for every board size.

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
A pawn on 100x100 = 64/10000 = 0.0064 so a rook @  0.01940 = 0.01940/0.0064 = 3.03125

By the way, Rooks lose the LEAST amount of power when being transported to other boards. That's because they are like the "e(x) function" in the real world: The Rook strength is its own derivative. As the board grows by n^2, the rook strength is proportional to 2n, which is d/dn if you think about it. So the Rook = e^x from one perspective.
« Last Edit: January 14, 2018, 11:10:56 pm by GothicChessInventor »

chilipepper

  • Full Member
  • ***
  • Posts: 100
  • chilipepper
  • Location: U.S.
    • View Profile
    • QyiQ23607 Pisano
Was your operating premise that the Rook would get stronger on a larger board?

No, my premise was to try to learn to apply the formulas, with no premises or assumptions set by me.

You are forgetting the fact you did not scale the weight of the pawn from 8x8 to 100x100....

I would have thought that a normal pawn is defined as a unit value of 1 (or 100 centipawn), and all other pieces are valued in relation to this. But maybe the formulas don't work this way? Just trying to learn how to use them. :)

« Last Edit: January 14, 2018, 11:49:06 pm by chilipepper »
the "chilipepper"👹

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
I would have thought that a normal pawn is defined as a unit value of 1, and all other pieces are valued in relation to this. But maybe the formulas don't work this way? Just trying to learn how to use them. :)

A pawn is worth 1.0, but only on a board of 64 squares with dimensions 8x8. That is because this was the board used to set that value.

On a board of any other size, the pawn is worth 64/(number of rows x number of columns) provided rows >= 1 and columns >= 1.

So your pawn is worth 64/10000.

And your Rook value is in units of that pawn, so any piece value you get using my formula needs to be divided by the pawn value for that size board.

You did the calculation correctly, you just forgot about the pawn unit conversion.

chilipepper

  • Full Member
  • ***
  • Posts: 100
  • chilipepper
  • Location: U.S.
    • View Profile
    • QyiQ23607 Pisano
Ok, I think I understand now. In Table 2 in the paper (80-Square Chess) it shows the pawn valued as "100", which apparantly is for a 10x8 board. I assume all data was normalized so that the pawn (which "drops in value" on a larger board) is pulled back up so that it's listed as 100?
the "chilipepper"👹

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Ok, I think I understand now. In Table 2 in the paper (80-Square Chess) it shows the pawn valued as "100", which apparantly is for a 10x8 board. I assume all data was normalized so that the pawn (which "drops in value" on a larger board) is pulled back up so that it's listed as 100?

Yeah I am pretty sure I "upgraded" the pawn to 100 for 10x8 then "downgraded" the other pieces, because that is what the editors of the publication asked for at the time.

chilipepper

  • Full Member
  • ***
  • Posts: 100
  • chilipepper
  • Location: U.S.
    • View Profile
    • QyiQ23607 Pisano
Ok, thanks. That work is very interesting stuff. Especially glad the archbishop and chancellor appear in the study! :)
the "chilipepper"👹

GothicChessInventor

  • Full Member
  • ***
  • Posts: 176
    • View Profile
Ok, thanks. That work is very interesting stuff. Especially glad the archbishop and chancellor appear in the study! :)

That was the whole purpose of my study!

I was interested in writing a Gothic Chess program, and I had no idea how to assign values to those pieces.

HGMuller

  • Global Moderator
  • Full Member
  • *****
  • Posts: 121
    • View Profile
I have become extremely skeptical of any method that tries to calculate the value of pieces ab initio, i.e. using nothing but their move pattern. Because even though these usually work for the orthodox Chess pieces, (they are of course constructed that way, and never see the light of day when they fail there), they often give completely wrong values (like 1-2 Pawns off) for unorthodox pieces.

Piece values can be determined with good accuracy (say up to 1/10 of a Pawn value) by play testing: by starting from a positon with a material imbalance between equally strong players. E.g. if one player has Rooks, and the other has Nightriders instead (with which he is allowed to castle), in an otherwise normal FIDE start position, and it turns out that the player with the Nightriders wins this more often than not (say with 580-420 in a 1000-game match with alterating colors), you know that Nightriders are more valuable than Rooks. The statistical error in a 1000-game match is only ~13 points, so the observed advantage is way above the statistical noise. Of course to be able to play such a large number of games of sufficiently constant quality you will have to make a computer do it.

You can make this even more quantitative by handicapping the side that had the upper hand (in this case the Nightriders) by a Pawn (deleting their f2/f7 Pawns, i.e. classical Pawn odds). When it turns out that in this case the player with the Rooks + Pawn wins the match by ~58%, you know that deleting the Pawn caused a 16% score swing. It turns out this will be a rather universal quantity for a given chess program: plain Pawn odds (with otherwse equal material) would cause a 66% score, etc. Any other advantage can be compared to this; two Nightriders vs two Rooks apparently gives only half the advantage that an extra Pawn would give, leading to the conclusion that they must be worth half a Pawn more than two Rooks. And thus that a single Nightrider must be worth a quarter Pawn more than a Rook. The statistical error in this determination is the mentioned 1.3% score error divided by the 16% Pawn swing, i.e. about 8 cent-Pawn for the pair, or 3 centi-Pawn for a single piece.

To make sure the games in the match on which this conclusion is based is sensible, the program playig the games must have a rough idea of the Nightrider value. E.g. if it would think it is worth less than a Pawn, it would immediately trade them for Pawns, (which is impossible to prevent, even by an opponent that tries to avoid it because he shares this delusion on the value), making it a self-fulfilling prophecy. But otherwise the result turns out to be rather insensitive to the programmed value of the piece under test. Even if you tell the computer in advance that a Nightrider is worth less than a Rook, the player with Nightriders would still win, perhaps even by 59%. Because the Nightrider is intrinsically better. And it will not be easy to trade it for Rooks, because the opponent will also think the Rooks are better, and avoid such trades. So the imbalance tends to be preserved for most of the game, and during that time the better piece does the most damage.

This method can be used both for opening values or end-game values, depending on the number of other pieces present in the initial position. E.g. to test end-game values you can start from positions with just one Rook against one Nightrider, and 4-6 Pawns on each side in various constellations. I never found a large difference between end-game and opening values this way, for 'normal' peces. (Pieces that derive moves from presence of other pieces, such as the Cannon of Chinese Chess, can show large differences, though.)

Using this method, I get an amazingly high value for the Archbishop, much higher than anyone ever suspected (considering the 'guesstimates' floating around on the internet). When Q=950, C=900 and A=875. So in practice there seems to be hardly any difference between the Chancellor and Archbishop value, which is rather amazing if you realize that they differ by having Rook vs Bishop moves in addition to their Knight component, and that it is beyond doubt that the R-B difference is at least a Pawn (if not two). Of course it is well known from the Queen value that combining pieces produces synergy, as a Queen (950) is worth significantly more than Rook + Bishop (875, if the Bishop is part of a pair, and 825 if it isn't). The moves of B + N seem to have an exraoridinarily large amout of synergy, though, as the 'naive' value of A would be 650/700 (depending on whether the Bishop was paired).

It is easy to come up with possible reasons for this synergy. E.g. the Bishop is color bound, but combining it with another move lifts this binding. And neither the Bishop nor the Kight do have mating potential, but the combination does. Unfortunately closer inspection of this reveals they cannot be the cause. A pair of Bishops gets hardly better when you give them an extra backward non-capture step backwards, which lifts their color binding. Of course it gets somewhat better because of the extra move, but a pair of Knights gains about as much by such an extra move. The main effect seems to be that the pair effect disappears, and each 'augmented Bishop' now is worth half of the pair, while with true Bishops a lone Bishop is worth less. Likewise, endowing a Bishop with mating potential by giving it an extra capture, also hardly increases its value. In most Chess games there are enough Pawns left such that mating potential is never in jeopardy.

So it remains a but of a mystery why the Archbishop is so strong. My currently favored theory is that orthogonally adjacent target squares have some extra value. This would also explain why on a cylinder board a Rook is still worth about 1 Pawn more than a Bishop, while they both always attack 14 squares. The Knight and the Bishop move have 16 orthogonal contacts, combining R+N and R+B only gives 8 new orthogonal contacts.
« Last Edit: January 23, 2018, 04:55:22 am by HGMuller »

chilipepper

  • Full Member
  • ***
  • Posts: 100
  • chilipepper
  • Location: U.S.
    • View Profile
    • QyiQ23607 Pisano
Thanks HGMuller, looks like very well-reason information. A few questions (answers may seem obvious, but just want to confirm):

Play-testing is a great tool for analysis, but you need a chess engine, right?

Also, I would presume the accuracy would depend on the strength of the engine. But a weak engine might still do reasonably well since in play testing, both sides are using the same engine.

To my knowledge there are very few engines for variants. There's your Fairy-Max and Chess-V as far as I know (both very well-programmed with superb user-interfaces IMO). Of the two, Fairy-Max seems a little more versatile because it allows custom-programmed chess pieces.

If my summary is correct, it means the tools for accurately estimating the value of variant chess pieces is rather sparse, and depends on running simulations. I would also presume that piece values may depend on board-size, and mix of other pieces, so accurately learning the values of variant pieces in a wide range of situations would be a time consuming process. Agree or not? ???
the "chilipepper"👹