Random Chess Conquests

In our last statistical analysis of chess, we looked at the relative frequencies on which the different squares of the chessboard are stepped on, by any pieces. The games analyzed were carried out by masters and grandmasters, who exhibit remarkable intuition and control of the game. I speculate that the distribution amongst amateur players and beginners will bear noticeable differences, but unfortunately databases of such games are more scarce than those of the famous and beloved players. Our quest to see whether we can improve ourselves as chess players and better understand the game using only pretty color diagrams will have to wait for a while in that aspect.
However, not all is lost, and there is another nice comparison which can be made using the frequency maps: looking at randomly played out games. We all know that chess is game of skill, intuition, cleverness, and knowledge. Hence, playing moves at random does not seem like a very good idea. Sure, occasionally a good move will be made by chance, but most of the time the result will be the brutal destruction of your pieces; even new players, when they are at a loss and do not know what they should do, try to stick to some formation, expand, or protect their pieces. Thus, if a player monitors his games and notices that his distribution map contains too many striking similarities to those of random games, perhaps he should be worried that he is doing something wrong.
Of course, playing a random game does not mean that the frequency distribution will be 1/64 for every tile, for we do not just pick a place on the board at random and put a piece on it. Each side starts with his army, and there is a very limited number of moves that he can make on his first turn. Even in later turns, there are many tiles that are unreachable, and the closer you move a piece to your opponent’s forces, the higher the chances that he will strike it down. In general, we absolutely cannot hope to obtain a uniform color diagram. Similarly, the number of turns in the game plays a crucial role in the distributions. In the late game, there is much freedom of movement, although not many pieces; in the early game, there is only a fixed set of squares and pieces which can move into them. Thus, when taking the average distribution of several random games, the number of moves in each game has to be taken into consideration. It would therefore be of considerable interest to see how random games behave.
For this purpose, a (not-so-small) python script was written, capable of playing random chess games. During each turn, a piece was randomly selected, and moved to a random legal position (taking into consideration checks, of course. However, two moves were not implemented: castling, and en passant). The games were recorded and saved, allowing the frequency analyzer script from our previous discussion to operate on them (effectively, the standard PGN notation was used, although in a degenerate form). For each master’s game previously analyzed, the script played a simulated random game against itself, with the same amount of moves as the master’s one. Effectively, though, the total number of random moves was less than in the original, since some games were ended short by checkmates.
The color maps are as follows:
[White distribution – colored in red. Black distribution – colored in blue. Total – colored in purple]

We observe a considerable difference between the random distribution and that of chess masters, and a variety of effects to which we must state our opinion.
First we note that the four central rows (3,4,5,6) are much more inhabited than the border ones (1,2,7,8), where the pieces initially start at the beginning of the game. This may happen due to the fact that random moves, as their name so aptly implies, do not aim to go anywhere in particular. There is no “hunt for the king”, or any chase after more valuable pieces, and accordingly, there is no defence whatsoever against any such attacks. Rather than hinder us, this fact actually makes it easier to analyze the result, and the color maps can be described as follows: the more pieces that can reach a certain square, the brighter it is, and that is all. It can therefore be said that these maps serve the purpose of showing a “time-lapse” of all the threatened tiles in a random chess game. This is true only for a mass of random games, for in a single match each tile is not stepped on a great number of times. It is important to realize that this statement cannot be justifiably claimed about the previous article’s color maps, since in those games there was an overall strategy guiding the movement of the pieces. Thus, the fact that a tile is threatened by several pieces does not deductively imply that the master player will move any piece to that tile; each of his moves is calculated and serves to gain him material or position, or to defend himself, and most of the time these moves do not coincide with the amount of pieces that can step on a certain tile (an obvious example: when retreating with the queen in order to prevent it from being captured).
This elucidates why the center rows are so populated – simply put, more pieces can move there than to the bottom and upper rows. Why is this? First and foremost, when the game starts, the bottom and top two rows are already fully populated. There is no option to move any piece other than the pawns and knights, and they can only step on the center of the playing field. As the game progresses, more and more holes gape up in the remote rows, giving pieces a chance to step there. A very interesting comparison to the physical world opens up now: the whole process is remarkably similar in concept to conduction electron bands in semiconductors. A pure semiconductor at absolute zero temperature has a full valence band of electrons, and an empty conduction band (in the chess game, these are the remote rows, and the central rows, respectively). Progress of the game is equivalent to heating up the semiconductor, in which case some electrons from the valence band transfer to the conduction band – these are the pieces which move forward towards the central rows. These open up holes in the lower rows, which can then be filled by other pieces, giving more freedom of movement (lower resistance). As a way of comparison, here is a schematic (courtesy of http://www.chemistry.wustl.edu) of electron bands in semiconductors. The image on the left is the initial position; in the image on the right some electrons (chess pieces) have moved up and created holes in the structure of the initial position.

In general, we can also try to use thermodynamics to study this random chess game. We begin with a highly ordered arrangement, but end up with scattered pieces lying about. As the game progress, more and more pieces can move about, and extract themselves from their initial positions. A kinetic matter analogy would be attaching two containers of gases to one another. The gases would start at each end of their respective container, but with time they diffuse to other regions and intermix with each other. Collisions between gas particles is equivalent to the fact that most chess pieces cannot move through one another (all but the knight). Thus, although almost all of the pieces can move in all directions, we never return to the same position, or even ones resembling it, and generally tend to spread over the chessboard, just as in gas diffusion.
Of course, we should not get carried away. Two very important and decisive factors differentiate the random chess game from a classical thermodynamic example. The first is that the displacement processes of our “particles” is asymmetric, this being due to the movement of the pawns. Pawns cannot go backwards under any circumstances except when promoting. In the thermodynamic world, this would be represented by a filter or membrane, which prevents molecules from travelling backwards, severely complicating the ordeal. Second, and probably more important, is that pieces get captured as the game progresses. Chess, after all, consists of two armies unleashing all their wrath upon each other. This means that certain pieces won’t get that far until they are destroyed. Hence the analogy to thermodynamics is not an exact one, and I am not inclined to think that one can simply “apply” the known physical formulas for the game. However, it is certainly a good place to start. A good approach would be to try and mathematically quantify the behaviour of each piece as a physical particle in a degenerate “ensemble” of gas, perhaps dealing at first with more trivial chess cases instead of diving head first into all the complex rules and layout.
We now fully understand why the central regions are so much brighter than the outer rows. At first, the central rows are the only places the pieces can go to. Also, pawns (constituting half the initial pieces), when they make their first moves, only allow pieces to escape the bottom two rows, further contributing to this effect. As time progresses, more and more holes open up, and the center becomes more cluttered. If this were a normal ideal gas, then the pieces would be uniformly spread out, and overall, if games were played ad-infinitum, we would expect a much smoother distribution. However, this is not the case of chess, which is limited by checkmates and stalemates. Furthermore, pieces get captured, with increasing chances the closer they are to the opponent, reducing chances of increasing the border rows’ frequencies, and pawns can only advance in one direction. Thus, when playing for a finite and not so large amount of turns, the central rows are much more popular than the outer ones. One immediate conclusion from this is that when playing against an opponent who moves randomly, putting your king in the corner will highly increase his security (of course, most people don’t need strategy tips against random moves).
In conclusion, even this artificial scenario – a chess game carried out completely by random moves – can lead to some interesting investigation. The fact that it is random allows us to compare it to other statistical phenomena in nature, such as gas diffusion. A simple and straightforward analogy won’t hold, of course, but it could be very worthwhile to investigate what this direction yields. Hopefully, from this we might be able to state something intelligent about non-random situations, although this is just a speculation.

One final remark about the nature of random games. While it may seem like these games often end in stalemates or are generally uninteresting, this is far from the truth. Overall, when running the random-game-playing script, about one in thirty games ended in checkmate, with no clear preference for either black or white. Amongst these victories was the fastest checkmate possible in the game:
1. f3 e5
2. g4 Qh4# 0-1

It was quite amusing to see this come up in a random game. Other interesting endgames are presented below. Some of them involved promotions, some had a full board, others very sparse; such is the nature of random games.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s