Piece Value - Human vs. Computer

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Piece Value - Human vs. Computer

Post by Evert »

BeyondCritics wrote: I think it is an intrinsic problem. For the sake of clarity, take one simple example. Imagine a hypothetical fairy game with pawns and a single piece A only and with only 2 equally likely (whatever that means!) scenarios possible. In Scenario 1 the piece A is always comparable to having exactly 4 pawns. In Scenario 2 A is always worth 5 pawns. According to your definition, the intrinsic value of the piece A _must_ be 4.5. You then have to adjust this value for every single position.
According to my belief the piece value theoretically could be any arbitrary positive value. I would adjust the piece value for every single position, exactly as you do. My value is therefore as intrinsic to piece A as your value. And i think this example is not made up, but reflects to some extent the situation in chess.
You need to quantify what that something is. It is certainly not simply having that piece A; apparently it's some evaluation feature that is worth 1 pawn in the presence of piece A!

Example: What is the value of a bishop? Say 3.25 pawns. What's the value of two bishops? If they're on different colours, they're worth about 7 pawns - rather a bit more than the 6.5 you would expect. This is of course a well-known extra term relating to the bishop pair.

Piece values are only ever a heuristic that quantify the "typical" relative value of a piece. Imagine the following experiment: take an arbitrary position and ask a program how it evaluates this position. Say it returns E. Now remove a rook (say) and ask the same question again. It now returns E'. The difference E-E' is almost certainly not exactly the "value" of a rook: the difference is due to positional terms. Does that mean we need to adjust the value of the rook so that it exactly corresponds to this measured difference? Of course not. You can find positions where a Knight dominates a Queen. That does not mean that Knights are typically worth more than Queens.

Positional factors can be much more important than what pieces are on the board, but that doesn't make the notion of piece values meaningless. The question often comes up with respect to Shogi, where the question is much more complicated because positional terms are relatively more important than in Chess, and XiangQi, where the presence of defensive pieces makes things more complicated (and the Cannon and Horse change dramatically in power in the course of the game, the Cannon is on average superior early on but the Horse on average stronger in the end game).
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Piece Value - Human vs. Computer

Post by Lyudmil Tsvetkov »

The chart is a very raw stuff, and I suppose some people did very precise measurements, while other simply voiced somewhere their opinion, which was accepted as an official statement by the chart builders.

Leaving aside funny values, like Evgeni Gik's: 4 points for the knight and 2.2 for the bishop, it makes sense to concentrate just on systems that distinguish between the knight and bishop values, as there really is a distinction:

Fischer 3 3.25 5 9
Berliner 3.20 3.33 5.10 8.80
Philidor 3.05 3.50 5.48 9.94

OK, just looking at the knight and bishop values, if you can not make those 2 right, how can you do the other ones?

Well, Philidor saying the bishop is 7/6 stronger than the knight in the general case seems too much, Berliner saying that the bishop is just 33/32 stronger than the knight on the other hand seems too small, this is about 4% higher value for the bishop, I would easily go along only with Fischer's values, that seem about right.

But of course, piece values are only one part of the picture, more important is how all terms are tuned with each other.

As you see, Larry gives equal values for the bishop and knight, and, judging how Komodo plays, it is very probable that Komodo gives also equal values to both pieces, if not a larger value for the knight. That does not prevent Komodo from playing at that level.

Same for SF, the bishop value should generally increase more than the knight value from mg to eg, but in SF it is exactly the opposite case. Still, this does not prevent the engine to play at that level.

SO that piece values are most important, but they are valid only when tuned to the whole. Change a single related term and everything changes.

Of course, it would be best to start with about optimal piece values, and then move on to tune other parameters accordingly, but, when this is not done, you should simply tune to the whole.

I think more or less the following rules are the most basic and important concerning general piece values:

- bishop conceivably stronger than knight
- rook much stronger than bishop
- queen has value of about 2 rooks as an abstraction, just as a number assigned, but, when there are 2 rooks on the board, 2 rooks are stronger than queen by maybe 5-10%
- when there are 3 pieces for a lone enemy queen or rook, the 3 pieces collectively gain up to 15% in their value
- knight and bishop in tandem gain some small value against an enemy rook compared to the case when they have to fight the rook on their own; this should be due to the complementarity of the pieces
- in terms of complementarity, queen and knight perform better than queen and bishop, but the bishop value is already larger by default
- a pair of knight or a pair of rooks perform worse in the general case, as they fail to complement each other, but that is seen only against the background of their original values, so, when a rook has a sufficiently large value, a special penalty for redundancy might help, otherwise, it will only hurt
- of course, the pair of bishops is due a bonus, even larger when the opponent has no bishop

- from mg to eg, the values of bishop, rook and queen increase, while the value of knight decreases

Also many other rules, but without those around 10 most essential rules it is very hard to implement piece values correctly.
Lyudmil Tsvetkov
Posts: 6052
Joined: Tue Jun 12, 2012 12:41 pm

Re: Piece Value - Human vs. Computer

Post by Lyudmil Tsvetkov »

Evert wrote:
BeyondCritics wrote: I think it is an intrinsic problem. For the sake of clarity, take one simple example. Imagine a hypothetical fairy game with pawns and a single piece A only and with only 2 equally likely (whatever that means!) scenarios possible. In Scenario 1 the piece A is always comparable to having exactly 4 pawns. In Scenario 2 A is always worth 5 pawns. According to your definition, the intrinsic value of the piece A _must_ be 4.5. You then have to adjust this value for every single position.
According to my belief the piece value theoretically could be any arbitrary positive value. I would adjust the piece value for every single position, exactly as you do. My value is therefore as intrinsic to piece A as your value. And i think this example is not made up, but reflects to some extent the situation in chess.
You need to quantify what that something is. It is certainly not simply having that piece A; apparently it's some evaluation feature that is worth 1 pawn in the presence of piece A!

Example: What is the value of a bishop? Say 3.25 pawns. What's the value of two bishops? If they're on different colours, they're worth about 7 pawns - rather a bit more than the 6.5 you would expect. This is of course a well-known extra term relating to the bishop pair.

Piece values are only ever a heuristic that quantify the "typical" relative value of a piece. Imagine the following experiment: take an arbitrary position and ask a program how it evaluates this position. Say it returns E. Now remove a rook (say) and ask the same question again. It now returns E'. The difference E-E' is almost certainly not exactly the "value" of a rook: the difference is due to positional terms. Does that mean we need to adjust the value of the rook so that it exactly corresponds to this measured difference? Of course not. You can find positions where a Knight dominates a Queen. That does not mean that Knights are typically worth more than Queens.

Positional factors can be much more important than what pieces are on the board, but that doesn't make the notion of piece values meaningless. The question often comes up with respect to Shogi, where the question is much more complicated because positional terms are relatively more important than in Chess, and XiangQi, where the presence of defensive pieces makes things more complicated (and the Cannon and Horse change dramatically in power in the course of the game, the Cannon is on average superior early on but the Horse on average stronger in the end game).
Absolutely right, positional factors count in very much.

Only remark is that you can not play without piece values, while you can without outposts.
BeyondCritics
Posts: 416
Joined: Sat May 05, 2012 2:48 pm
Full name: Oliver Roese

Re: Piece Value - Human vs. Computer

Post by BeyondCritics »

Seemingly you didn't got my point, as i intended it. It was never my intent to demonstrate, that the piece values others do believe in are wrong or even meaningless or something like that. If you believe in certain values and that does work for you, thats fine for me.
The starting point was a chart of wildly different piece values, but some from very competent sources. I believe this is due to an intrinsic difficulty of the problem and can not only explained by incompetence.
User avatar
hgm
Posts: 28543
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Piece Value - Human vs. Computer

Post by hgm »

BeyondCritics wrote:I think it is an intrinsic problem. For the sake of clarity, take one simple example. Imagine a hypothetical fairy game with pawns and a single piece A only and with only 2 equally likely (whatever that means!) scenarios possible. In Scenario 1 the piece A is always comparable to having exactly 4 pawns. In Scenario 2 A is always worth 5 pawns. According to your definition, the intrinsic value of the piece A _must_ be 4.5. You then have to adjust this value for every single position.
This is hard to answer in hypothetical cases. Most likely is that there is some identifiable difference between the scenario's that causes this. E.g. connected passers in scenario 2, and Pawns on both wings in scenario 1. But this could of course be explained by assuming connected passers are worth more than just the base value of the Pawns.

So what you describe is normal, but only becomes relevant to piece value when other pieces would react differently as A to the details of the Pawn structure. And this of course happens, although it is usually just a fraction of the observed difference. That is, most of the performance difference of piece A in the various scenarios is an intrinsic property of the value of the Pawn structure, that other pieces would also experience. And only part of it is specific for piece A. A good example is Knights and Bishops: Knights usually suffer more from Pawns on both wings than Bishops do, for obvious reasons.

I can add that testing piece values by pitting the piece against only Pawns is a bad method, which almost never works. The 1:3:3:5:9 rules should really be interpreted as that you need about 1 Pawn to equalize the chances of a Rook against B+N. Not that a game of 9 Pawns against a Queen would be approximately balanced. In general the Pawns are toast no matter how many you have, against a Queen.
According to my belief the piece value theoretically could be any arbitrary positive value. I would adjust the piece value for every single position, exactly as you do. My value is therefore as intrinsic to piece A as your value. And i think this example is not made up, but reflects to some extent the situation in chess.
This sounds more like evaluating the specific position, rather than the pieces.
Did you tested that? In this case my apologizes, you are truly more of an expert here.
No need to apologize; a critical attitude is a virtue. But indeed, this is how I typically determine piece values, and I also did that for Knight, King and their 'divergent compounds' (i.e. pieces that move like Knight and capture like King, and the reverse). And I typically verify the consistency of the results by trying different combination. E.g. if I want to determine the value of an Archbishop in the end-game, I don't only let it play against Queen (with equal Pawns or a 1-Pawn advantage, in all kind of different structures), but also against Rook + Knight + Pawn, R+N+2P, R+B+P, 2R-P etc., to verify that the piece value suggested by the results is about the same in all these scenarios. Usually it is. For determining the value of a non-royal King ('Commoner') I played single Commoner against B or N in the presence of 4 or 5 Pawns for each side, and also a pair of Commoners aganst 2N or B+N. The Commoner then does not perform significantly better than Knight, in such scenarios. Which is sort of expected, as both are pieces with 8 moves. The Commoner has the advantage that it has 'concentration' of attacks (of which mating potential is a consequence), but the Knight has larger 'speed', making it better at stopping passers. It turned out that the piece that moves as Knight and captures as King combines the strong suite of both, and is worth 0.5 Pawn more than either of them!
hgm wrote:Sorry for me being so imprecise. I was refering to "tapered eval". They are working with a two dimensional vector and just in the last moment the vector valued assessment collapses into some scalar.
I believe by adding more dimensions you could solve more problems.
OK, I see. It is true that tapered eval with linear interpolation according to game phase, the latter being some linear combination of material (e.g. phase = 6*nrQueens + 3*nrRooks + nrMinors, and value = phase*openingValue + (MAXPHASE-phase)*endgameValue) amounts to adding second-order terms in the material eval, like const*nrPiece1*nrPiece2. And that by making all the constant weights in such an expression independently tunable would be enough.

In particular, what is needed is product terms of the number of pieces with the number of opponent lower pieces. These describe the effective devaluation of strong pieces by the weaker ones that interdict access of the stronger piece to the squares they defend. But that goes beyond simple additive piece values, and makes the material evaluation a general quadratic expression.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Piece Value - Human vs. Computer

Post by Evert »

BeyondCritics wrote:Seemingly you didn't got my point, as i intended it. It was never my intent to demonstrate, that the piece values others do believe in are wrong or even meaningless or something like that. If you believe in certain values and that does work for you, thats fine for me.
The starting point was a chart of wildly different piece values, but some from very competent sources. I believe this is due to an intrinsic difficulty of the problem and can not only explained by incompetence.
A question that has to be asked with respect to that chart is what the error bar on the quoted values is. For most of those it will be unknown. For Kaufman I think there's a comment in the paper, but I don't know off the top of my head.

Take Sarrat's 3.1 vs 3.3 for a knight vs bishop. I would like to know the significance of the quoted value, but without context to the contrary I'm inclined to dismiss it, or reduce it to a qualitative statement: a knight is generally slightly weaker than a bishop. And there seems to be a reasonable consensus on this: the knight and bishop are mostly equal, but the bishop is perhaps a bit stronger. Is that because of the bishop pair? If you don't have that separately you'd need to set the value of the bishop higher than the knight to compensate. From these values we can't tell, but I know Kaufman has the B-pair as a separate term and then finds B=N, within the accuracy of his study.

A more important question is how these values affect game play. There it's probably not so relevant if N=3 pawns or not, because the advantage of a knight is overpowering, so the thing to look at are imbalances that are close to equal. There are only a few of these that are practical:

R-N, R-B, BB-R, BN-R, NN-R, RR-Q, NNB-Q, BBN-Q

Conventional wisdom says R-N = R-B = ~2 pawns (perhaps a pawn+B-pair), BB > R+P, BN = ~R+P, NN = ~R+P, RR > ~Q, NNB = BBN = Q. I think that's roughly what Kaufman finds as well. The smallest material unit we have to balance things with are pawns, and possibly the bishop pair, so it's hard to pin things down more accurately than this.

The flip side of this is that it doesn't matter as much. Does it matter much if you set Q=8? Probably not as much as you'd think, since you're still not likely to change it for anything other than another queen. Does it matter if you have R=4.5 instead of 5? Again - probably not so much.

This would be an interesting experiment for someone to do: how badly can you mess up the piece value before it makes a big difference?
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Piece Value - Human vs. Computer

Post by Evert »

hgm wrote: In particular, what is needed is product terms of the number of pieces with the number of opponent lower pieces. These describe the effective devaluation of strong pieces by the weaker ones that interdict access of the stronger piece to the squares they defend. But that goes beyond simple additive piece values, and makes the material evaluation a general quadratic expression.
I once tried to tune something like that. It didn't go so well, it's a pretty hard term to get right in my experience.

I didn't look very closely at what Stockfish does here, but my understanding is that it actually has such a general quadratic form for material imbalances.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Piece Value - Human vs. Computer

Post by Evert »

Lyudmil Tsvetkov wrote: Leaving aside funny values, like Evgeni Gik's: 4 points for the knight and 2.2 for the bishop, it makes sense to concentrate just on systems that distinguish between the knight and bishop values, as there really is a distinction:

Fischer 3 3.25 5 9
Berliner 3.20 3.33 5.10 8.80
Philidor 3.05 3.50 5.48 9.94

OK, just looking at the knight and bishop values, if you can not make those 2 right, how can you do the other ones?
To be fair, B/N is probably the most tricky to get right, since they are very close.
As you see, Larry gives equal values for the bishop and knight, and, judging how Komodo plays, it is very probable that Komodo gives also equal values to both pieces, if not a larger value for the knight. That does not prevent Komodo from playing at that level.
Don't forget that Larry's system (in the paper) also devalues the knight as pawns are exchanged (which I suspect is really a proxy for game phase, but someone else should comment on that).
- of course, the pair of bishops is due a bonus, even larger when the opponent has no bishop
Interesting. This I hadn't seen before.
Something to test.
User avatar
hgm
Posts: 28543
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Piece Value - Human vs. Computer

Post by hgm »

Evert wrote:To be fair, B/N is probably the most tricky to get right, since they are very close.
What makes it tricky is that the elephantiasis effect makes piece values behave like 'contracted crossings' in quantum mechanics: if they are too close, they collapse to the same value. The cost of implementing the trade-avoiding strategy that would be needed to sufficiently express the superiority before the piece gets traded away would be larger than the difference, so that effectively the stronger piece would be worth less, and avoiding trading makes no sense.

So to clearly see the intrinsic difference, you would have to play the pieces against material sufficiently different in value that replacement of the piece does not force different trade-avoiding strategy. E.g. test Bishops and Knights against 'neo-Knights', which move as Knight or can make one step forward, rather than by playing them against each other.
- of course, the pair of bishops is due a bonus, even larger when the opponent has no bishop
Interesting. This I hadn't seen before.
Something to test.
I guess this is because the advantage is less permanent, as you cannot harass the lone B without exposing yourself to trading, as you can against a Knight.
Sean Evans
Posts: 1777
Joined: Thu Jun 05, 2008 10:58 pm
Location: Canada

Re: Piece Value - Human vs. Computer

Post by Sean Evans »

Hello fellows,

For those of you that believe N = B and disagree with Fischer's N= 3.00 B=3.25 let's take a look at a classic battle of Bishop vs Knight:

[pgn][Event "Fischer - Taimanov Candidates Quarterfin"]
[Site "Vancouver, Canada"]
[Date "1971.05.25"]
[Round "4"]
[White "Robert James Fischer"]
[Black "Mark Taimanov"]
[Result "1-0"]
[ECO "B47"]
[PlyCount "141"]
[EventDate "1971.05.16"]

1. e4 c5 2. Nf3 Nc6 3. d4 cxd4 4. Nxd4 Qc7 5. Nc3 e6 6. g3 a6 7. Bg2 Nf6 8. O-O
Nxd4 9. Qxd4 Bc5 10. Bf4 d6 11. Qd2 h6 12. Rad1 e5 13. Be3 Bg4 14. Bxc5 dxc5
15. f3 Be6 16. f4 Rd8 17. Nd5 Bxd5 18. exd5 e4 19. Rfe1 Rxd5 20. Rxe4+ Kd8 21.
Qe2 Rxd1+ 22. Qxd1+ Qd7 23. Qxd7+ Kxd7 24. Re5 b6 25. Bf1 a5 26. Bc4 Rf8 27.
Kg2 Kd6 28. Kf3 Nd7 29. Re3 Nb8 30. Rd3+ Kc7 31. c3 Nc6 32. Re3 Kd6 33. a4 Ne7
34. h3 Nc6 35. h4 h5 36. Rd3+ Kc7 37. Rd5 f5 38. Rd2 Rf6 39. Re2 Kd7 40. Re3 g6
41. Bb5 Rd6 42. Ke2 Kd8 43. Rd3 Kc7 44. Rxd6 Kxd6 45. Kd3 Ne7 46. Be8 Kd5 47.
Bf7+ Kd6 48. Kc4 Kc6 49. Be8+ Kb7 50. Kb5 Nc8 51. Bc6+ Kc7 52. Bd5 Ne7 53. Bf7
Kb7 54. Bb3 Ka7 55. Bd1 Kb7 56. Bf3+ Kc7 57. Ka6 Nc8 58. Bd5 Ne7 59. Bc4 Nc6
60. Bf7 Ne7 61. Be8 Kd8 62. Bxg6 Nxg6 63. Kxb6 Kd7 64. Kxc5 Ne7 65. b4 axb4 66.
cxb4 Nc8 67. a5 Nd6 68. b5 Ne4+ 69. Kb6 Kc8 70. Kc6 Kb8 71. b6 1-0[/pgn]

Fischer has spoken!

Sean :D