Wednesday, 5 March 2025

The Perfect Play Syndrome

Two ladies waiting for chess to be solved so the can get their husbands home from the chess club.
Last time, we saw that chess will not be solved by brute force methods anytime soon (if ever). Can Perfect Play provide a solution? 

Wikipedia says: In game theory, perfect play is the behaviour or strategy of a player that leads to the best possible outcome for that player regardless of the response by the opponent. Perfect play for a game is known when the game is solved.

That last sentence means that perfect play is unknown for unsolved games like chess, so trying to solve chess by perfect play is not possible. Still, that doesn't prevent some players, obsessed with the idea of perfect play, from spending oceans of time trying to solve at least the position they have in front of them. That's futile, because almost all positions are insolvable. We can solve mate puzzles, and endings with seven pieces or less, but that's about it.

Even ancient seafarers used navigational charts to arrive safely at their destination. In chess, we have opening manuals serving the same purpose. While navigation now can be considered solved, nearly all possible chess positions remain in uncharted territory as we saw in the previous article.

Before navigation was solved, some daring seafarers like Leif Eriksson or Christofer Columbus ventured off the map, even a the risk of perishing in unknown waters, and found America. Many others, unmentioned in the history books, went under trying.

It's tempting to view the main line in the manual as perfect play, but it's really just a well tested line with a good performance score. Any early deviation can lead to previously unknown positions, and some of them can actually be better than the main line (although most of the are rubbish).

Sometimes we see a TN mark after a move. A Theoretical Novelty is a move from a standard book position that is previously unknown to (or discarded by) established theory, a Columbus Move if you like. If the new move proves successful, it will replace the old move as the main line, if not, it will perish at sea.

Takeaway

Trying to achieve perfect play can be rewarding in many ways, but it will not help you to win your games.

Thursday, 20 February 2025

Can Chess be Solved?

Solving Chess
I use to follow the Quora chess space to catch up on what people ask about chess. Questions about solving chess are frequent, but not as frequent as "What's the best opening?". The most popular answer, and probably the most correct one (to both those questions) is "We don't know". It's a logical question though - chess is a complete information game, meaning that the pieces, the squares and the rules of chess are fully available to both players att all times. In theory, all complete information games can be solved (Tic-tac-toe is easy to solve).

A game of chess can be described as a path of linked positions, where each move leads to a new position. The game continues until a decisive position (check mate or draw) is reached. Now, if we can chart all possible paths (like in the tic-tac-toe example), we would have solved the game. The problem with this approach is that there are 10^120 (a one followed by 120 zeros) possible legal positions in chess (that's a guess known as the Shannon number). 

As a comparison, the known universe consists of 10^80 atoms (also a guess, the Eddington number). If we could build a computer that use every atom in the universe to store chess positions and their relations (ignoring limitations such as the speed of light), we would need to store 10^40 positions in each atom.

This doesn't stop people from trying. The Chinese Chess Cloud Database now (at the time of writing) has  48 782 458 363 positions. That's an 11-digit number, to be compared with Shannon's 121 digits.

This leads us the the conclusion that chess won't be solved by brute force anytime soon. 

Another try is the Perfect Play strategy. The idea behind this is that in every position, there is one (or a few) perfect move that leads to the best possible outcome for that player regardless of the response by the opponent. In the starting position, the Chess Cloud Database offers four candidates for perfect play: d4, e4, Nf3 and c4. That reduces the number of possible positions after White's first move from 20 to 4, and after Black's first from 400 to 16. That might sound promising, but even using a Perfect Play strategy, the number of possible positions will be be far beyond what's solvable.

There is another problem with Perfect Play - we cannot know what "perfect" is. Perfect Play is only useful in solved games, so it can't be used to solve chess. The four candidate opening moves have all scored well, but that doesn't prove that any of them is a perfect move. The worst opening move according to CCDB is g4. It has a poor performance score, and also breaks a number of established opening principles. Still, g4 might be the Perfect Move, even if it's highly unlikely. We just don't know.

The Perfect Play strategy is what modern chess engines like Stockfish use. By pruning away all branches that don't look perfect, Stockfish can calculate 30-40 moves in less than an hour on a standard PC. This almost always produce good moves, but very rarely a fantastic move (they are always in the pruned branches).

The most promising attempt to solve chess is the retrograde analysis. That means starting from an end position (check mate or draw), and working backwards. So far, this work has progressed to solving any seven-piece ending. However, Shannon will prevent a solution with this approach too. The most effcient way (to date) to store retrograde analysis is the Syzygy tablebase. Here's the current state of affairs:

Endgame databases

An eight-piece tablebase is in the works, but it would require 2 PB of disk space. That's a lot. To solve chess, a 32-piece tablebase would be required, and Shannon says no long before that. 

Takeaway

It looks like chess will remain unsolved, and continue to be a struggle between mere mortals with all our flaws and shortcomings. The outcome of the game will still be decided by mistakes. That's good!

Friday, 17 January 2025

Two Overly Aggressive Players

Two Overly Aggressive Players

  In real life, I'm a rather peaceful and gentle person, but I bring none of that to the chess board. When the clocks are started, I'm immediately transformed into a vicious predator. It's strange, but I've come to terms with my chess personality, and I don't try to avoid aggressive play.

That means that my games often see me attacking and my opponent defending. The most common scenarios are either me making a blunder due to over-confidence, or my opponent cracking under the pressure.

Sometimes, however, I face an opponent even more aggressive than myself, and that can lead to really weird games where most of the moves should objectively be classed as mistakes. Here's a recent example, enjoy! (I should add here that my opponent is a very gentle person away from the board.)

Me - N.N. (Open Tournament, 2024)

1. c4 e5 2. Nc3 Nc6 3. Nf3 Bc5 The first sign of aggressiveness. Instead of the standard move 3 ... Nf6, Black immediately takes aim at f2.

After 3... Bc5

The cautious player now continues with 4. e3, making the Bishop look rather misplaced.


 4. Na4 Chasing away the Bishop, but at a cost. The Knight has no future on a4, and must eventually return to c3.

 4. Be7 5. g3 An attempt to steer into my normal Reversed Dragon, but that requires d3 to be played first. Now Black take the initiative with 5 ... e4 forcing the Knight back to g1, but instead:

5 ... d6 6. Bg2 h5 Black is eager to get a Kingside attack, and once again misses e4.

7. h4 Be6 8. d3 Qd7 This looks dangerous, but it's not, unless White panics. White should now play Nc3, preparing a Queenside advance to discourage Black from castling long. 

9. Ng5 Bxg5 10. Bxg5 (hxg5 was better) 10... f6 11. Bd2 O-O-O

 After 11...O-O-O

Black wants to use all his pieces for his attack, but underestimates White's threats on the Queenside. 11 ... Nge7 preparing O-O would keep the game equal, but now White is clearly better.

12. b4 Nge7 Too slow. Nd4 followed by Bg4 was the only way to keep the attack going. 

13. b5 Nd4 14. e3 Ndf5

After 14...Ndf5

Now White's attack breaks through before Black can organise their Kingside attack. Unless...

15. Qf3? White couldn't resist setting up a battery on the long diagonal. Rb1 followed by c5 would secure the win. Now Black could save the day by 15 ... c5, a nice multi-purpose move that stops White's c5 advance, and also defends b7. Instead, Black tries to dismantle the battery:

15... d5?? 16. Nc5 Qd6 17. Nxe6 Qxe6 18. cxd5

After 18.cxd5

18... Nxd5?? Black is in in deep trouble, but Rxd5 would at least avoid losing a piece.

19. Bh3 Qd6 20. Bxf5+ Kb8 21. O-O? Wasting time. Qe4 would kept up the pace.

21... g5 This move is a ghost, because both players now foresee a terrible onslaught on the Black King, while in reality there isn't one. Unless White helps, which is what happened in the game. But first, some floundering where neither player finds the right moves.

22. Be4 Qe6 23. Bf5 Qd6 24. Rfc1 gxh4 25. gxh4 Rhg8+ 26. Kh1 Ne7 27. Bh3 Qxd3 28. Bb4 Nd5 

After 28...Nd5 
White is still winning, but now it starts to slip.

29. Bf1? Qg6 30. Bg2?? Giving away the win. Bc4 was the only move.

30... Qf7?? Giving back the win. 30 ... e4 could save the game for Black. Surprisingly often a blunder is answered with another blunder, as this game demonstrates.

31. Rab1?? Another blunder, Rd1 was the right move. However, White still retains some advantage.

31... Rg4 32. a3? Now Black can take over the game with f5, but chooses a more "active" move:

32... e4?? 33. Qh3? (Qf5 wins) Rdg8 34. Rg1 Nxb4 35. Rxb4 f5 

After 35...f5
White is a piece up, but how should White continue? The only move that promises winning chances is Qh2, but that wasn't on my radar at the time. Instead, I went completely lost.

 36. Rbb1?? Qf6?? 37. Bxe4?? Another triple blunder sequence! But now Black shook it off, and finished the game in orderly fashion.

37... fxe4 38. Rxg4 Rxg4 39. Rg1 Qxh4 40. Qxh4 Rxh4+ 41. Kg2 Rg4+ 42. Kh2 Rxg1 43. Kxg1 c5 44. bxc6 bxc6 45. f4 exf3 46. e4 c5 47. e5 c4 0-1

Takeaway

If you're an aggressive player, then go ahead and play aggressively. Just remember, you're increasing the randomness, and that means that both players will make more mistakes than in a normal game. So, against weaker players, it's safer to just wait out their mistakes before lashing out.

Monday, 28 October 2024

Another Double Delusion

The Double Delusion is probably the most intriguing example of chess psychology. How can both players see the same thing when it doesn't exist? Is there some kind of telepathic communication between the players, or is it a certain feature in the position that leads both players astray? 

Me - N.N. (Open Tournament, 2024)

Me - N.N. after 20...Qg5

Black has just played the surprising Qg5, and both players were now totally convinced that this was the start of a winning attack. How can White defend? Nxf4 fails to the discovered check Bxf3+ winning the Queen, Bx4 loses a piece after Rxg4, and Qd2 allows Rbf8.

1.h4!

How could that move be so incredibly hard to find? Because it was obscured by the delusion. Once found, the move not only defuses Black's attack, it also wins a piece:

1...Qe5 2.Nxf4 Qxd4+ 3.Kg2 Rf8 4.Bxg4 Rxf4 5.Be6+

Me - N.N. after 25.Be6+

Now White is winning. I managed to trade off the Queens and Rooks, and got an easily won ending. How did go then? Embarrassingly enough, I messed up and lost the game. But, even though I failed to beat my opponent, I managed to beat the delusion, and that counts for more, at least in my book!

So, the move Qg5 (in the first diagram) was a blunder caused by a double delusion. As a side note: even if White doesn't find the best move, 1.h4!, the dismissed 1.Qd2 Rbf8 2.Qe3 is perfectly playable, leading to a sharp position with equal chances.

Instead of Qg5, Black could have played Bxf3 with a slightly better position.

Takeaway

The next time you think your position is won (or lost), take a moment to consider whether your assessment is for real, or just a delusion. You might think that every piece on the board is fully visible, and that you can imagine every possible move, but that's not entirely true. Your mind is constantly hiding information from you, and takes a lot of effort to find the moves obscured by fear or greed.




Monday, 7 October 2024

Fear and Greed

 Fear and greed are probably the most common causes for making bad decisions in chess. Both emotions prevent us from thinking logically and systematically, and make us do stupid things. Below is an example on what greed can do to you (I'm at the move as White, and I'm the greedy one in this game).

Me - N.N. after 18...Bh5

I have been building up for a Kingside attack, and now it's time to leap into action. I started off with 1. Bh6, seeing that the Bishop cannot be captured due to 2. Rxf6, but now greed kicked in:

1...Qe6 2. Bxg7?? Kxg7 3. Qg5+ Bg6

This was the move I completely ignored, blinded by the beautiful wins after 3...Kh7. Now White's completely busted. This is the hardest type of loss - you are just waiting for them to resign, but instead they play a move that not only saves the day, but also wins the game! The worst part of it is that you have only yourself to blame.

Instead of the disastrous Bxg7, White could have retreated the Bishop to e3 with a winning game. But, retreats are seldom on your mind in the middle of an attack.

However, the greediness doesn't stop there. Being obsessed by the capture on h6, I completely overlooked a much better continuation from the diagram:

1. e5! dxe5 2. Bxe5 Nh7 3. Bxa8 Rxa8 (or 1...Ne8 2.Rae1 Ne6 3.Bxh6) and White is winning.

Takeaway

The next time you're overcome with fear or greed, try to take a moment to calm down. It's not easy to be objective is the heat of the battle, but if you succeed, it could save you the game.

Sunday, 22 September 2024

Don't Procrastinate!

Procrastination is when we postpone things that need to be done for no good reason. That's very different from delaying, which is to postpone something with a purpose. In chess, we often delay a move to increase to effect of it (a threat is always grater than it's execution and all that), but procrastination only leads to misery and missed opportunities. This game shows several examples on why procrastination is bad.

Me - N.N (Casual correspondence game, 2024)
English Opening

1. c4 b6 

An unusual response to the English. I played 2.g3 in a previous game (same opponent), but this time I wanted to try something else.

2. d4 Bb7 3. Nc3 e6 4. e4 Bb4 5. Bd3

Me - N.N. after 5.Bd3
5... Ne7?

Black is clearly thinking about f5, but there's no need for preparing. After the immediate 5... f5, White cannot capture on f5 because of 6... Bxg2 and Black is winning. Best is 5... f5 6. Nge2 fxe4 7. Bc2 Nf6, and Black has an easy game. Now, White can take the initiative.

6. Nge2 O-O 7.O-O Bxc3?!

This only helps White setting up a strong centre. The best move was 7. Nbc6 to develop the Q-side. It was still possible to play f5, but now White has d5 with a clear advantage.

8. bxc3

Me - N.N. after 8.bxc3

8... f5

Finally, but too late. A safer option was 8... d6.

9. exf5 Nxf5 10. Ng3 Nxg3?

It was understandably tempting to give me two doubled pawns, but now it becomes painfully apparent just how much Black lags in development. 10... Nc6 was necessary here.

11. hxg3

Me - N.N. after 11.hxg3

White now has two doubled pawns, but also two Bishops and a Queen gazing on the black King. Black has an almost undefended King, and three sleeping pieces on the other side of the board. The Night has been procrastinating for too long, and now Nc6 is too risky because of 12. Qh5 and White wins.

11... Qf6 12. Qh5 g6 13. Qg4 c5 14. Bh6 Rf7

Me - N.N. after 14...Rf7

Here White missed the last call for Nc6. Now the Knight only has Nb1 - a6 - c7, and that's too slow. The game ended with:

15. f4 Kh8 16. Rae1 Na6 17. d5 Nc7 18. dxe6 dxe6 19. Re5 Re8 20. Rfe1 Bc8 21. Qh3 Bd7 22. Bg5 Qg7 23. Bc2 Kg8 24. Rd1 Bc6 25. g4 Bd7 26. Rde1 a6 27. Qh4 a5 28. Bh6 Qf6 29. Qh3 Qh8 30. Rg5 Qf6 31. Ree5 Kh8 32. Rxg6 Qe7 33. Bg5 Qf8 34. Bf6+ Rxf6 35. Rxf6 Qg8 36. Rh6 Re7 37. Reh5 1-0

Me - N.N. after 37.Reh5

There were quicker ways to win, but I just couldn't resist setting up Alekhine's Gun!

Takeaway

If you have a move that must be played, do it now unless you have a good reason to delay it. "I can always do it later" is not a good reason, as this game shows.


Tuesday, 10 September 2024

SWOT Analysis in Chess

Last time, in the Kodak post, we saw that business and chess have things i common. There are competitors to defeat, but most importantly they both need plans. Business managers need business plans, and chess players need game plans. So, perhaps we can use some business planning tools is chess?

SWOT Analysis

One of the most popular business planning tools is the SWOT Analysis, where SWOT stands for Strengths, Weaknesses, Opportunities and Threats. The idea is to take an inventory of all your business strengths and so on, and write them down in the respective quadrants. From there, you answer questions like "What business opportunities build on your strengths?", "What threats are caused by our weaknesses?", "How can we improve our strengths to create more opportunities?", and "How can we reduce our weaknesses to reduce the threats?"

That sounds a lot like chess, doesn't it? We deal with strengths, weaknesses, opportunities and threats all the time. So what can SWOT analysis bring to chess?

When we spot an opportunity in chess (or business), we tend to focus on that, and forget to consider our weaknesses and threats. Similarly, when we face a threat, we tend to forget our strengths and opportunities, and concentrate on defending against that threat, thereby missing eventual counter-attacking possibilities.

That's when SWOT analysis comes in handy. Properly performed, it forces us to assess the position from several angles (four of them) instead of just one. This can help us see possibilities that we'd otherwise could had missed.

Takeaway

Next time you feel the need to make a plan, visualise the SWOT chart, take a proper inventory, place each asset in the right quadrant, and see how they connect