Evaluation of material imbalance (a Rybka secret?)

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Alessandro Scotti

Re: Evaluation of material imbalance (a Rybka secret?)

Post by Alessandro Scotti »

mjlef wrote:One question: does "count"refer to the number of games where a material signature was found, or the number of total postions it was found in? Example. lets say it got down to KRP vs KR, and this happened 50 times in a row in the same game, does that count 50 times, or just once for that game? One more question: material difference seem to set the bishop pair at 50, is that right?

If anyone makes a comma delimeted version for easier import into other stats programs, I would like a copy. Otherwise I will make one myself tonight.
Hi Mark! Imbalance is counted once per game and only if it appears at least 6 plies.

I can easily make a CSV this evening and post that!
mjlef
Posts: 1494
Joined: Thu Mar 30, 2006 2:08 pm

Re: Evaluation of material imbalance (a Rybka secret?)

Post by mjlef »

Perfect! Very similiar to what me and another author have been working on.

I was able to use Open Office to split out the data into columns. I even have calulated a material imbalance correction factors in one new column. I am trying to figure out how to split out piece values, so I have counts of various piece types now, to make it easier to import the numbers into my program. It would ne nice to see the same data, but with counts of each white and black piece type. Maybe ti is just simpler for me to write a simple parser.

How many games did you process to get all this data?

Mark
Alessandro Scotti

Re: Evaluation of material imbalance (a Rybka secret?)

Post by Alessandro Scotti »

CSV is available here:

http://www.ascotti.org/programming/ches ... ts_csv.zip

The zip file contains a readme with the description of the columns, which include the piece count as well as the "raw" data for each entry.

I've used games from CCRL and CEGT (not the very latest versions) but some games have been filtered out. The count for the starting position is also the number of games processed, slightly less than 280K. I'd love to be able to process a million games or more! :-)
mjlef
Posts: 1494
Joined: Thu Mar 30, 2006 2:08 pm

Re: Evaluation of material imbalance (a Rybka secret?)

Post by mjlef »

Alessandro Scotti wrote:CSV is available here:

http://www.ascotti.org/programming/ches ... ts_csv.zip

The zip file contains a readme with the description of the columns, which include the piece count as well as the "raw" data for each entry.

I've used games from CCRL and CEGT (not the very latest versions) but some games have been filtered out. The count for the starting position is also the number of games processed, slightly less than 280K. I'd love to be able to process a million games or more! :-)
OK, I did a quick and dirty test last night. The material imbalance arrays in NOW only supported upt to 3 pawns per side (I will change that for a new run over the next few days). So I extract all 3 pawns or less for both sides positions, calculated a score adjustment value based on the stuff I wrote earlier, tossed score corrections of zero, and implemented it in NOW. The ELO improvement was 24 over the games played last night (168 games total against 8 oponents of varying strength), compared with a test run from before without the new material imbalance "corrections".

Note NOW already has a bunch of rules to adjust for material imbalance (for example, when a side has no pawns, if has to be more than a mnor piece ahead or it divides the score by something). So a lot of things were being scofed twice. Also, material imbalance stuff is probably also important ealrier in the game, so once I expand my arrays I can better test that.

Overall, it seemed to help and certainly did not hurt.

Mark
Alessandro Scotti

Re: Evaluation of material imbalance (a Rybka secret?)

Post by Alessandro Scotti »

Hi Mark, not a bad start though the number of games is currently too low. I hope to try that in the next few days.

BTW it seems the winning probabilities and the material value change as we progress toward the endgame. A pawn advantage means little in the opening but is decisive at the end. I'd like to include that in the model too.
Aleks Peshkov
Posts: 892
Joined: Sun Nov 19, 2006 9:16 pm
Location: Russia

Re: Evaluation of material imbalance (a Rybka secret?)

Post by Aleks Peshkov »

It is important to split pure win and draw results. IMHO stronger side (just because it just have gained material and hopes to do it again) should prefer continuations with less draw potential. Experienced player sometimes voluntary sacrifice material in bad position to force perpetual check or to reach rare drawish fortress in otherwise hopeless situation.
mjlef
Posts: 1494
Joined: Thu Mar 30, 2006 2:08 pm

Re: Evaluation of material imbalance (a Rybka secret?)

Post by mjlef »

Alessandro Scotti wrote:Hi Mark, not a bad start though the number of games is currently too low. I hope to try that in the next few days.

BTW it seems the winning probabilities and the material value change as we progress toward the endgame. A pawn advantage means little in the opening but is decisive at the end. I'd like to include that in the model too.
Yes, you can see that in the data (a pawn advantage is less in the opening). Of course, these bonuses will end up both guiding the program towards positions more liely to be winning, and once a winning position si reached, help prveent it from exchanging to a position with a lower probability of winning.

A second use for win statistics is to guide the search. Material imbalances which are highly likely to be winning or losing could be searched with less depth than ones with more even chances.

To make all of this work well, the program may need to "fill in" the material imbalance array by interpolating between positions where there is not data, since some material imbalance signatures juut did not appear in enough games. Otherwise, evals might jump around too much as material is exchange, leading to positions where the program does not know it is ahead. I am experimenting with a few ways of doing this while my other computer is trying out the more complete signatures.

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

Re: Evaluation of material imbalance (a Rybka secret?)

Post by diep »

hi Scotti, If you're so interested, why don't you do it the Frans Morsch/Chrilly Donninger way?

Vincent
Last edited by diep on Sat Dec 08, 2007 9:20 pm, edited 1 time in total.
Tony

Re: Evaluation of material imbalance (a Rybka secret?)

Post by Tony »

mjlef wrote:
Alessandro Scotti wrote:Hi Mark, not a bad start though the number of games is currently too low. I hope to try that in the next few days.

BTW it seems the winning probabilities and the material value change as we progress toward the endgame. A pawn advantage means little in the opening but is decisive at the end. I'd like to include that in the model too.
Yes, you can see that in the data (a pawn advantage is less in the opening). Of course, these bonuses will end up both guiding the program towards positions more liely to be winning, and once a winning position si reached, help prveent it from exchanging to a position with a lower probability of winning.

A second use for win statistics is to guide the search. Material imbalances which are highly likely to be winning or losing could be searched with less depth than ones with more even chances.

To make all of this work well, the program may need to "fill in" the material imbalance array by interpolating between positions where there is not data, since some material imbalance signatures juut did not appear in enough games. Otherwise, evals might jump around too much as material is exchange, leading to positions where the program does not know it is ahead. I am experimenting with a few ways of doing this while my other computer is trying out the more complete signatures.

Mark
In XiniX the biggest problem were the unusual imbalances, where significance wasn't high enough and the score unreliable.

Very bad for search.

I used a sigmoid to convert chance to score btw. Seemed more natural than a straight line.

Tony
mjlef
Posts: 1494
Joined: Thu Mar 30, 2006 2:08 pm

Re: Evaluation of material imbalance (a Rybka secret?)

Post by mjlef »

diep wrote:hi Scotti, If you're so interested, why don't you do it the Frans Morsch/Chrilly Donninger way?

Vincent
What is the "Frans Morsch/Chrilly Donninger way"? I am sorry if I missed something.