I have expanded a little more my tool and now it also searches promotions/underpromotions that give check and checkmate (now my tool spends around 20% to 25% more time to do the new searches). Please take in mind that my results are not exact (as reported by Joined) but very good approximations. OTOH, I do not search promotions/underpromotions that are captured in the next move for two reasons:jacobbl wrote:I've also seen underpromotion to rook when setting a mate. So I think to get relevant frequencies of the importance of underpromotion, you should remove promotions that are captured in the next move and convert underpromotions that result in a mate (except for knights) to a queen promotion.
a) I only know how to do it when white promotes a pawn but not when black promotes a pawn: I am not a programmer and I search certain text strings inside the PGN file. There is a move number between black promotion/underpromotion and white capture and I do not konw how to handle it.
b) In the case I know how to handle it, the tool will be very slow because it would have to search lots of certain text strings ('a8=Q Kxa8', 'a8=Q+ Kxa8', 'a8=Q Qxa8', ..., 'h8=N+ Nxh8'; 640 strings if I am not wrong, that is, almost nine times slower... and I only get results with white promotions/underpromotions). It is impractical for my poor level tool.
I ran my tool through CCRL-404FRC.[129100].pgn again (there is not an update since 27th May, 2013!):
Code: Select all
[...]
Searching for games and results...
Games: 129100 Estimated remaining time: 542.8 seconds.
1-0: 54190 Estimated remaining time: 530.1 seconds.
0-1: 48390 Estimated remaining time: 515.0 seconds.
1/2-1/2: 26520
Unknown: 0
______________________________
White score: 52.25%
______________________________
White advantage: 15.62 Elo.
______________________________
Searching promotions and underpromotions...
[...]
61/64 h8=Q 5441 Estimated remaining time: 123.9 seconds.
62/64 h8=R 169 Estimated remaining time: 117.3 seconds.
63/64 h8=B 34 Estimated remaining time: 110.7 seconds.
64/64 h8=N 46 Estimated remaining time: 104.2 seconds.
Promotions/underpromotions to:
Q: 65056
R: 2190
B: 519
N: 1166
Searching promotions/underpromotions that give check...
1/8 *1=Q+ 3048 Estimated remaining time: 97.8 seconds.
2/8 *1=R+ 82 Estimated remaining time: 91.3 seconds.
3/8 *1=B+ 41 Estimated remaining time: 84.8 seconds.
4/8 *1=N+ 139 Estimated remaining time: 78.3 seconds.
5/8 *8=Q+ 3356 Estimated remaining time: 71.8 seconds.
6/8 *8=R+ 105 Estimated remaining time: 65.2 seconds.
7/8 *8=B+ 43 Estimated remaining time: 58.7 seconds.
8/8 *8=N+ 128 Estimated remaining time: 52.1 seconds.
Searching promotions/underpromotions that give checkmate...
1/8 *1=Q# 518 Estimated remaining time: 45.6 seconds.
2/8 *1=R# 12 Estimated remaining time: 39.1 seconds.
3/8 *1=B# 0 Estimated remaining time: 32.6 seconds.
4/8 *1=N# 3 Estimated remaining time: 26.1 seconds.
5/8 *8=Q# 521 Estimated remaining time: 19.6 seconds.
6/8 *8=R# 18 Estimated remaining time: 13.0 seconds.
7/8 *8=B# 0 Estimated remaining time: 6.5 seconds.
8/8 *8=N# 7
Approximated elapsed time: 540.8 seconds.
[...]Code: Select all
(*=Q#)/(*=Q) = (518 + 521)/65056 = 1039/65056 ~ 1.6%
(*=R#)/(*=R) = (12 + 18)/2190 = 30/2190 ~ 1.37%
(*=B#)/(*=B) = (0 + 0)/519 = 0/519 = 0%
(*=N#)/(*=N) = (3 + 7)/1166 = 10/1166 ~ 0.86%
(*=*#)/(*=*) = (518 + 12 + 0 + 3 + 521 + 18 + 0 + 7)/(65056 + 2190 + 519 + 1166) = 1079/68931 ~ 1.57%Regards from Spain.
Ajedrecista.

