An unexamined life is not worth living.

Showing posts with label metrics. Show all posts
Showing posts with label metrics. Show all posts

Sunday, July 26, 2015

ICC Rating Graph

I only recently learned about this feature available at https://www.chessclub.com/cgi-auth/web_dev_perl/graph-rating.pl 

Here is my graph for games played with time controls 15 minutes and slower for the past few months. The feature is fairly limited in options, but fairly useful nonetheless!

image

Tuesday, June 24, 2014

Visualizing Chess - What Chess Openings Score Best for White and Black?

Inspired by recent articles on data mining of chess information, I pulled out my query on a chess SQL database that I ran on 1.5 million games, and with the help of Tableau Public – generated this infographic on 500 ECO codes. Here are the results:

  • Black does best with the ECO codes in bottom right corner
  • White scores best in the top left corner
  • For example A94 (Dutch Stonewall with Ba3) is the best scoring code for White
  • B59 (Sicilian, Boleslavsky variation) – apparently scores really well for Black.

If you are not too familiar with what opening moves each code corresponds to – this Wikipedia page will be helpful - http://en.wikipedia.org/wiki/List_of_chess_openings.

Image

Does anything on this chart look surprising? Is your favourite opening in the expected part of the diagram?

Thursday, January 6, 2011

SQL to Chess – Querying Chess Database

Most Chess Databases use their own format for storing information about chess games and the games themselves. If you want to query or extract any data out of the database package – your best bet is to use pgn files, although recently Aquarium also added ability to export data via scripts. In either case – performance is likely to be an issue as text files can get pretty large. When I learned that Jose Chess uses MySQL, I was curious to find out how to connect to its database so that I can search it with my own queries. Eventually, I was able to get it to work, and run a query like this against its large database which comes with Jose Chess and contains about 1.5 million games
image 

This query shows the opening that scores the best for White – A94 - who would have guessed! The most popular index is B22 – 2. c3 Sicilian. There is obviously now opportunity for running more metrics on players, openings, openings trends, etc.
Getting all the data extracted out of Jose Chess obviously took a bit of reverse engineering, but basically I had to:

  1. Find the path where Jose Chess and its embedded MySQL instance is storing the database. On Windows 7 it is - C:\Users\<UserName>\AppData\Local\VirtualStore\Program Files (x86)\jose\database\mysql\jose
  2. Install MySQL and MySQL workbench to have a standalone instance of MySQL
  3. Create a new database (schema) in MySQL workbench, and in that DB – tables to match the Jose Chess tables
  4. Drop the Jose files into my wherever my standalone instance of MySQL is storing its files - C:\ProgramData\MySQL\MySQL Server 5.5\data\jose_huge_db
  5. Restart standalone instance of MySQL
  6. Run the query on the screenshot above!

Here are the files that need to be dropped around:

image 

The only (but significant) disappointment is that Jose Chess is still storing game text (moves) in its internal binary format, so I can’t easily get to that data …

Friday, June 12, 2009

Chess Statistics – results as White vs. Black

As I am addicted to statistics, I decided to count my losses in tournament games, and just as I expected – I lost a lot more games as Black than as White. Since the year 2000 – 31 losses with the Black pieces, compared to 13 games I lost as White. These kind of stats indicate that the opening, and the direction it gives to the game have a significant impact on your tournament results (surprise …). With better opening preparation, you can hope for better results, but this also indicates that having a solid repertoire as Black is generally more important, or else you will be losing a lot of games without any fight.

Following a similar pattern, my results as White are not that different – White wins more games. With ChessBase Light it is easy to generate such statistics, just pick all your games (or maybe first filter it by year to exclude your kindergarten games), and hit the `S` key.

Total breakdown as White:

image

And as Black:

image

This also shows that I played more games as Black (looking at the results – tournament pairings probably did cost me a few rating points here and there…). Of course, you need to keep a database of your own games to be able to do this kind of analysis.

Sunday, February 10, 2008

Chess metrics - monitoring personal progress - Part 2

Here is another graph I generated based on my personal collection of games - this time it's my rating fluctuation on chessplanet server in the year 2007. And that's something that Chessbase or similar products I am aware of don't even support. It's interesting to see that the peak comes in May - the time when I was preparing for the Keres Memorial in Vancouver, so I put a bit extra time into studying chess - and I suppose that extra effort caused my blitz rating to go a bit up as well.
Posted by Picasa

Monday, February 4, 2008

Chess Metrics - monitoring personal progress

Although Chessbase (Light) and similar products allow to generate a bar chart on the number of games played by a player per year, of course a geek is not satisfied by that. A true geek wants to be in full control of his own data, so I wrote my own script that generates similar graph, but with breakdown per month. It's sad to see my activity in standard time control tournaments to go down so much after 2001, but on the bright side - I was instead learning scripting for all those years, so now I can delight myself with a chart like this one :)
Posted by Picasa

Hit Counter