lichess.org
Donate
a black bishop on a dark square

What if chess would be solved?

ChessChess engine
I did some thinking in my spare time and I’m glad to announce that I’m very close to solving chess. Only a few more things I need to check. Here, I want to prepare the people for the day chess is finally solved.

Lately there has been a lot of news about chess, pushing our understanding of the game (or rather the computers ‘understanding’ of the game) to new boundaries.

It has come to my attention that a new version of Stockfish has arrived: the 18th. https://lichess.org/@/StockfishNews/blog/stockfish-18-is-here/vztqTa71
According to the creators it’s 46 elo-points stronger than its predecessor. And frankly, I’m happy about it. Stockfish 17 was pretty fun for a while, but after you learn its few tricks, it’s pretty much a pushover.

Then in another announcement, we were informed that much work has been done to develop an 8-piece tablebase, which is now available on Lichess.
https://lichess.org/@/Lichess/blog/op1-partial-8-piece-tablebase-available/1ptPBDpC
For those unfamiliar with tablebases: it’s basically an extremely large look-up table with all possible positions and their results with perfect play. So in a position with, say, 6 pieces left, you can simply look in the table to find out whether the position is a win, a lose or a draw. You can also find out which move to play to achieve the desired result, as any move will result in a position with either 5 pieces (a capture) or 6 pieces (no capture), which by definition also is within the tablebase.

So I wondered: what if we solve chess? Can we finally move on to something more useful? Like, calculating more digits of pi, or something similar?

Now, chess consists of 32 pieces in total, so an 8-piece tablebase doesn’t sound like we got very far. But keep in mind: the number of possible positions grows exponentially with number of pieces. The process will therefore only go faster and faster the further we get. Once we get to 9, the next step to 10 gets even faster, and then 11 is even faster than that, and before you know it, we reached the desired 32 pieces. A smart person told me it works like this.

What does ‘solving’ actually mean?

In some way, chess is already solved. With correct play, the result is a draw. I’m just going to pose this statement here without any reference.

But that isn’t a very satisfying and complete solution. As I (and probably others as well) found out in all my thousands of games, it’s actually not very obvious what ‘correct play’ is. Some even go as far as to claim that playing chess flawlessly is ‘somewhat difficult’. So it would help tremendously to actually have a solution of a game of chess: a game that transitions from the starting position to ending position without ever breaking the balance between white and black. And you’re in luck! I found something I’m pretty sure is a proper solution:

https://lichess.org/study/ZPYa5XwT/mOh4JhKe#66

Good! We’re getting a lot closer to solving chess now. Unfortunately, it has come to my attention this might not be the only solution. Have you ever had the situation where you, after lots of pain and suffering, finally established that x might possibly be equal to 0, and then your mathematics teacher requests that you find yet another solution? If not, consider yourself lucky, most students think it’s torture. Life would be much simpler if we could all agree that we would only play the solution proposed above, but it turns out many others alternatives to maintain the balance exist.

So in order to satisfy your mathematics teacher, a proper answer would be all the possible move sequences from move 1 to the finish, without ever breaking the balance, achieving a draw. I fear that’s a pretty large amount of solutions.

Are we done then? Well, not really. The enormous pack of solutions wouldn’t help much in my games where I blundered a piece on move 4, completely demolishing the subtle balance of the game, leaving me with the challenge to make something of the mess I found myself in. What I want to say, is that there exists another broader form of a ‘solution’. In this form we would have knowledge about the result in any given position. Whether it is 1-0, ½-½ or 0-1. As mentioned, a tablebase does exactly this.

So when I’m talking about ‘solving chess’, I’m referring to this final form; the solution in which we know absolutely everything in any possible configuration of pieces.

Analysis with perfect knowledge

Let us assume we actually have perfect knowledge stored somewhere in a computer. Surely, this will greatly help our analysis, right? Well, we can check, kinda. We have a 7-piece tablebase, so what value does that bring us?

https://lichess.org/study/ZPYa5XwT/SlGD0wN3#0

https://lichess.org/study/ZPYa5XwT/kjzAu62Y#1

Well, not always what we want. Take a look at the positions above. In the first position, white is clearly pushing for a win, but black has some kind of a fortress by shuffling the rook between e6 and g6. It’s an objective draw, verifiable by tablebase. So what’s the best move? Well, mathematically all moves that draw are equally strong, assuming that both we and our opponent have perfect knowledge. So we might as well play Qxe6?! It’s also a draw.

The second position is similar. In normal circumstances white may have some hopes of winning by first tracking down both pawns, and then playing 50 moves R+B versus R. That endgame is a draw, but it’s somewhat tricky to defend. But in the world of tablebases, many moves all collapse down onto the same result: a draw. So you might as well play Bb7?! Giving up the B is fine, as the rook endgame with f- and h-pawns is a theoretical draw. It’s insanely hard to keep in practice, but it’s possible to hold.

https://lichess.org/study/ZPYa5XwT/AqhaF6tm#1

The problem is not exclusive to drawn endgames. Perfect knowledge isn’t very helpful in defending lost positions either. You can argue that the best defensive move is the move that loses the slowest, which works in some cases, but definitely not all cases. In the position above that would mean black would play Qd8?!, giving up the queen and going into a completely hopeless endgame. The alternative, Kh7?!, runs into a checkmate in four, which technically loses faster. And yes, computers have a tendency to throw away pieces in a desperate attempt to delay checkmate. I don’t know about you, but I would always go for Kh7 in this situation and hope the opponent misses it.

I agree, these examples are quite extreme, but the concepts I’m explaining here apply to normal positions as well. Collapsing all possible moves onto only three options (win, draw or lose), is not very helpful at all when deciding which move to play in a practical situation. To illustrate, I took a random game with the evaluation graph we all know and love, and then transitioned it into a solved-chess evaluation graph (assuming +1 is the boundary between win and draw). Admittedly, it very clearly shows the points where ‘you messed up so badly it’s no longer salvageable’, but in between these points it’s utterly meaningless. The second graph actually has lost the nuances and a part of the information.

EvAll.png

Analysis in a non-perfect situation

In the example I just gave, we can argue like this: If we play Qd8, finding Qxd8+ is really easy for the opponent, and the chances for them to mess up from there are abysmally small. If we go for Kh7, the opponent has to see the entire mating sequence, otherwise a draw is very likely. So, although both moves are obviously losing, Kh7 is our best bet. The key here is that chess games are rarely played perfectly. We have to take into account the likelihood of mistakes to happen in various variations. It’s the reason strong players push on in endgames they know are a theoretical draw. The same thing applies when choosing between an opening with a drawish reputation or a sharp reputation. In fact, it’s the whole reason we keep playing chess!

At first, I assumed that engines would be pretty bad at distinguishing between calm draws and very sharp double-edged draws, but then I realized: nope, they’re pretty good at that too... I remembered there is this BOT called LeelaPieceOdds here on lichess, which is specifically trained to play against humans with piece odds. So, what I understand from it, it steers positions into troubled waters, often sacrificing even more material, to exploit human weaknesses in these tactical nightmares. So yes, these neural network engines can take ‘the likelihood of opponent mistakes’ into account in their calculations. For those that don’t believe me, and even for those that do, I strongly recommend playing a view 5+3’s against this bot, and you’ll find out how insanely tricky things can get even when being two pieces up.

https://lichess.org/@/LeelaPieceOdds

But still, my point stands I would argue. The Stockfish bot here on lichess technically doesn’t play perfect chess, but practically speaking for analyzing all our meaningless 3+0 games, it pretty much close enough. In many positions (primarily endgames I think), like the examples given here, it’s actually not that helpful. I once tried for example practicing my defensive skills in rook endgames with it, like the position below, but the machine doesn’t try to make progress like a human would. It just shuffles pieces back and forth, as in the eyes of the machine, every move is an equal 0.0 evaluation. (Ironically enough this strategy is most fruitful against me, because I get annoyed and blunder 30 moves into the 50-move-rule.)

https://lichess.org/study/ZPYa5XwT/ZK51zk3G#1

Of course you could try to program in the ‘likelihood to make mistakes’ parameter into the software, as LeelaPieceOdds apparently does. As a matter of fact, I’d assume there’s a lot of work behind the scenes to make that work. But it’s a very ugly parameter. Like, what opponent do we assume? Another 3600+ rated engine, or a 2700-GM, or just good-old-2200-rated me? And should we also include our own mistakes then? I gonna be real honest now, but I must admit that despite always aiming for perfect chess, I do try to play for (little cute) tricks against lower rated people every now and then in blitz. But surely we don’t want our engines to start suggesting these types of moves, right? When it goes: “well this move doesn’t actually work, but your opponent is a noob, so there’s a 99% chance they fall for it...”

Conclusion

I feel like this hasn’t been a very cohesive piece of text, but rather a rambling of thoughts... But my general feeling is that engines in many cases aren’t extremely helpful with creating analysis and understanding. Assuming that chess would be solved illustrates it perfectly I think: It sounds most useful, but it really isn’t when you think longer about it.

In some cases, you could even argue that my ancient old copy of Fritz chess is more useful than the cutting edge technology mega-hyper Stockfish 18. It’s less perfect, but tactically still strong. If Fritzy doesn’t see a tactic, then any human (at my level) wouldn’t see a tactic. If there is a tactic, but nobody is around to observe it, does it even exist then?! Very philosophical, but also very practical. Regretfully, my good old Fritz is so amazingly terrible at positional play, that even a 14-year-old me could identify its flaws, so I wouldn’t recommend using it for any serious analysis or preparations.

So, to answer the question in the title: not much would happen, I think. I really think people would just continue to play as normal, analysis goes on as normal, etc... The game remains complex even in solved state. I guess the era of computer competitions would be pretty much over then, but I’m sure these poor machines can find another hobby to keep their processors warm and occupied. I guess there would also be some headlines in newspapers. ‘Chess finally solved’ or something like that. Somewhere on page 8 between the advertisements or so. Life goes on.

And just to conclude. Chess is very far away from being mathematically solved.

The Library of Babel

Just for fun, I wanted to also mention a vaguely related other concept: the Library of Babel. I learned about this in some random video long ago, and I’m lucky some Internet searches gave me the correct Wikipedia page:

https://en.wikipedia.org/wiki/The_Library_of_Babel

So, this is the idea... Imagine a library with a lot of books. How many? Well, all possible books! Let us limit ourselves to books with a fixed length, say 1000 characters. You might think, well with 26 characters in the English alphabet (and with some punctuation marks), that’s quite a lot of books! And that’s correct, the amount of possibilities to select 1000 characters out of a set of 26 is enormous (N=26^1000), but it’s a finite number. Just like chess. The amount of possible games is enormous, but it’s finite. You could even give every book its own number, if you wish. Book 1 would be only consisting of 1000’s times the character ‘a’. Then book 2 would be 999’s times ‘a’ followed by a ‘b’. Et cetera.

Now obviously, most of these books would consists of complete gibberish. Even the extremely small amount of non-gibberish books could simply be lying to you. However, every piece of wisdom (that can be written in 1000 characters) is located somewhere in the library too, because, by definition, the library contains everything.

It gives a different perspective on inventing stuff. You didn’t ‘create’ the invention. The correct book has always been there, somewhere, to be found. The only thing you did is distinguishing it from all the nonsense books surrounding it. Which, given the gigantic amount, is quite an accomplishment. And because the books are conveniently numbered, you can just give the number to your peers. “Hey guys, I just found the solution to insane time trouble already at move ten, it’s written in book 2718281828459045. It says you have to play faster”.

I like to see chess similarly. The solution(s) is/are already there, floating here in the universe, waiting to be found. Even if we would magically manage to grab those naughty solutions and put them into a gigantic computer database, would that really mean anything if there is no human that actually knows and understands them? If knowledge is the capability of distinguishing gibberish from actual truths, would having all these truths stored away in dozens of closed boxes in a dark corner actually have meaning? Stored in a forgotten box or floating in the ether, what’s the difference anyway? Even me as the all-knowing narrator of this blog post cannot give you the answers on these way-too-philosophical questions.