Hi, I’m Julian. I’m a chess player and the author of the Chess Engine Lab Substack. I write about different ways to use chess engines and share the results of various experiments I made with engines.
One idea I had was finding brilliant moves using only engines. I shared this idea with Martin and he offered that I can publish it on his newsletter. I’m more than happy to share the post here and hope you’ll enjoy it.
Defining Brilliance
Defining brilliant moves isn't easy since there are no clear rules that make a move brilliant. Also, many people may disagree if a move was really brilliant. But I think that every brilliant move has to be the best move in the position and also has to have a hint of surprise.
The quality of a move is easy to check with engines, but classifying the surprise value of a move is more difficult.
Calculating Surprise Value
To find out how surprising a move is, I use the policy output of Leela Chess Zero. The policy of a move is its likelihood to be played without any calculation according to LC0. Since LC0 learns through self-play, it builds up some “intuition” of common moves, which should be reflected in the policy.
The idea is that this intuition is similar to human intuition because both develop this intuition by seeing many different examples.
The policy value depends on the network used for LC0. I tested different network sizes. I noticed that the larger networks are already very strong when only using the policy header (as was shown in a blog post by the LC0 team). So the strongest moves had large policy values, even if they were quite difficult to find. I decided to use the “small” network from here.
There has to be some cutoff for which policy values should be counted as surprising. After some tests, I landed at 2.5% but determining hard cutoffs like this is always difficult.
If a move played in the game has a policy of less than 2.5% it’s left to check whether it is also the best move.
Move Quality
It's also important that a brilliant move is the best move in the position. To determine how much better the move played is than the second-best move, I calculated the win probability from Stockfish's centipawn evaluation. I used the formula which is also used by Lichess and can be found here.
The win probability is a better measure for move quality since a change of 200 centipawns can mean going from 0 to +2 which is a huge difference, or going from +8 to +10, which is rather insignificant.
As a cutoff, I decided that the win probability of the best move has to be at least 15% higher than the second-best move. To get a feeling for this, a 15% difference in win probability is the difference between +1.7 and 0 or +4.23 and +2. So as the evaluation gets higher, the difference has to be greater to have the same change in win probability.
However, the win probability only works if there are no forced mates. If the best move forces mate and the second best move doesn’t win, the best move is clearly a brilliancy. But if both moves force mate I decided that the best move isn’t brilliant.
The situation gets more complicated when the best move forces mate and the second best move is winning, but does not force mate. I decided to include all forced mates in 5 or less. Again, this is somewhat arbitrary, but a line has to be drawn somewhere.
Now that all preliminary explanation is done, we can look at some brilliancies.
Finding Brilliancies in Games
To test the program, I decided to look through all the games from Alekhine and find the brilliancies. I’ll look at some examples here and you can find all the games with brilliant moves in them in my Lichess study here.
Many of the brilliant moves are well-known sacrifices like the following from the game Alekhine-Colle, 1925:
Here Alekhine played 30.Qxd7!!
But not all brilliant moves lead to a flashy forced win. Take a look at the following position from the game Apscheneek-Alekhine, 1939:
White is a pawn down and it doesn’t look good. However, they have one move that keeps the position roughly level, namely 54.Nxd5!! The point is that after 54…cxd5 55.c6 White gets enough counterplay with the passed c-pawn. The game continued with 54…Rd1+ 55.Kc2 Rxd4 and even though the game is equal, White lost in the end.
There was also one example of a brilliant move in Alekhine’s games that I found very curious. The following position is from the game Lasker-Alekhine, 1913:
Black has mate in 1 with 46…Qexb4. I found it very surprising that this move only had a policy of 0.46% (which is very low) since it’s mate. But at the same time, I can also see why this move is a bit surprising.
Finally, let’s end with a nice puzzle. This position is from the game Alekhine-Kussman, 1924. It’s White to play and win.
Conclusion
The results look very promising, but since brilliant moves are quite subjective, it’s hard to determine how “correct” this approach is. My main hope was that not too many moves should be called brilliant because brilliant moves should be rare. I do think that my current approach might even be on the more conservative side.
If you have any improvement ideas, let me know.
I hope you liked the guest post!
I will be off on vacation for the next week with my family. Remember to take some time away from chess and recharge as well!
To the book club: I noticed on the recent poll that quite a few have fallen behind, so we are pushing the deadline for reading the next chapter to the 7th of July.
Enjoy the summer everyone!
/Martin
I have gone through some examples in the Lichess Study. Your technical criteria seem to be quite good at capturing "brilliant" moves. Well done.