Saturday, 26 April 2025

The Castle of Otranto, Shakespeare, Voltaire and the ancestry of suburban magic

I have just finished reading Horace Walpole's The Castle of Otranto. Below the break, I will review it in my usual manner (i.e., quickly and usefully), but I am really here to talk about what Walpole said he was trying to do when he wrote the book.

Thursday, 17 April 2025

What chess teaches us about AI - and what AI teaches us about chess

It sometimes strikes me as odd that humans still play chess despite the fact that computers can do it much better than us.

I know that people still delight in foot races or contests of strength despite there being machines that are much faster and stronger than any of us, but I don't find that odd. Humanity has grown up in the knowledge that it is a physically weak creature: there have pretty much always been domesticated animals that are faster or stronger than us, let alone wild ones. 

But, although we weren't the stongest or fastest animal out there, we knew we were the cleverest, with minds that far surpass anything else we encountered, minds that allowed us eventually to outwit and subdue all the alpha predators and alpha prey (if that's a thing - think mammoths) that we came across. 

Chess was a kind of symbol of this intellectual mastery. The 100m Olympic final might tell you who the fastest man in the world is, but the world chess championship plausibly used to tell you who was the best entity in the entire universe at a particularly demanding mental endeavour. It doesn't surprise me that when Deep Blue defeated Gary Kasparov, it was a pretty big deal

Yet on we go, playing games that once would have been regarded as the among highest intellectual achievements in the known universe, but are now the equivalent of washing up by hand when you could use the dishwasher. 

What's going on? Why has our self-regard - our self-conception as the intellectual monarchs of creation - not been badly dented?

Part of the reason is that we have changed our view of what chess is. No-one really thinks it's like discovering the Grand Unified Theory of Everything or writing a symphony any more. It's not even brain surgery or rocket science. It's just a diversion, like noughts and crosses but a bit more tricky. 

One question that immediately arises is: when (and surely it is when) AI does produce cutting edge science, or a mathematical proof no human could hope to achieve, or write a symphony beyond Beethoven's wildest dreams ... what then? Will we then regard those achievements as nothing more than mere arithmetic, better handled by machines than humans? Presumably brain surgery and rocket science are even closer to losing their lustre: what then will we say about easy tasks?

But I want to leave that high-falutin' stuff to one side for the moment. I've got a more prosaic point: AI will be really good at teaching us how to do the things we want to do. (By "AI", I don't mean to refer to the latest LLMs, simply to any computer process.) And it turns out that what we want to do involves other people.

I have recently come across this website called lichess.org. It's amazing and I recommend it to anyone who plays chess. You can play against a seemingly limitless pool of humans or against a computer at various different levels of difficulty. But it does a number of other cool things besides. And it's all free. 

I'm going to show you some of the cool things that it does. You won't need to understand anything about chess to understand the points I am going to make, but if you are completely allergic to chess-chat then just skim until I shout NO MORE CHESS below.

As an illustration, I will use a very low quality game of chess that I played recently (against another human). If you play chess then you will see that I am not using this example as a boast: it is not a game on which either I (white) or my opponent (black) can look back with any great pride.

After you finish a game on lichess, you can get the computer to give you an analysis of it. That is what I show here. 

This is the game as at move 20, when black has just blundered with Nd4. Black's idea is to put pressure on the bishop on e6 and simultaneously be threatening against the white king, which is looking a little exposed and has a few pieces pointing ominously towards him. But it's a blunder nonetheless, as we shall see. This is what you see on lichess (click on it to see it properly):


You'll see that black has 3:28 left and I have 3:03. It's a fast game (5 minutes each side plus 3 seconds per move), which in part explains the poor quality of play.

You can see that black's move, Nd4, is highlighted in red and described as "??", i.e. it's a blunder. You'll also see that the computer recommends Bc4 for my next move - but that I also blundered with Bxf6 instead (also in red, also with "??"). Then you can see that black blundered one more time by re-taking the bishop with the pawn rather with the knight. That allowed me to play Bc4 next move (which I should have done before) and that won the game.

You can also see that the computer identifies not only "blunders", but also "mistakes" (less serious errors, in a kind of gold colour) and the even more minor "inaccuracies" (in blue): I have taken this passage of play in part because it is so full of sub-optimal moves that it's a good example of quite how colourful lichess' analysis of fast and messy play can be.
 
Below that, you get this overview of the game as a whole:


The red line shows who is winning - if it is above the horizontal line then white is winning and if it's below the line then black is ahead. I was marginally ahead in the opening, notably behind thereafter, but you can see that black's blunder has put me well ahead - although I'm about to throw it away with my next blunder - except that black will then re-blunder and put me back in the lead.

NO MORE CHESS

That's enough chess-chat. All I meant to show you was that about 5 minutes of human diversion - a quick break in the working day - can be rigorously analysed by a computer and used as a highly personalised teaching tool. If I were to click on the blue "learn from your mistakes" button then the computer would give me actual examples of my own games, show me where I went wrong, and ask me to work out the better moves. It recommends specific training using its wider library of puzzles (you'll see that it recommends Two Knights Defence puzzles in the picture above). And it does all of that, tirelessly, without complaining that it is working with an idiot who can't even play an obvious move like Bc4 and for free. This is a really extraordinary resource. And it is used, by thousands of people, in order to improve their ability to beat other people at chess.

Now imagine that kind of resource being available in other fields of human endeavour. "That character was introduced too early in your novel", "this is the kind of problem in which it's helpful to take logs" or "here are some changes that might get your project funded by these institutions". There is no inherent reason why AI would not be able to produce advice like that, just as it can tell me that Bc4 was the right move.

Almost 12 years ago, i.e. well before the wonders of recent AIs, Tyler Cowen went even further:


I think we can all agree that "you are sampling optimally in the quest for a lifetime companion" is not quite how the user interfaces of today would put it, but the idea is there. The kinds of advice that lichess can give you about your chess game could soon be provided about your game game, so to speak. 

Would we take such guidance from computers? Of course! As Cowen points out, GPS was already so standard even back then as to be unremarkable. Food preparation is not far behind now. Many people already use AI for low-level social or professional correspondence (the suggested replies to emails or, for example, LinkedIn posts are getting more useful all the time). 

So I'm inclined to think that we'll carry on quite happily competing with (or trying to get off with) each other even when there are AIs whose intelligence compares to us as the speed of a cheetah or the strength of an elephant do.  

I said above that we have always known that we are in the company of physical giants but regarded ourselves as the intellectual giants. But on reflection I'm not sure that's entirely true. Until recently, it was pretty common to think that the Earth was also inhabited by entities with intellectual powers well beyond our own: various gods and spirits with foresight, wisdom and knowledge that humans could never hope to match. We may well now be creating them for real. Perhaps it's just as well that we already have mental models of how to deal with them.

One final point. There are various stories about gods with amazing powers - gods who move the sun or throw down thunderbolts - or gods of various powerful things - rivers, mountains or seas - but we're a pretty self-regarding species and we never had any difficulty in supposing that these powerful creatures would be interested in what we get up to. Poor old Odysseus, for example, was a small and weak chap compared to the Olympians, but they nonetheless took a keen interest in his doings. At present, AIs are pretty interested in our doings too: they'll patiently answer your trivial questions and draw you silly pictures without pointing once out that you might be wasting the time and energy of an incredibly intelligent being. Perhaps the real problem for humans would come, not if we are surpassed by AIs, but if we are ignored by them. Then again, we might be sufficiently self-regarding to shrug that off too. I asked above why our self-regard has not been badly dented: perhaps self-regard is the one axis on which humans truly excel.