Question for Bob Hyatt

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

lkaufman
Posts: 5960
Joined: Sun Jan 10, 2010 6:15 am
Location: Maryland USA

Re: Question for Bob Hyatt

Post by lkaufman »

You obviously did not read the article from which those values were taken, you can find it on Dan Heisman's website. The database research was a serious project, having nothing to do with any existing literature, and the values given in 1/4 pawn units were rounded values recommended for use by human players, not the precise numbers. I assigned all the evaluation values used in Rybka 3, using my own values only as a starting point, which were tuned by hundreds of thousands of games. It is purely by coincidence that the final values for the minor pieces in R3 average to almost exactly 3.25. That the final values in R3 are pretty similar to the database values means that in general, the same conclusions from studying the results of hundreds of thousand human master games with imbalances are pretty much applicable to computer chess, with some modest changes (the major pieces are worth a bit more in computer chess it seems).
lkaufman
Posts: 5960
Joined: Sun Jan 10, 2010 6:15 am
Location: Maryland USA

Re: Question for Bob Hyatt

Post by lkaufman »

I have no idea where you are getting these numbers you attribute to Rybka for the values, they are not even close. Are you perhaps talking about Rybka 1 (cloned as Strelka), which had a very poor evaluation? The par Rybka 3 values are P=1, N=3.18, B=3.25, R=5.2, and Q=9.7, with bishop pair at 0.38. These values are surprisingly close to my database-derived values, and if you factor in the 0.20 penalty for a second rook the agreement is much closer still.
metax
Posts: 344
Joined: Wed Sep 23, 2009 5:56 pm
Location: Germany

Re: Question for Bob Hyatt

Post by metax »

diep wrote:Your values are according to wiki

3¼ 3¼ 5 9¾ Kaufman 1999 Add ½ point for the bishop pair[7] (Kaufman 1999)

That's not even close to rybka by the way.

In rybka actually the material only table gives 2 rooks against queen +0.94 for the ROOKS and that goes up, so far away from the 0.25 pawn you 'advised'.

In short you had NOTHING to do with the parameter tuning which is NCSA domain, and you are far away from those guys. Thank you.

It gives a bonus of +0.9 to +1.2 for a bishop pair

A knight is 0.6 stronger than a bishop in case of not a bishop pair running back to +0.36 of a knight being stronger. So they are not 'equal strong' at all.

Even if you had done your database research well, you can see that also Kasparov played like that (regardless of what he said).

That are the default material values in Rybka.

Please note also the rybka values are not exact rounded values to a quarter of a pawn, they are broken values of course and they don't even claim to have done database research.
Where did you get these values for Rybka?

Actually I don't believe that bishop pair values of more than maybe +0.7 make sense.
Uri Blass
Posts: 10300
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Question for Bob Hyatt

Post by Uri Blass »

diep wrote:in material.cpp:

static const int PawnOpening = 80; // was 100
static const int PawnEndgame = 90; // was 100
static const int KnightOpening = 325;
static const int KnightEndgame = 325;
static const int BishopOpening = 325;
static const int BishopEndgame = 325;
static const int RookOpening = 500;
static const int RookEndgame = 500;
static const int QueenOpening = 1000;
static const int QueenEndgame = 1000;

static const int BishopPairOpening = 50;
static const int BishopPairEndgame = 50;

In later Toga they put the value of a pawn even lower to 70 in fact.

You can already guess my tip to Fabien back then. I gave him the tip that his material was total wrong tuned and should look to nimzo 1998 which has (relative to pawn=100) the pieces at 4.2 etcetera. Fabien solved that by lowering the value of a pawn. Of course i present it here relative to the value of a pawn=100.

Vincent
These are only basic values and mean nothing.

You can change the basic value of pawn to 100 in the opening and 110 in the endgame and reduce the bonus for passed pawns by 20 and have penalty of pawns that are not passed pawns(of 20) and get exactly the same evaluation.

Uri
Uri Blass
Posts: 10300
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Question for Bob Hyatt

Post by Uri Blass »

lkaufman wrote:I have no idea where you are getting these numbers you attribute to Rybka for the values, they are not even close. Are you perhaps talking about Rybka 1 (cloned as Strelka), which had a very poor evaluation? The par Rybka 3 values are P=1, N=3.18, B=3.25, R=5.2, and Q=9.7, with bishop pair at 0.38. These values are surprisingly close to my database-derived values, and if you factor in the 0.20 penalty for a second rook the agreement is much closer still.
What is the meaning of it?

As I explained in reply to vincent basic values are meaningless when you do not know the bonuses and penalties.

Another example:
If a knight gets always positive or zero bonus for mobility then you are going to get a different optimal value then the case that a knight can get also a negative bonus for bad mobility.

Uri
lkaufman
Posts: 5960
Joined: Sun Jan 10, 2010 6:15 am
Location: Maryland USA

Re: Question for Bob Hyatt

Post by lkaufman »

You are correct, but in Rybka 3 I attempted to set the other table values in such a way that on average nominal piece values will be the ones used. As you point out though, in the case of the pawn that is very hard to do.
Osipov Jury
Posts: 186
Joined: Mon Jan 21, 2008 2:07 pm
Location: Russia

Re: Question for Bob Hyatt

Post by Osipov Jury »

Perhaps the question about tuning parameters for evaluation need to ask Vasik. I think he uses the best method of tuning the weights.
I went through the Rybka code forwards and backwards and took many things.
lkaufman
Posts: 5960
Joined: Sun Jan 10, 2010 6:15 am
Location: Maryland USA

Re: Question for Bob Hyatt

Post by lkaufman »

Not much point in that, I tuned the weights for Rybka 3, and I doubt that Vas will talk about Rybka 4.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Question for Bob Hyatt

Post by bob »

lkaufman wrote:You are correct, but in Rybka 3 I attempted to set the other table values in such a way that on average nominal piece values will be the ones used. As you point out though, in the case of the pawn that is very hard to do.
Having been doing this for a couple of years now, I think this is a huge can of worms that is exceptionally complex. At least in Crafty, the piece values set a base value for a piece, but those get modified so much based on other ideas. And not all are clear. For example, you have a passed pawn and I blockade it. Does that make your pawn less valuable? Or does it make my blockader more valuable? The net result is the same, but which value is _really_ getting changed? We have enough eval terms for each piece, starting with the base value, then the pc/sq table, then other scores from mobility to king-safety, that the base piece value seems to be very much unimportant, unless you take it so far so that the program begins to have badly. A knight worth more than a rook can probably happen in the right position, but if a knight starts out worth more than a rook, then most of the time the program is going to be making great mistakes by tossing exchanges left and right for no reason. I've found this part of eval tuning to be extremely difficult, and almost counter-intuitive, in that a very logical-looking change wrecks something and when we go back and look, we can suddenly say "Of course... how stupid of me to not think about that case..."

I'm much more worried about the case where you tune X values optimally over time, but when you finish, they are anything but optimal, because you tune the first, and then the second. But then there is a significant chance that the first value is no longer tuned optimally since everything is relative to everything else. For me, "optimal" is "fuzzy" at best... I've not found any reasonable way to tune a batch at once, ala' annealing or whatever, so it has been one or two at a time for us. I ought to be finished by the time I reach 200 years old. :)
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: Question for Bob Hyatt

Post by BubbaTough »

lkaufman wrote:You are correct, but in Rybka 3 I attempted to set the other table values in such a way that on average nominal piece values will be the ones used. As you point out though, in the case of the pawn that is very hard to do.
Yes, pawns are a huge deal, because pawn protection for king in middlegames and connected passed pawns in endgame get massive weights, so when considering a piece for 3 or 4 pawns, you are almost always getting passed pawns, often connected, and many times also king safety things (even in a piece for 2 pawn situations). Thus, pawns are almost always worth more internally than they look like they would be in the weights (when trading a piece for pawns)...by a lot! This is not as true in something like Rook for Bishop and Pawn exchanges, where you are not as likely to get a mass of connected passed pawns or something.

In some sense, I get the feeling that its not really possible to get good single numbers that deal with all these situations reasonably:
1. piece for pawns
2. exchange for pawns
3. 2 pieces for rook + pawns
and still interact well with king safety/passed pawn weights. Thus, we end up tuning to deal with the most common situations at the occasional detriment of others. Of course, if you have material lookup tables, you could treat all these situations differently...

-Sam