I noticed that Chess.com now has a public API. If you're into programming, you'll know that that means we can make GET requests to the server and receive lots of cool data.
All users' games are public, and the API call to retrieve game data is very simple. I have made some simple Python (3.x) code for collecting games a user delivered mate, count the number of times a certain piece delivered the mate, and then plot this in a basic pie chart.
So which piece delivers the most mate? We would all predict that the more powerful a piece is, the more often it delivers a mate. Hence, queen > rook > knight/bishop > pawn. This is basically reproduced in the plots (no surprise).
Mating at promoting is less common, and I have not detected any mates delivered by castling. I have not looked for en passant mates, but that could also be interesting to count. I'm guessing it occurs very rarely.
Does anyone have any suggestions for other semi-interesting stuff to check with the API? I was thinking that perhaps one could define certain mating patterns and attempt to count the occurrences of these.
Data comprise all games played from 2010 to 2019, excluding any games where the player did not deliver mate, and excluding bughouse games. Just for fun I included my own games, just to see if there is a big difference between pros and n00bs. Apparently not.
Interesting stuff.
How about a simple ranking of all the different types of chess game here- by standard and variant- and by time control-- maybe listed by year so you could see if the preferred time controls are changing, etc.
I noticed that Chess.com now has a public API. If you're into programming, you'll know that that means we can make GET requests to the server and receive lots of cool data.
All users' games are public, and the API call to retrieve game data is very simple. I have made some simple Python (3.x) code for collecting games a user delivered mate, count the number of times a certain piece delivered the mate, and then plot this in a basic pie chart.
So which piece delivers the most mate? We would all predict that the more powerful a piece is, the more often it delivers a mate. Hence, queen > rook > knight/bishop > pawn. This is basically reproduced in the plots (no surprise).
Mating at promoting is less common, and I have not detected any mates delivered by castling. I have not looked for en passant mates, but that could also be interesting to count. I'm guessing it occurs very rarely.
Does anyone have any suggestions for other semi-interesting stuff to check with the API? I was thinking that perhaps one could define certain mating patterns and attempt to count the occurrences of these.
Data comprise all games played from 2010 to 2019, excluding any games where the player did not deliver mate, and excluding bughouse games. Just for fun I included my own games, just to see if there is a big difference between pros and n00bs. Apparently not.
