Do Tough Things

I read an interesting post on a computer chess forum last night. It began:

Dixondeuxyeux’s Post

I thought I would share a few observations that might be of interest to some of you. It was Mark Twain who wrote, “It ain’t what you don’t know that gets you into trouble. It’s what you know for sure that just ain’t so.” I like this adage because it is a humbling reminder that the game we enjoy so much is a brutally honest and cruel taskmaster. It is believed that after the first nine moves of any game, the possible continuations outnumber all the atoms in the known universe. Chess is a mix of mental logic, mathematical calculation, emotional risk, physical courage and a hint of spiritual enlightenment. When we play chess, we place our egos and our sense of self on the line every game. Have you ever lost a game and wanted to crush the world, lash out at your opponent, question your reason for living? I have. Have you ever seen a fight break out during or after a match? I have. If chess is just a game, why are we so prone to violence? Kasparov said that chess would have a lot more adherents if it were correctly seen as a blood sport.

The entire post, written by a Swede with username dixondeuxyeux, is worth reading here: I Play Computer Chess To Lose.

The Swede’s post got me thinking about chess, games, and life in general. I composed a response. Stayed up two hours later than I had planned to ensure I properly expressed the thoughts swirling in my head. I’ll share my response here, with minor edits for clarity.

My Response

Thank you dixondeuxyeux for sharing your thoughts. Great quote from Twain.

Your post got me thinking late on a Friday night.

Personally, I feel it’s beneficial for your mental health to do things you’re not expert at. (We GenXers+ should say so often to Gen Zers and other victims of social media overexposure.) I am expert in certain areas of my (software development) career, though I’d never describe myself in such terms outside of here to make a point. (Scandinavians will recognize my hesitancy is due to Jantelagen, taught to me by my father.) Should I focus only on those areas in which I’m proficient? No, that would stroke my ego, which is pointless.

I feel it’s beneficial for your mental health to do things you’re not expert at. We GenXers+ should say so often to Gen Zers and other victims of social media overexposure.

Struggle, be uncomfortable, make mistakes, practice, push yourself to improve. It helps you keep an even keel and take things in stride when real shit happens. You know… life.

Michael Jordan, Magnus Carlsen, and Usain Bolt

Did I not play basketball when I was young because I saw Michael Jordan play? Did I think, “What’s the point? Who’s ever going to play at a higher caliber than MJ?” No, I played because it’s a fun, competitive game and great exercise. Even at middling skill levels.

My wife, while we were dating, got me into running. We’ve been happily married nine years now (minus a few days here and there, ha ha).

Am I a fast runner? No. I’m at about the 40th percentile, so I make a lot of other people feel fast. You’re welcome. You just wait- I’ll get relatively faster as I get older but stay in shape. I’m 50 now.

I look fast based on my slim build. But I have pectus excavatum. Also, my wife points out, I don’t train enough. Pfft. What does she know? (She’s a Boston Marathon qualifier and full Ironman finisher… whatever.) 🙂 My pectus excavatum is not severe (1), but bad enough I was self-conscious as a teenager when playing shirts-and-skins basketball games. I’m a pretty good athlete but, well, you feel eyes on you. (Not only women have body image issues.) Did I stop playing basketball… or baseball? No, that would have been stupid. Besides, my sophomore year high school team really needed me as a starting pitcher. I was 4-1, I think, until the varsity coach poached me and then promptly sat me on his varsity bench. What a meathead he was.

Do tough things.

When my wife encouraged me to run with her- not just run for fitness, run in races… 5Ks, 10Ks, 10 milers, eventually a half-marathon, then another half and another half, then… it was inevitable we’d get to the big one. She asked me to run a full marathon with her.

I said no, I don’t think I can do it due to my condition. She told me it’s all in my head and I should get over my hangup. She was right. We’ve run (and completed) a marathon every year since 2016.

So yeah… chess. I need to stop tinkering with my chess engine and play more. Play the game (and follow a study plan), not program the game.

Play the game (and follow a study plan), not program the game.

To that end, I just won a 3m+2s game tonight that lasted 73 moves (rare for two patzers in blitz), surviving serious time pressure. So that’s a start. I would have delivered mate but my opponent realized, in a KP vrs K endgame, that my pawn was going to promote, so he (she?) let his clock run out- only 12 seconds so I didn’t see it as bad sportsmanship. Other than hanging my queen in the late middlegame (32. Qf5+?? I thought I was forcing a trade of queens but overlooked his knight… he missed it too), I’m proud of my effort.

Anyhow, I don’t know what my point is… Perhaps it’s this: Don’t get down because you’re not perfect and can’t play chess precisely like Grandmaster Magnus Carlsen or the Ethereal, Komodo Dragon, or Stockfish chess engines. I seriously doubt Usain Bolt loses any sleep worrying about the F1 race car that’s faster than he is. Or the shitty used car driven by a high school kid in his neighborhood, ha ha.

I seriously doubt Usain Bolt loses any sleep worrying about the F1 race car that’s faster than he is.

Grind of a Blitz Game

Here’s the blitz game I referred to above. As I said earlier, it’s pretty rare for two patzers in blitz to play more than 70 moves and reach a KP vrs K endgame. Especially considering I had only seven seconds on my clock from move 30 onward and basically was living off the increment. After I won, I gave Komodo Dragon four threads and one minute to analyze the game and insert suggested improvements.

(1) I’ve never been medically tested so I don’t know how severe my case is, nor how to officially measure the deformity. My sternum appears to be sunken two inches.

Missed Blocking Tactic

Lately, I’ve been playing blitz games against MadChess 3.3 (not yet released) to get a feel for how strongly it plays when weakened to my patzer Elo level. Sparring against MadChess helps me calibrate its limit-strength parameters and perhaps glean ideas for classifying more unreasonable inferior moves.

My most recent game begins 1.e4 c5 2.Nf3 d6 3.d4 Nf6 4.Nc3 Nc6 5.Bb5 a5 6.Be3 d5 7.e5 Ng4 8.Qd2 Nxe3 9.Qxe3 cxd4 10.Nxd4 Qd7 11.O-O f5 12.e6 Qd6 13.Nxf5 Qxe6 14.Qxe6 Bxe6 15.Nd4 Bd7 16.Rad1 g6 17.a4 Nb4 18.Rfe1 h5 19.Rd2 b6.

So far I’ve played well enough for a player of my strength in the limited time available in 3m+2s blitz. I’ve developed my pieces, protected my king, and weakened Black’s pawn structure near its king. Material is even. I’ve missed opportunities to advance or attack with my central pawns, but haven’t outright blundered. I spot Black’s weak c7 square and realize my knight on d4 can reach it via e6 because Black’s light squared bishop is pinned to its king by my bishop on b5 and cannot capture on e6. If I can get my knight to c7 it will fork Black’s king and rook on a8.

r3kb1r/3bp3/1p4p1/pB1p3p/Pn1N4/2N5/1PPR1PPP/4R1K1 w kq - 0 20

I play 20.Ne6 and MadChess replies 20…Bxb5. Black trading bishops improves my position as it enables me to place a knight on the b5 outpost, controlling Black territory without fear of harassment from any Black pawns. Black should have developed the dark squared bishop via 20…Bh6 to harass my rook on d2.

r3kb1r/4p3/1p2N1p1/pb1p3p/Pn6/2N5/1PPR1PPP/4R1K1 w kq - 0 21

I should have played 21.Nxb5 to capture Black’s light squared bishop and place a knight on an outpost. But I was fixated on the fork on c7. Play continues 21.Nc7+ Kf7 22.Nxa8 Bh6.

N6r/4pk2/1p4pb/pb1p3p/Pn6/2N5/1PPR1PPP/4R1K1 w - - 1 23

Damn. By moving its dark squared bishop to a square where it attacks my rook on d2, MadChess also reveals an attack on my adventurous knight on a8. Now I’m under double attack. What to do? I can’t capture either of Black’s attacking pieces, so I should retreat the more valuable of my attacked pieces.

23.Rde2?? Doubling rooks on the e file, but blundering. I move my rook out of the crosshairs of Black’s dark squared bishop but into the crosshairs of the light squared bishop. Doh! I need to improve my “whole board” vision. I was focused on the lower half and upper right portion of the board and failed to see a ranged attack originating from the upper left portion of the board.

N6r/4pk2/1p4pb/pb1p3p/Pn6/2N5/1PP1RPPP/4R1K1 b - - 2 23

While reviewing the game after its conclusion, but before peeking at any engine suggestions, I thought I should have simply retreated my threatened rook via 23.Rdd1 Nxc2 24.axb5 Nxe1 25.Nxb6, which creates a passed pawn for White. However, I have a defensive resource in this position. Can you find it?

I missed this blocking tactic, thinking it was nothing more than a delaying move that loses a pawn. However, we see (in the puzzle above and annotated game below) that Black cannot capture the pawn on f4.

My blunder cost me an exchange and a knight, a net loss of five pawns using traditional material values. I played on, as patzer chess players should, attempting to force MadChess to blunder a piece back to me.

23…Bxe2 24.Rxe2 Rxa8 25.f3 Kf8 26.h3 Bf4 27.Kf2 Ke8 28.g3 Bc1 29.b3 Rd8 30.Re6 Rc8 31.Ne2 Rxc2 32.Rxb6 g5 0-1

But I ran out of time. Overall, a competitive game where MadChess played convincingly like a 635 Elo blitz player. (I’m attempting to calibrate “the feel of” MadChess’ UCI_Elo parameter to chess.com’s blitz Elo ratings. Other chess sites may differ by 200 Elo points or so. See Chess.com Versus Lichess Ratings.) The world-class Komodo Dragon chess engine believes MadChess played slightly worse than I. But as Grandmaster Savielly Tartakower said many years ago, “The winner of the game is the player who makes the next-to-last mistake.”

“The winner of the game is the player who makes the next-to-last mistake.” -Savielly Tartakower

I capitalized on MadChess’ 11… f5?? blunder with the correct 12.e6! and held the advantage (unevenly due to numerous inaccuracies) until I overlooked my 23.f4! defensive resource and this “last mistake” proved decisive.

I have annotated the game with a few variations and comments, which you may review below. In addition, I gave Komodo Dragon, a world-class chess engine, one minute and 60 CPU threads (I have a powerful home PC) to analyze the game and insert its evaluations and suggested variations.

MadChess 3.2.2 Released

I have released version 3.2.2 of my chess engine.

This release fixes a bug that caused truncated principal variations when MultiPV > 1. Also, it improves the efficiency of MultiPV search, so it gets deeper faster.

This release does not add any features nor playing strength. Testers may substitute this version for version 3.2 without any need to restart or re-run tournaments.

You may download x64 and x86 versions of MadChess 3.2.2 from the Downloads page. Install the appropriate version for your computer’s CPU. The x64 binary is the strongest version of the engine.

MadChess 3.2.1 Released

I have released version 3.2.1 of my chess engine.

This release fixes a bug that caused MadChess to report illegal principal variations. That is, PVs that contain illegal moves. To be clear, the bug never caused MadChess 3.2 to crash. Merely to report fantasy lines.

I didn’t notice the issue back in January because of my desire to transition from programming chess to playing chess- which involves fighting the urge to tinker with one more engine issue. I did wonder why MadChess occasionally reported truncated PVs in the CuteChess GUI. One factor contributing to my (chosen) ignorance is the CuteChess GUI (which I use to run tournaments so I can watch games in progress) silently truncates PVs that contain illegal moves. Whereas the CuteChess CLI (which I don’t use because I cannot watch games in progress) displays a warning. Despite my instinct that a bug infested the PV code, I decided not to go down that rabbit hole until this weekend.

This release does not add any features nor playing strength. Testers may substitute this version for version 3.2 without any need to restart or re-run tournaments.

Thanks to Steve who commented on the MadChess 3.2 Released post that CuteChess CLI complains of illegal PVs.

You may download x64 and x86 versions of MadChess 3.2.1 from the Downloads page. Install the appropriate version for your computer’s CPU. The x64 binary is the strongest version of the engine.

MadChess 3.2 Released

I have released version 3.2 of my chess engine.

The main feature in this release is a sophisticated limit-strength mode, including adjustments to chess knowledge, search speed, chance of erring or blundering, and severity of blunders. MadChess, in limit-strength mode, excludes moves it considers unreasonable (dumb moves even a chess novice wouldn’t play). I have extensively documented the settings and technical implementation of MadChess’ limit-strength mode in The MadChess UCI_LimitStrength Algorithm. I also provide a Limit-Strength FAQ.

MadChess 3.2 is slightly stronger than the prior release. I estimate it has gained 60 rating points, climbing to roughly 2770 Elo at bullet chess.

This likely is the last release of MadChess- at least for a long while. I plan to focus more on playing chess instead of coding chess. And I plan to move on to other (non-chess) programming projects. You may follow along on my general programming blog, ErikTheCoder. Nothing new there yet. But I intend to resume blogging there soon. I’ll keep blogging here also, focused as I said on playing the game, not coding it.

You may download x64 and x86 versions of MadChess 3.2 from the Downloads page. Install the appropriate version for your computer’s CPU. The x64 binary is the strongest version of the engine.

Enjoy!

Follow the discussion of MadChess 3.2 in the TalkChess forum.