Calculating Piece Activity
One part I find always very intriguing about chess is piece activity. When watching great attacking games, it seems to be the most important factor in a chess position. But I always find it hard to quantify piece activity and weigh it against different factors in a position.As always, I'd like to try and quantify concepts which are often talked about but never clearly defined. So I tried my hand at piece activity and looked at some games through the lens of my activity definition.
Defining Piece Activity
In principle, piece activity shouldn't be too difficult to define. After all, piece activity is closely related to the number of possible moves a piece has. However, the type of squares a piece controls is also important. A rook that covers the first rank is much less active than a rook on the seventh rank.
For my score, I started with counting all the legal moves of the pieces. I feel that this is a good starting point, but I also wanted to make sure that a piece which controls more important squares will also be considered more active. So I counted the attacked squares in the opponent's half double. I also counted the attacked squares adjacent the opponent's king a third time, to increase the activity of pieces aiming at the king. The final formula for each piece is
Piece Activity = (Attacked Squares) + (Attacked Squares in Opponent's Half) +
(Attacked Squares around Opponent's King)
The activity of a position is the sum of the individual activity of each piece (not counting pawns).
There are many tweaks that could be made. For example, one could increase the zone around the opponent's king where the squares are deemed to be more important. Or one could value central squares higher. And an even more detailed approach would be to tailor the formula for each type of piece, like counting rooks on the 7th rank as more active.
I decided to keep the formula simple for now but I might change it in the future. As always, it's difficult to say which formula would be more correct, but I certainly think that there is room for improvement. I'm interested to hear some suggestions from you about the formula.
Piece Activity in Games
As some of you will know by now, I like to use such scores to get a better overview of chess games. So the first thing I did was that I looked at how the piece activity developed in different games.
Firstly, I decided to look at the classic game Steinitz-von Bardeleben, 1895. I was mainly interested in the pawn sacrifice which Steinitz played on move 17:
Here Steinitz played 17.d5!. With this move, he cleared the d4-square to bring the knight into the attack and opened the c-file for his rook. Here is how the piece activity for both sides looks for this game:
It's clear to see how much the activity of Steinitz' pieces increased after move 17.
Another pawn sacrifice that came to mind was from the game Huzman-Aronian, 2010.
Aronian played 20...d4! in this position. This time the sacrifice not only increased the range of Aronian's pieces, but the white pawn on d4 also blocked the movement of the white pieces. This can be seen in the activity graph of the game:
Finally, I thought that it would also be interesting to look at a game where one player restricted their opponent. The first game that came to mind was Fedoseev-Carlsen, 2021. Carlsen played a beautiful game and after 30 moves, they reached the following position:
All white pieces are stuck in the corner and Black is just dominating. This can also be seen from the piece activity plot for the game:
Around move 22, White's activity is steadily decreasing and the score is below 20 from then on. This score is not only much lower than the score of the black pieces, it’s also the lowest from all the games I looked at.
If you enjoy this post, check out my Substack.
Future Ideas
One interesting question is how the activity relates to pawn sacrifices. It would be interesting to look at many different pawn sacrifices and see if there is a rough estimate of how much the activity score should increase to offer compensation for the pawn.
The current score has also big jumps when pieces are traded. It might make more sense to take the number of pieces into account to normalise the score and try to avoid these jumps. With this change, different types of positions might also be directly comparable.
As always, I'm very interested to hear any suggestions or ideas from you.
You might also be interested in reading my post about finding the best square for a piece in a position.