Here's the problem... these "bad trades" are not necessarily static. You have to know why a particular kind of trade is bad, and when it might be true. For example, if i am already a piece up, then a piece for 3 pawns is anything but bad.frankp wrote:OK. But I was not suggesting that it was one or the other approach, merely that the hard-wired values address some basic trade issues. (Probably a rook for 3 connected passers on the 6th is not a good trade either.).bob wrote:Yes. The difference is that hard-coded piece values are there for the game, anything you do in the eval can be adjusted as you wish... For example, a knight for 3 passed pawns on the 6th rank is not a -1.0 trade...frankp wrote:Perhaps there is a subtle point I am missing. You can either build the 'solution' to 3p for piece etc into the piece values, or fix with special terms in the eval?
Relative Piece Values
Moderator: Ras
- 
				bob
 - Posts: 20943
 - Joined: Mon Feb 27, 2006 7:30 pm
 - Location: Birmingham, AL
 
Re: Relative Piece Values
- 
				frankp
 - Posts: 233
 - Joined: Sun Mar 12, 2006 3:11 pm
 
Re: Relative Piece Values
Like most programs, I suspect, mine has a load of bonus/penalty terms that when mashed together in the final score hopefully lead to sensible decisions about which pieces to swap in various positions - piece values, pawn value, weak-pawn-types penalties, good pawn bonuses, trade-down bonus for not swapping pawns when material ahead, etc etc. So hopefully it would swap bishop for 3 pawns when appropriate, but not necessarily if they were isolated and tripled on a file. Not everything can be done by 'bad-trade', can it?bob wrote: Here's the problem... these "bad trades" are not necessarily static. You have to know why a particular kind of trade is bad, and when it might be true. For example, if i am already a piece up, then a piece for 3 pawns is anything but bad.
Looked in Crafty and saw the cute 'bad trade' imbalance table, but did not stumble on the 3 pawns for a minor code.
I am not taking issue with your comments or arguing against bad trade, just trying to understand why it is inherently better. I moved to the Kaufman approach a few iterations back and have never been entirely happy with it. But neither was I taken with gross bad trade penalties (a pawn or more in some cases) in what I had before, just to stop the B x pawn f7+, R takes, knight takes, lose 20 moves later nonsense.
Frank
- 
				Bill Rogers
														 - Posts: 3562
 - Joined: Thu Mar 09, 2006 3:54 am
 - Location: San Jose, California
 
Re: Relative Piece Values
H.G.
I know nothing about alternate versions of chess and never mentioned them.
You must admit that there are some differences in what pieces can do and not do. All the pieces can move and capture both colors with the exception of Bishops therefore I just added one point for all those pieces with one other exception of the king. Everyone knows that the piece is not as valuable as an agressive capturing piece so its over all value when considering that is somewhat diminished and taking away one point from a king movement still comes out to a closer value and is in line with old chess masters for the last few centuries. They rated a king as having a rating as about 2.4 pawns and my discovered formula gives 2.33 which as I said is pretty close.
We were talking about piece values and my formula was based upon piece values based upon the ability to capture other men. The fact that I noticed all piece values were powers of three above their real ratings was an unexpected discovery.
Bill
			
			
									
						
										
						I know nothing about alternate versions of chess and never mentioned them.
You must admit that there are some differences in what pieces can do and not do. All the pieces can move and capture both colors with the exception of Bishops therefore I just added one point for all those pieces with one other exception of the king. Everyone knows that the piece is not as valuable as an agressive capturing piece so its over all value when considering that is somewhat diminished and taking away one point from a king movement still comes out to a closer value and is in line with old chess masters for the last few centuries. They rated a king as having a rating as about 2.4 pawns and my discovered formula gives 2.33 which as I said is pretty close.
We were talking about piece values and my formula was based upon piece values based upon the ability to capture other men. The fact that I noticed all piece values were powers of three above their real ratings was an unexpected discovery.
Bill
- 
				hgm
														 - Posts: 28402
 - Joined: Fri Mar 10, 2006 10:06 am
 - Location: Amsterdam
 - Full name: H G Muller
 
Re: Relative Piece Values
Where did you get this information on the value of the King? In all sources of piece values I have always seen this value quoted as 4 Pawns, not 2.4. Well, both are wrong. And not surprisingly, as the opinion of these 'old masters' is not worth more than the next man's guess. They had zero hands-on experience with positions where only one side had a King, and had to play it against, say, a Bishop. So how could they possibly know? The actual value of a piece moving like a King (but non-royal) differs less than 20 centiPawn from a Knight (so 2.8-3.0, depeding on how you value the Knight).
The point is that any theory would have to work for alternative forms of Chess just as well as for orthodox Chess, as it is completely arbitrary which pieces are considered orthodox and whch not. And it turns out that an augmented Bihop, whch can switch color by, say, a one-step-backward non-capture move, is hardly worth more than a normal one. And that it benifits about the same from this backward step as a Knight does, despite the fact that the Knight could already access every square without it.
So it is a nice try to subtract a point for color-boundedness, but it is completely at odds with the facts of (Chess) life.
			
			
									
						
										
						The point is that any theory would have to work for alternative forms of Chess just as well as for orthodox Chess, as it is completely arbitrary which pieces are considered orthodox and whch not. And it turns out that an augmented Bihop, whch can switch color by, say, a one-step-backward non-capture move, is hardly worth more than a normal one. And that it benifits about the same from this backward step as a Knight does, despite the fact that the Knight could already access every square without it.
So it is a nice try to subtract a point for color-boundedness, but it is completely at odds with the facts of (Chess) life.
- 
				bob
 - Posts: 20943
 - Joined: Mon Feb 27, 2006 7:30 pm
 - Location: Birmingham, AL
 
Re: Relative Piece Values
It is in that table. Just means one side is a piece down. Even if he is 3 pawns up, the imbalance table penalizes the missing knight, by an amount we developed during testing...frankp wrote:Like most programs, I suspect, mine has a load of bonus/penalty terms that when mashed together in the final score hopefully lead to sensible decisions about which pieces to swap in various positions - piece values, pawn value, weak-pawn-types penalties, good pawn bonuses, trade-down bonus for not swapping pawns when material ahead, etc etc. So hopefully it would swap bishop for 3 pawns when appropriate, but not necessarily if they were isolated and tripled on a file. Not everything can be done by 'bad-trade', can it?bob wrote: Here's the problem... these "bad trades" are not necessarily static. You have to know why a particular kind of trade is bad, and when it might be true. For example, if i am already a piece up, then a piece for 3 pawns is anything but bad.
Looked in Crafty and saw the cute 'bad trade' imbalance table, but did not stumble on the 3 pawns for a minor code.
I don't like Larry's stuff at all. It probably works well for Rybka, since it is tuned to work with Rybka's evaluation. I've not been able to get anything from his suggestions to work in Crafty after a ton of testing...
I am not taking issue with your comments or arguing against bad trade, just trying to understand why it is inherently better. I moved to the Kaufman approach a few iterations back and have never been entirely happy with it. But neither was I taken with gross bad trade penalties (a pawn or more in some cases) in what I had before, just to stop the B x pawn f7+, R takes, knight takes, lose 20 moves later nonsense.
Frank
- 
				Edmund
 - Posts: 670
 - Joined: Mon Dec 03, 2007 3:01 pm
 - Location: Barcelona, Spain
 
Re: Relative Piece Values
Bill, your attempt reminded me of some tests I read about earlier.
You might be interested in checking Scharnagl's calculations
http://www.chessbox.de/Compu/schachansatz1_e.html
			
			
									
						
										
						You might be interested in checking Scharnagl's calculations
http://www.chessbox.de/Compu/schachansatz1_e.html
- 
				Aleks Peshkov
 - Posts: 952
 - Joined: Sun Nov 19, 2006 9:16 pm
 - Location: Russia
 - Full name: Aleks Peshkov
 
- 
				Greg Strong
														 - Posts: 388
 - Joined: Sun Dec 21, 2008 6:57 pm
 - Location: Washington, DC
 
Re: Relative Piece Values
Awesome.  I was going to post this link, but you beat me to it 
Betza has done a lot of very impressive work in this area, and, if you read through all of it, what you learn is that there is *no* formula for calculating relative value of a piece based on it's mobility, color-boundness, king-interdiction ability, etc. This is largely because the value of a piece has a lot to do with the movement capabilities of the other pieces against which it must compete...
			
			
									
						
										
						Betza has done a lot of very impressive work in this area, and, if you read through all of it, what you learn is that there is *no* formula for calculating relative value of a piece based on it's mobility, color-boundness, king-interdiction ability, etc. This is largely because the value of a piece has a lot to do with the movement capabilities of the other pieces against which it must compete...
- 
				Bill Rogers
														 - Posts: 3562
 - Joined: Thu Mar 09, 2006 3:54 am
 - Location: San Jose, California
 
Re: Relative Piece Values
In answer to HG's question. One of my first books on chess was written by Burns and if I remember correctly it was in that book that I first read about the value of the pieces, however, we know today based upon computer chess programs that these initial values can change throughout a game in process because of different situations that occur during games.
Bill
			
			
									
						
										
						Bill
- 
				Dann Corbit
 - Posts: 12799
 - Joined: Wed Mar 08, 2006 8:57 pm
 - Location: Redmond, WA USA
 
Re: Relative Piece Values
I have the source code for his program and he is telling you the truth.
To verify his claim:
attacks.h ( 430): static const int PcVal[] = {0, 100, 325, 325, 500, 975, 10000};
I can also tell you that these array values are used in computation of eval and also that these values are nowhere changed anywhere in the code base.
I can tell you that when I compile the code it plays exactly like the official released version (it may even be my binary -- I don't know).
So if a better list can cause stronger play then perhaps his program will make a big jump in strength very soon. He's already kicking some serious butt using only one thread. Imagine when it runs fully threaded!
Perhaps even Rybka should be worried about the future.

			
			
									
						
										
						To verify his claim:
attacks.h ( 430): static const int PcVal[] = {0, 100, 325, 325, 500, 975, 10000};
I can also tell you that these array values are used in computation of eval and also that these values are nowhere changed anywhere in the code base.
I can tell you that when I compile the code it plays exactly like the official released version (it may even be my binary -- I don't know).
So if a better list can cause stronger play then perhaps his program will make a big jump in strength very soon. He's already kicking some serious butt using only one thread. Imagine when it runs fully threaded!
Perhaps even Rybka should be worried about the future.