Movement of Chess Pieces Visualized
- font size decrease font size increase font size
The following graphics are composite of a chess piece's journey, gathered from over 2 million games from MillionBase. All of the moves are gathered together, and each faint line represents 500 moves from the dataset (rounding up).
The JavaScript program reads in a json file that has a list of moves and the number of times it occurs. For each entry on the list, it takes the number and divides it by 500 (rounding up), to determine the number of arcs to draw.Each arc is a very faint quadratic bezier curve, with the start and end point being the two squares on the board. The middle point is determined by a series of equations (basically the midpoint offset in both directions to give the arc both directionality and height).
All of the points have a little bit of noise added to them, so they don't clump up. I didn't realize that there doesn't seem to be a built-in, normally distributed random number generator in JavaScript, so I used the Box-Muller transform to translate uniformly distributed noise to normally distributed(ish) noise.
As a hobby chess player, this is quite interesting to me and beautifully represented. From what I can tell, the more pronounced lines seem to be common opening moves for each of the pieces. The following is the visualization of the white knight. To view all the chess pieces, visit the Imgur album here or follow the creator _Tungs_ on twitter.
