lichess.org
Donate

Using least squares to estimate the value of the pieces

Just for a bit of fun, I decided to get a sense of what the engine thinks the 'value of the pieces' really is. I downloaded the pgn file of all games played on lichess in November 2014 (randomly chosen month with a reasonable file size), and from those games I took a smaller and more manageable subset of games haphazardly.

I filtered through the pgn to find positions with (a) a precomputed evaluation (b) a piece imbalance. Then I further filtered for positions where a piece was not just captured (and would presumably be recaptured on the next move).

Then I fit a least-squares model to the get the coefficients in:

centipawn-evaluation = (pawn value) * (#white pawns - #black pawns) + (knight value) * (#white knights - #black knights) + ...

Without further ado, here is what the fit spit out:
pawn: 2.41
knight: 4.83
bishop: 5.29
rook: 10.28
queen: 11.98.

You can check this yourself by running the code in github.com/felipeh/piece_values . The database of games used is very small indeed, but I thought it was fun.

I then tried again with substantially more games and got similar values:
pawn: 2.39
knight: 5.85
bishop: 6.52
rook: 9.31
queen: 16.15.

When normalized so that pawns are worth one pawn, this matches a bit better with the standard values:
pawn: 1.0
knight: 2.4
bishop: 2.7
rook: 3.9
queen: 6.8.

It is at least worth pointing out that bishops do seem more valuable than knights, but I am not sure how much I trust these numbers otherwise!

Seems like there are plenty of other fun things to try in this vein. For example, one could further filter positions for 'closed' vs 'open' positions (using maybe the number of pawns as a proxy) and test the relative value of knights vs bishops in such situations. Or maybe it would be interesting to find an approximate guess for the material value of having a rook on an open file, or a passed pawn, or something like that.

What experiments would you try? And, since I am assuming that this has already been done by much smarter people than me, where can one find analysis like this elsewhere?
What?

I'm sorry. I saw

Rook 3.9
Queen 6.8

And stopped... that won't lead to understanding of chess.
Of course you are right -- I made the same observation that the numbers are not so trustworthy in the post. I am simply describing an experiment I ran out of my own curiosity and thought to share the results in case others are also curious.

Honestly I was surprised that this crude analysis even ordered the pieces correctly at all!

I think one significant source of bias is that exchange sacrifices (for example) are usually made for at least some compensation. So it might be rare to see positions in this database which a rook has been exchanged for a knight and no other advantage whatsoever, and this leads to the strange results above.

The goal is not chess understanding, just fun.
This is interesting. I don't quite understand the "least squares" method, but...

I was watching a video by Yasser Seirawan recently in which he talked about a more "active" way to value the pieces. The usual 1,3,3,5,9 valuation is what I call the "book" value of a piece.

Yasser said you can estimate the value of a piece by counting the number of squares it controls and dividing by two. Most pawns control two squares so 2/1=1, but a and h pawns are arguably less valuable.

Knights can be valued as low as 1 (if they're in the corner) or 4 if centrally located.

The value of a bishop on an empty board can range from 3.5 to 7.

And so on.

This of course is not perfect. The top value for a Rook is also 7, but I doubt that anyone would argue that a well-placed Bishop is as strong as a well-placed Rook, all other things being equal.

And of course the Queen tops out at 14.

We all understand that the value of a piece is affected by its placement, but this is a cool way to try to measure it.
@KeithDenning You havent played against the benko where you trade your dark squares bishop for a knight then. Blacks dark square bishop becomes a monster and is worth more than a rook easily.

@felipehb It was a good experiment. I agree that the bishop gets more valuable than the knight once the position is semi open and you can either centralize or go behind the lines if you have only like 2 files open. Specially if you have the bishop pair vs 2 knights. You can totally paralyze them.
You put a lot of effort into this experiment! It is very interesting how much they value pawns

This topic has been archived and can no longer be replied to.