Subject Filter
A scientist's take on the Game of Kings
| Chess Puzzles | Book Reviews | | Annotated Games | Opening Analysis | Science | First Time Here?
| Chess Puzzles | Book Reviews | | Annotated Games | Opening Analysis | Science | First Time Here?
Showing posts with label Software. Show all posts
Showing posts with label Software. Show all posts
Saturday, March 28, 2015
Making Random Moves
Most human players and chess computer engines alike select their moves through a combination of two processes: searching through the consequences of possible moves, and evaluating current and future positions. Each of us have our own talents and capabilities in performing these two tasks. But what if chess was played randomly, with no bias, ideas, experience or thought put into any moves?
Well, somebody took the time to answer this question, and did so in an impressive fashion. This report by @billautomata, generated approximately 100,000 random games, finding that a vast majority ended in a draw (85%) and lasted an average of 342 moves. This data is presented with some very neat visualizations.
While the high draw is not necessarily surprising (after all, these computer players are identically matched in skill), it would be interesting to know if White or Black had a greater share of the few wins that did occur. Unfortunately, the data from the above analysis is not freely available (as far as I know).
In light of this, I have utilized the chess.js JavaScript library to create an accessible way to generate and store random computer games. You can access this simple tool from my other site. While this may not serve any useful purpose, it could nonetheless be interesting to see which side (White or Black) ends up with a better score after random moves. I should note that others have created random moving chess programs with better visuals, such as developed by the chessboard.js team.
That's all for this week! Stay tuned for more computer analysis and links. Please share your thoughts, questions, comments and consternations below.
Sunday, March 8, 2015
Chessboard Heatmap and Updates
In a previous post, I introduced a suite of Javascript tools that can be used to reformat PGN files and determine square utilization (traffic) and square occupancy (parking) for different pieces. Since that post, I have rewritten the code and improved the functionality of each of these tools. I have used these tools to collect data on square utilization or occupancy, which I then process further in an excel file (which I will make available shortly) and generate heatmaps using Plotly. However, Plotly was cumbersome to use, having to reformat the heatmap for each data set.
Here, I am introducing another Javascript tool that can be used to take square utilization or occupancy data and generate customizable heatmaps specifically for chess. This can be found at the following address: http://djcamenares.x10.mx/chess/heatmap.shtml
In the rest of this post, I describe how to use the features on the heatmap program, as well as detailing other updates to the site. Select 'Read More' to view the rest of the article. Please feel free to share your comments regarding this tool, especially if you used it to generate interesting insights!
Sunday, March 1, 2015
Tools for Statistics of the Squares
Ever wonder which squares see the most traffic? Or which squares have pieces 'parked' on them for the longest periods of a game? Now, you can answer these questions easily using a series of JavaScript powered tools I have developed. These are based upon the LT-PGN JavaScript viewer, and calls upon that code (which I did not write) for certain functions. In fact, it directly calls upon the LT-PGN PGN2FEN tool, although my adaptation can handle PGN files with multiple games.
I was inspired to develop these tools after reading some of the chess-visualization articles posted on the ChessBase website, namely, the analysis of square utilization by Seth Kadish earlier last year (analysis which you can also find at Seth's blog). I really liked the approach, and although the source of the game PGNs were made clear, I wasn't sure how he extracted the data. Also, I thought there was potential to observe more than just square utilization, or 'traffic'.
In order to carry out this analysis, I created three separate JavaScript tools. They aren't shining examples of efficient coding, but they get the job done. They are as follows:
Reformatting PGN Text
http://djcamenares.x10.mx/chess/pgnreform.shtml
Although PGN files from 365chess.com can be used directly in the downstream applications, the chess software I use (HIARCS) places line breaks within the game score. This tool will remove them, leaving all other features of the PGN intact.
Move Counting (Determining Square 'Traffic')
http://djcamenares.x10.mx/chess/traffic.shtml
This tool takes a PGN file, with single or multiple games, and can determine the square utilization or traffic of the White player, Black player, or both players. It also reformats the PGN so as to remove the header tags.
Batch Conversion of PGN to FEN, Counting Square Occupancy ('Parking')
http://djcamenares.x10.mx/chess/parking.shtml
This tool takes a PGN file, with single or multiple games, and does several things. First, it removes header tags from the PGN. Then, it converts the PGN first to FEN, then to an expanded version of FEN in which each square, filled or empty, is declared. Finally, the occupancy, or parking, of different pieces (selected by user) on each square is reported.
To see some example results of these tools, which expands upon the aforementioned work by Kadish, please select 'Read More' below.
Subscribe to:
Posts (Atom)