Page 1 of 6

Piece weights with regression analysis (in Russian)

Posted: Thu Apr 30, 2015 9:19 am
by WinPooh
My article on a polular Russian IT portal:
http://habrahabr.ru/post/254753/

It is in Russian, but I believe the text is quite understandable even without translation.

Re: Piece weights with regression analysis (in Russian).

Posted: Thu Apr 30, 2015 10:00 am
by Ajedrecista
Hello Vladimir:
WinPooh wrote:My article on a polular Russian IT portal:
http://habrahabr.ru/post/254753/

It is in Russian, but I believe the text is quite understandable even without translation.
Great job! Congratulations.

If I understood correctly, you input a PGN file in a programme of your own and you get results that you later normalize to pawn = 100 cp. It would be interesting to input some big PGN files such as CCRL 40/4, CEGT 40/4 and CEGT (various TCs).

There are free PGNs of tons of players and openings here:

Download PGN Files

It would be interesting to compare more players than Anand, Andersen and Carlsen. I do not know about the openings.

I know that it depends on the hardware, but... how much time does it take to solve the gradient method and with how many games in the PGN?

Once again: thank you very much. I really enjoy this topic.

Regards from Spain.

Ajedrecista.

Re: Piece weights with regression analysis (in Russian).

Posted: Thu Apr 30, 2015 10:03 am
by WinPooh
Ajedrecista wrote:Hello Vladimir:
I know that it depends on the hardware, but... how much time does it take to solve the gradient method and with how many games in the PGN?
Less than a minute for 10000 gradient steps on a 3000-games file.

Re: Piece weights with regression analysis (in Russian).

Posted: Thu Apr 30, 2015 7:16 pm
by Dann Corbit
I found that it auto-translates fairly well (though elephant for bishop is a little distracting).

Here is the github link for the source:
https://github.com/WinPooh/pgnlearn

This seems like a really fun experiment.
I wonder if it can be used to discover weaknesses in opponents.

Re: Piece weights with regression analysis (in Russian).

Posted: Thu Apr 30, 2015 7:41 pm
by AlvaroBegue
Dann Corbit wrote:I found that it auto-translates fairly well (though elephant for bishop is a little distracting).
The word in Spanish is "alfil", which I think is a transliteration of the Arabic for "the elephant".

Re: Piece weights with regression analysis (in Russian).

Posted: Thu Apr 30, 2015 8:04 pm
by Dann Corbit
These weights are derived from correspondence chess:

PIECE VALUES:

Pawn: 100
Knight: 162.839
Bishop: 203.914
Rook: 306.862
Queen: 697.509

Re: Piece weights with regression analysis (in Russian).

Posted: Thu Apr 30, 2015 8:16 pm
by Dann Corbit
TCEC 2900+ Elo games:

Created file: f:\pgn\tcec-2900.mat
Loading dataset...
[ 16885 x 5 ]
Solving (gradient method)...
Iter 0: [ 0 0 0 0 0 ] -> 0.693147
Iter 1000: [ 0.58 1.65046 1.9756 2.75676 5.59641 ] -> 0.605806
Iter 2000: [ 0.619852 1.87064 2.20553 3.09101 6.36438 ] -> 0.604818
Iter 3000: [ 0.627587 1.91357 2.25042 3.15607 6.51386 ] -> 0.604781
Iter 4000: [ 0.62918 1.92242 2.25967 3.16948 6.54465 ] -> 0.60478
Iter 5000: [ 0.629511 1.92426 2.2616 3.17227 6.55106 ] -> 0.60478
Iter 6000: [ 0.62958 1.92464 2.262 3.17285 6.5524 ] -> 0.60478
Iter 7000: [ 0.629595 1.92472 2.26208 3.17297 6.55268 ] -> 0.60478
Iter 8000: [ 0.629598 1.92474 2.2621 3.173 6.55274 ] -> 0.60478
Iter 9000: [ 0.629599 1.92474 2.2621 3.173 6.55275 ] -> 0.60478
Iter 10000: [ 0.629599 1.92474 2.26211 3.173 6.55276 ] -> 0.60478

PIECE VALUES:

Pawn: 100
Knight: 305.71
Bishop: 359.293
Rook: 503.972
Queen: 1040.78
Press ENTER to finish

Re: Piece weights with regression analysis (in Russian)

Posted: Thu Apr 30, 2015 8:40 pm
by kbhearn
One problem with this approach is the situations in which the imbalances are likely to most commonly occur. For instance, minor for 2-3 pawns, the stronger players usually will have only gone into this when it's really minor for 2-3 pawns AND positional compensation. This will make the minors look less valuable than they actually are.

Re: Piece weights with regression analysis (in Russian)

Posted: Thu Apr 30, 2015 9:37 pm
by Vinvin
kbhearn wrote:One problem with this approach is the situations in which the imbalances are likely to most commonly occur. For instance, minor for 2-3 pawns, the stronger players usually will have only gone into this when it's really minor for 2-3 pawns AND positional compensation. This will make the minors look less valuable than they actually are.
It would be better to compute different values for middlegame and endgame.

Re: Piece weights with regression analysis (in Russian).

Posted: Thu Apr 30, 2015 11:02 pm
by Dann Corbit
CEGT 40/20, games with both players having ELO 2900+:

Games: 250312
Created file: f:\pgn\cegt4020-2900.mat
Loading dataset...
[ 1527543 x 5 ]
Solving (gradient method)...
Iter 0: [ 0 0 0 0 0 ] -> 0.693147
Iter 1000: [ 0.727343 1.77441 2.06056 2.98876 5.90056 ] -> 0.563205
Iter 2000: [ 0.764584 1.97576 2.27007 3.30258 6.65456 ] -> 0.562299
Iter 3000: [ 0.772605 2.01907 2.31517 3.37003 6.81694 ] -> 0.562258
Iter 4000: [ 0.774447 2.02902 2.32553 3.38552 6.85424 ] -> 0.562256
Iter 5000: [ 0.774876 2.03134 2.32794 3.38912 6.86293 ] -> 0.562255
Iter 6000: [ 0.774976 2.03188 2.3285 3.38996 6.86496 ] -> 0.562255
Iter 7000: [ 0.775 2.03201 2.32864 3.39016 6.86543 ] -> 0.562255
Iter 8000: [ 0.775005 2.03204 2.32867 3.39021 6.86554 ] -> 0.562255
Iter 9000: [ 0.775006 2.03204 2.32867 3.39022 6.86557 ] -> 0.562255
Iter 10000: [ 0.775007 2.03205 2.32868 3.39022 6.86557 ] -> 0.562255

PIECE VALUES:

Pawn: 100
Knight: 262.197
Bishop: 300.472
Rook: 437.444
Queen: 885.873