Question for Bob Hyatt

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
lkaufman
Posts: 3438
Joined: Sun Jan 10, 2010 5:15 am
Location: Maryland USA
Contact:

Re: Question for Bob Hyatt

Post by lkaufman » Sun Jan 17, 2010 1:59 am

Now that you have explained your "bad trade" code a bit, I would say that the most interesting test you could run would be to vary only the "bad trade" parameter to see if its optimum value is different at different levels/time controls. I suspect that the value of each extra piece (your parameter) will increase with longer time controls, but I'm far from certain of this.

metax
Posts: 344
Joined: Wed Sep 23, 2009 3:56 pm
Location: Germany

Re: Question for Bob Hyatt

Post by metax » Sun Jan 17, 2010 2:57 am

What do you think, how much pawns (not involving passed pawns) do you need to make things even with rook + X pawns vs. two minors (excluding bishop pair bonus)? The value for X Larry Kaufman proposes is 1.5, as two minors are worth 6.5 pawns. With the following

P=1; B=N=3.75; R=5.5; Q=10.75

the minors and the rook are worth +0.5 pawns compared to the Kaufman values, the queen being worth +1 pawn. But now two minors are worth rook + 2.5 pawns, and the bishop pair is worth rook + 3 pawns, which seems too much for me... isn't it?
I think the material configuration R+Pawns vs. two minors is very interesting as well as relevant for games, as this imbalance occurs surprisingly often.

So what do you think about this?

bob
Posts: 20373
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Question for Bob Hyatt

Post by bob » Sun Jan 17, 2010 4:37 am

lkaufman wrote:If I understand this correctly, this is exactly equivalent to increasing the value of rooks and minor pieces by X (your bad trade coefficient) and the queen by 2X. This is the exact proposal I made in one of my posts to this forum! So I think you can say that your piece values are the nominal values plus X for the rooks and minors and plus 2x for the queen, just for purposes of comparing to other programs, though as you say such values have little meaning. What are your current values for X, for the pieces, and for the bishop pair, and in the case of the bishop pair, does the value depend on other things, and if so what?

Thanks.

Larry
Rough numbers are these:

being down a knight and up a couple of pawns... -0.88 (almost a pawn penalty)
being up a rook, down two minors... -0.42
raw bishop pair = +.30, but with the mobility calculations we do, a bishop is significantly better than a knight, so BB vs BN is significantly more than 0.30, unless the bishop is trapped in a pawn formation that restricts it significantly. Ditto fo BB vs NN which is likely a pawn +.

We have tried other bishop pair scoring ideas, including coupling it directly to mobility, but what we are doing produced the best cluster results overall.

lkaufman
Posts: 3438
Joined: Sun Jan 10, 2010 5:15 am
Location: Maryland USA
Contact:

Re: Question for Bob Hyatt

Post by lkaufman » Sun Jan 17, 2010 5:01 am

Surely you must be quoting the approximate raw piece values before adding in your "bad trade" numbers, as you are saying that a piece is worth less than three pawns and that two minors are worth way less than rook and pawn, both of which are way outside of anyone else's values. So how large is your "bad trade" value? The numbers you quote imply a value for the Exchange (rook vs. minor) of 2.46, which is extraordinarily high. Is this really so, or is there some misunderstanding here? As for bishop vs. knight (with no bishop pair involved), it sounds like you are finding a larger difference in favor of the bishop than most others. I wonder if this bishop-knight difference is itself rather depth-sensitive? In human chess the bishop gains with longer time limits, and I have rather suspected that this is also true with computers. Finally, have you ever checked whether the knight pair deserves a bonus or penalty? In Rybka it gets a small penalty. It is said that bishop and knight coordinate better than two knights, and my research does give some weak support to this notion.

diep
Posts: 1780
Joined: Thu Mar 09, 2006 10:54 pm
Location: The Netherlands
Contact:

Re: Question for Bob Hyatt

Post by diep » Sun Jan 17, 2010 1:25 pm

Gerd Isenberg wrote:
diep wrote: I was very amazed to see how Crafty in a game against Isichess parked its white knight on a1. Isichess back then was really weak; not very well comparable with the years after that it would get a big eloboost as it seems he cut'n pasted some material values that he found on the net somewhere and also the increased search depth caused by things like LMR are important to mention.
Vincent, what are you talking about!? What eloboost? I did not copy/paste something from the net nor other programs.

Gerd
eloboost: when you went from 12- 13 ply search depths to 17 ply search depthsi saw a big eloboost in your program.

as for the material table: in the chessprogrammers event when we spoke, you said you had no problems with it to cut'n paste the material table from strelka code that is around on the net, as according to you it "has been posted on the net anyway, so you felt it was more than ethical ok to take it over".

if that opinion has changed it's nice to know of course.

bob
Posts: 20373
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Question for Bob Hyatt

Post by bob » Sun Jan 17, 2010 3:48 pm

lkaufman wrote:Surely you must be quoting the approximate raw piece values before adding in your "bad trade" numbers, as you are saying that a piece is worth less than three pawns and that two minors are worth way less than rook and pawn, both of which are way outside of anyone else's values. So how large is your "bad trade" value? The numbers you quote imply a value for the Exchange (rook vs. minor) of 2.46, which is extraordinarily high. Is this really so, or is there some misunderstanding here? As for bishop vs. knight (with no bishop pair involved), it sounds like you are finding a larger difference in favor of the bishop than most others. I wonder if this bishop-knight difference is itself rather depth-sensitive? In human chess the bishop gains with longer time limits, and I have rather suspected that this is also true with computers. Finally, have you ever checked whether the knight pair deserves a bonus or penalty? In Rybka it gets a small penalty. It is said that bishop and knight coordinate better than two knights, and my research does give some weak support to this notion.
Yes, the numbers I gave are added to the base piece values and the other scoring that is done. They were not the absolute piece values.

For the B vs N value, we ran a ton of tests. I believe that the base idea is to simply try to keep the bishop over the knight when mobility for the B is reasonable. Our mobility is not just the "sum of available squares" as each square is weighted based on proximity to the center. And we still often make that trade when I believe we should not. The bishop pair term is a difficult one. Too high and you will do your best to keep a bad bishop rather than trading it for a knight. You might get this right if the knight is an outpost, but not otherwise. Too low and you give up the bishop pair whenever a knight gets to a reasonable square, even if your bishop looks better to a strong human player.

We really arrived at our numbers by trial and error, and a few million games. I did not find any significant issue with depth on these terms. But all I did was verify that the fast game results carried over to slower games, but only for the final values. It is certainly possible that there are even better values for long time controls, but the time required makes this an impractical thing to test, unless perhaps if one has access to a cluster with tens of thousands of nodes.

Gerd Isenberg
Posts: 2125
Joined: Wed Mar 08, 2006 7:47 pm
Location: Hattingen, Germany

Re: Question for Bob Hyatt

Post by Gerd Isenberg » Sun Jan 17, 2010 3:50 pm

diep wrote:
Gerd Isenberg wrote:
diep wrote: I was very amazed to see how Crafty in a game against Isichess parked its white knight on a1. Isichess back then was really weak; not very well comparable with the years after that it would get a big eloboost as it seems he cut'n pasted some material values that he found on the net somewhere and also the increased search depth caused by things like LMR are important to mention.
Vincent, what are you talking about!? What eloboost? I did not copy/paste something from the net nor other programs.

Gerd
eloboost: when you went from 12- 13 ply search depths to 17 ply search depthsi saw a big eloboost in your program.

as for the material table: in the chessprogrammers event when we spoke, you said you had no problems with it to cut'n paste the material table from strelka code that is around on the net, as according to you it "has been posted on the net anyway, so you felt it was more than ethical ok to take it over".

if that opinion has changed it's nice to know of course.
Ok, there were a few years from 2005 Reykjavik til 2008 or 2009. And depth 12/13 was likely early middlegame while 17 was probably a more forced position. Also dual core and yes, LMR. No eloboost if I look to the few over the board games I played in recent tournaments, may be some statistical fluctuation.

I can't remember exactly what I told you at the programmers tour, but it was likely a general statement what I might accept if others take or adapt some piece or piece square values from public sources. It was certainly not related to my own ethics applied to my own program.

Cheers,
Gerd

bob
Posts: 20373
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Question for Bob Hyatt

Post by bob » Sun Jan 17, 2010 3:55 pm

jwes wrote:
bob wrote:One note. I believe the inflated piece values were a direct response to programs trading knight for 3 pawns and ending up in hopeless positions, and such. I did the "bad trade" idea in Crafty to avoid this, since the bad trade idea directly addresses the issue rather than indirectly thru modifying piece values.
I wonder to what extent it is that programs do not understand how to play with material differences, e.g. with 3 pawns vs. a piece, you need to use the pawns aggressively.
That is one thing that makes this tuning stuff so difficult. I remember many years ago that we simply could not come up with a scheme to handle some of the openings where the program would play g3/g6 and then Bg2/Bg7. The bishop is often critical, and trading it for a knight is generally not a good idea unless the knight is causing lots of problems where it stands. So we simply tuned the opening book to avoid such lines and did just fine (this was a Cray Blitz issue, by the way). Very early Crafty versions used the old CB book, but as I worked on king safety, slowly this problem went away. Yet the book avoided the Bg2 type positions and would instead go into something that became even more problematic.

Bottom line is that as the evaluation is modified, all terms suddenly become suspect. Sort of like optimizing for speed. As one peak gets driven down by optimizations you apply, others rise to take its place, and the process is actually never completed, just continually improved/refined...

metax
Posts: 344
Joined: Wed Sep 23, 2009 3:56 pm
Location: Germany

Re: Question for Bob Hyatt

Post by metax » Sun Jan 17, 2010 7:30 pm

I think I'll start a new thread for the Rook+Pawns vs two minors issue as this is a separate question.

diep
Posts: 1780
Joined: Thu Mar 09, 2006 10:54 pm
Location: The Netherlands
Contact:

Re: Question for Bob Hyatt

Post by diep » Sun Jan 17, 2010 9:06 pm

metax wrote:I think I'll start a new thread for the Rook+Pawns vs two minors issue as this is a separate question.
Not really, it's just something the chessplayers agree about.

In mid 90s i already posted of course that all figures must raise their value in a similar manner when advancing. In 2000 i extensively implemented this as such in diep's material evaluation.

Slowly more and more programs have adapted that model.

In Fruit fabien has chosen for 2 phases. Middlegame and endgame.

In Diep i use 256 phases which i then throw into a bucket of 16 phases as that indexes easier (tables of 256 are so large).

What you describe is simply a problem indeed. Getting things tuned right in the different phases is a big problem. The problem is more generic than just material.

Vincent

Post Reply