Relative Piece Values

Discussion of chess software programming and technical issues.

Moderator: Ras

MattieShoes
Posts: 718
Joined: Fri Mar 20, 2009 8:59 pm

Re: Relative Piece Values

Post by MattieShoes »

Another thing I was thinking about is that eval is we really want to know our odds of winning the game, not the "score".

Eval assumes a linear relationship -- +100 is 100 better than 0, +1000 is 100 better than +900. And this is obviously false. If we're up about a queen, our odds of winning are approaching 100% and taking a free pawn gives us only marginal further advantage.

So with imbalanced scores, it seems like piece values are reduced and positional factors like king safety are magnified. Spurning the free pawn for increased king safety is probably a good plan in the long run regardless of whether we can see any threats to king safety inside the horizon, because our victory is nearly assured if we don't lose our massive material advantage. On the flip side, we're already hosed so an all out king blitz seems our best chance. I'm sure there's a way to account for piece imbalances with equal scores here too though I'd have to think further about it. It just seems like a more "real" way to think about the issue than arbitrary piece scores.

... well, to me anyway ... :-)
Dann Corbit
Posts: 12799
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Relative Piece Values

Post by Dann Corbit »

mjlef wrote:Most strong program seem to use relative piece values of P:N:B:R:Q of roughly 1:4:4:6:12

I recently did a bunch of runs with roughly 1:4:4:5.5:12 and it did a lot better. Are these what others are using now?
Glaurung:

Code: Select all

/// Piece values, middle game and endgame

/// Important: If the material values are changed, one must also
/// adjust the piece square tables, and the method game_phase() in the
/// Position class!

const Value PawnValueMidgame = Value(0xCC);    // 204 decimal
const Value PawnValueEndgame = Value(0x100);   // 256 decimal
const Value KnightValueMidgame = Value(0x340); // 832 decimal
const Value KnightValueEndgame = Value(0x340); // 832 decimal
const Value BishopValueMidgame = Value(0x340); // 832 decimal
const Value BishopValueEndgame = Value(0x340); // 832 decimal
const Value RookValueMidgame = Value(0x505);   // 1285 decimal
const Value RookValueEndgame = Value(0x505);   // 1285 decimal
const Value QueenValueMidgame = Value(0xA00);  // 2560 decimal
const Value QueenValueEndgame = Value(0xA00);  // 2560 decimal
Scorpio uses:

Code: Select all

static const int piece_v[15] = {0,0,975,500,325,325,100,0,975,500,325,325,100,0};
Toga II Se 141 uses:

Code: Select all

// constants

const int ValuePawn   = 100;   // was 100
const int ValueKnight = 325;   // was 300
const int ValueBishop = 325;   // was 300
const int ValueRook   = 500;   // was 500
const int ValueQueen  = 1000;  // was 900
const int ValueKing   = 10000; // was 10000
Strelka uses:

Code: Select all

const int ValuePiece[14] = {0,0,1,1,3,3,3,3,5,5,10,10,9999,9999};
Delfi uses:

Code: Select all

 VPAWN = 95;
 VKNIGHT = 20*16;    // 320
 VBISHOP = 21*16;    // 336
 VROOK = 32*16;      // 512
 VONEPIECE = 35*16;  // 560
 VQUEEN = 63*16;     // 1008
 VKING = 512*16;     // 8192
 VMATE = 10000;
 VALMOSTMATE = 9000;
Booot uses:

Code: Select all

     PawnValue=100;
     KnightValue=400;
     BishopValue=400;
     RookValue=600;
     QueenValue=1200;
Of course, all of them adjust the values for board situations by various other calculations.
Dann Corbit
Posts: 12799
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Relative Piece Values

Post by Dann Corbit »

From these sets (normalized to pawn == 100)

Code: Select all

Glaurung uses:
 PawnValue   = 100;
 KnightValue = 362;
 BishopValue = 362;
 RookValue   = 559;
 QueenValue  = 1113;
 
Delfi uses: 
 VPAWN   =  100; 
 VKNIGHT =  337;
 VBISHOP =  354;
 VROOK   =  539;
 VQUEEN  = 1061;

Booot uses: 
 PawnValue   =  100; 
 KnightValue =  400; 
 BishopValue =  400; 
 RookValue   =  600; 
 QueenValue  = 1200; 
We can derive a nice average set that might be used as a starting point:

Code: Select all

static const int vPawn   = 100;
static const int vKnight = 366;
static const int vBishop = 372;
static const int vRook   = 566;
static const int vQueen =1125;
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Relative Piece Values

Post by bob »

Bill Rogers wrote: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
Actually I learned 40+ years ago that the values of the pieces change as the game changes. From an outpost knight that is way more valuable than a knight at a1/h1/etc, or a rook on an open file, or a bishop on an open diagonal, or a weak pawn, or an a/h pawn which are worse than b-g pawns. These were all covered in the first chess book I owned, "My System"...
Edsel Apostol
Posts: 803
Joined: Mon Jul 17, 2006 5:53 am
Full name: Edsel Apostol

Re: Relative Piece Values

Post by Edsel Apostol »

Dann Corbit wrote: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.
;-)
Thanks Dann. You're right, Twisted Logic 20090105_x64 is your compile. It's the one in CEGT, the one playing online and the one that has played in the CCT.

To Vincent:

I have no reason to lie and to deceit people. Yes my engine is a combination of ideas and techniques I've learned from other open source engines combined with my own but it is not a copy/paste thing.
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Relative Piece Values

Post by diep »

Edsel Apostol wrote:
Dann Corbit wrote: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.
;-)
Thanks Dann. You're right, Twisted Logic 20090105_x64 is your compile. It's the one in CEGT, the one playing online and the one that has played in the CCT.

To Vincent:

I have no reason to lie and to deceit people. Yes my engine is a combination of ideas and techniques I've learned from other open source engines combined with my own but it is not a copy/paste thing.
You realize i'm a very liberal person here?

Other programmers aren't. They encouraged me to post that in order to see your reaction. Good example is the blame i got in the loop list accusation in 2003, whereas i was the guy who said before the world championships to the authors who wanted to raise a protest that it was obvious it was a modified crafty and to me if someone really modifies a lot, then that is quite ok, so i didn't support that protest. Later on during the world champs they still wanted to raise that protest and the reason for it to get banned ou tof the icga tournament is because when the icga generous offered to ship the assistent professor Ernst A Heinz to verify it wasn't a clone, whereas both Fritz Reul and Ernst would be visiting the same math congress anyway, so it would logistically be easy to do this verification (Erdogan Gunes operated List that world champs). Fritz refused this.

A few questions.

a) why ship source code to Dann Corbit and not someone else?

Corbit is the guy who encouraged the courtcases against me in 1999. Note i won all of them, for the second time in februari 2002. It cost me a LOT of money, as you might know in mainland Europe you cannot get back lawyer costs in courtcases; so if people specialized in setting up business constructions just to sue, that costs money. This is why in 2000 pocket fritz and pocket tiger were sooner to release, i had this in 1999 ready (but got courtcases).

b) do you consider yourself a software engineer of computer chess components?
Uri Blass
Posts: 10921
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Relative Piece Values

Post by Uri Blass »

diep wrote:
Edsel Apostol wrote:
Dann Corbit wrote: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.
;-)
Thanks Dann. You're right, Twisted Logic 20090105_x64 is your compile. It's the one in CEGT, the one playing online and the one that has played in the CCT.

To Vincent:

I have no reason to lie and to deceit people. Yes my engine is a combination of ideas and techniques I've learned from other open source engines combined with my own but it is not a copy/paste thing.
You realize i'm a very liberal person here?

Other programmers aren't. They encouraged me to post that in order to see your reaction. Good example is the blame i got in the loop list accusation in 2003, whereas i was the guy who said before the world championships to the authors who wanted to raise a protest that it was obvious it was a modified crafty and to me if someone really modifies a lot, then that is quite ok, so i didn't support that protest. Later on during the world champs they still wanted to raise that protest and the reason for it to get banned ou tof the icga tournament is because when the icga generous offered to ship the assistent professor Ernst A Heinz to verify it wasn't a clone, whereas both Fritz Reul and Ernst would be visiting the same math congress anyway, so it would logistically be easy to do this verification (Erdogan Gunes operated List that world champs). Fritz refused this.

A few questions.

a) why ship source code to Dann Corbit and not someone else?

Corbit is the guy who encouraged the courtcases against me in 1999. Note i won all of them, for the second time in februari 2002. It cost me a LOT of money, as you might know in mainland Europe you cannot get back lawyer costs in courtcases; so if people specialized in setting up business constructions just to sue, that costs money. This is why in 2000 pocket fritz and pocket tiger were sooner to release, i had this in 1999 ready (but got courtcases).

b) do you consider yourself a software engineer of computer chess components?
I will answer about a.

I did not know about the court case against you but I can say that people send source code to Dann Corbit because Dann corbit help them and is ready to answer questions that they have.

He clearly spend time in order to help people and he does not ask money for it.

I know that he spent time to help me after sending him movei.

Uri
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Relative Piece Values

Post by diep »

Uri Blass wrote:
diep wrote:
Edsel Apostol wrote:
Dann Corbit wrote: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.
;-)
Thanks Dann. You're right, Twisted Logic 20090105_x64 is your compile. It's the one in CEGT, the one playing online and the one that has played in the CCT.

To Vincent:

I have no reason to lie and to deceit people. Yes my engine is a combination of ideas and techniques I've learned from other open source engines combined with my own but it is not a copy/paste thing.
You realize i'm a very liberal person here?

Other programmers aren't. They encouraged me to post that in order to see your reaction. Good example is the blame i got in the loop list accusation in 2003, whereas i was the guy who said before the world championships to the authors who wanted to raise a protest that it was obvious it was a modified crafty and to me if someone really modifies a lot, then that is quite ok, so i didn't support that protest. Later on during the world champs they still wanted to raise that protest and the reason for it to get banned ou tof the icga tournament is because when the icga generous offered to ship the assistent professor Ernst A Heinz to verify it wasn't a clone, whereas both Fritz Reul and Ernst would be visiting the same math congress anyway, so it would logistically be easy to do this verification (Erdogan Gunes operated List that world champs). Fritz refused this.

A few questions.

a) why ship source code to Dann Corbit and not someone else?

Corbit is the guy who encouraged the courtcases against me in 1999. Note i won all of them, for the second time in februari 2002. It cost me a LOT of money, as you might know in mainland Europe you cannot get back lawyer costs in courtcases; so if people specialized in setting up business constructions just to sue, that costs money. This is why in 2000 pocket fritz and pocket tiger were sooner to release, i had this in 1999 ready (but got courtcases).

b) do you consider yourself a software engineer of computer chess components?
I will answer about a.

I did not know about the court case against you but I can say that people send source code to Dann Corbit because Dann corbit help them and is ready to answer questions that they have.

He clearly spend time in order to help people and he does not ask money for it.

I know that he spent time to help me after sending him movei.

Uri
Thanks for defending Dann, yet which
people not working for N*SA is Dann helping then?

How many guys from Europe did he ever help?

Vincent
Dann Corbit
Posts: 12799
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Relative Piece Values

Post by Dann Corbit »

diep wrote:
Uri Blass wrote:
diep wrote:
Edsel Apostol wrote:
Dann Corbit wrote: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.
;-)
Thanks Dann. You're right, Twisted Logic 20090105_x64 is your compile. It's the one in CEGT, the one playing online and the one that has played in the CCT.

To Vincent:

I have no reason to lie and to deceit people. Yes my engine is a combination of ideas and techniques I've learned from other open source engines combined with my own but it is not a copy/paste thing.
You realize i'm a very liberal person here?

Other programmers aren't. They encouraged me to post that in order to see your reaction. Good example is the blame i got in the loop list accusation in 2003, whereas i was the guy who said before the world championships to the authors who wanted to raise a protest that it was obvious it was a modified crafty and to me if someone really modifies a lot, then that is quite ok, so i didn't support that protest. Later on during the world champs they still wanted to raise that protest and the reason for it to get banned ou tof the icga tournament is because when the icga generous offered to ship the assistent professor Ernst A Heinz to verify it wasn't a clone, whereas both Fritz Reul and Ernst would be visiting the same math congress anyway, so it would logistically be easy to do this verification (Erdogan Gunes operated List that world champs). Fritz refused this.

A few questions.

a) why ship source code to Dann Corbit and not someone else?

Corbit is the guy who encouraged the courtcases against me in 1999. Note i won all of them, for the second time in februari 2002. It cost me a LOT of money, as you might know in mainland Europe you cannot get back lawyer costs in courtcases; so if people specialized in setting up business constructions just to sue, that costs money. This is why in 2000 pocket fritz and pocket tiger were sooner to release, i had this in 1999 ready (but got courtcases).

b) do you consider yourself a software engineer of computer chess components?
I will answer about a.

I did not know about the court case against you but I can say that people send source code to Dann Corbit because Dann corbit help them and is ready to answer questions that they have.

He clearly spend time in order to help people and he does not ask money for it.

I know that he spent time to help me after sending him movei.

Uri
Thanks for defending Dann, yet which
people not working for N*SA is Dann helping then?

How many guys from Europe did he ever help?

Vincent
Europe:
Fabien Letouzey
Thomas Mayer
Colin Frayn
Gian-Carlo Pascutto
Peter Fendrich
Thorsten Greiner
José Carlos Martinez Galán
Martin Borriss
Oliver Brausch (OK, mostly I just annoyed him ;-))
Carlos del Cacho
Bas Hamstra
Dieter Bürßner
Jean-Francois Romang/ Raphael Grundrich /Thomas Adolph

Scandanavia:
John Bergbom
Tord Romstad (OK, not much)
Peter Fendrich (well, not much but a little)

South America:
Antonio Dieguez
Samuel Shoji Fukujima
Ruben Carlo Benante

Africa:
Daniel Shawul

North America:
Adrien Regimbald
Christopher William Bowron
Tristan Miller / Michael Yee

Asia:
Omid David
Uri Blass

Oceania:
Alejandro Dubrovsky

Not sure if this is Asia or Europe (depending on where he lives):
Sergei Markoff

At least as many as these that are not listed.

Some got 100 minutes of my time. Some got more than 100 hours of my time.

Whether or not I am a useful help with good ideas or an annoying pest full of useless suggestions is a matter of opinion. I am obviously more helpful to a beginner than an expert.
Pradu
Posts: 287
Joined: Sat Mar 11, 2006 3:19 am
Location: Atlanta, GA

Re: Relative Piece Values

Post by Pradu »

MattieShoes wrote:Another thing I was thinking about is that eval is we really want to know our odds of winning the game, not the "score".
http://chessprogramming.wikispaces.com/ ... 2C+and+ELO