MadChess 3.1 Released

I have released version 3.1 of my chess engine. I worked on the engine over the last year occasionally, when I had time in the evenings. Slowly, I’ve added about 100 Elo points of playing strength compared to the prior release.

This release includes strength improvements achieved by Singular Move, Threat Evaluation, Pawn Structure Evaluation, Move Legality Performance Improvement, Logarithmic LMR Based on QuietMoveNumber and ToHorizon, and evaluation of piece mobility, king safety (including x-ray moves), and threats using Safe Squares.

It also includes code quality improvements such as Color Agnostic Code, Removed Endgame King Safety Evaluation, Code Style Refactor (camelCased Method Parameters), Refactor Static Const to Enum, Reorganize Namespaces, and Remove Over-Counting NPS.

In addition, I fixed an Engine Hang Bug and an Invalid PV Bug.

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

I estimate MadChess 3.1 plays bullet chess at 2706 Elo and blitz chess at 2742 Elo.

Of course, you may decrease MadChess’ strength for a more enjoyable game via the UCI_LimitStrength and UCI_Elo engine options. Enjoy!

Now I’ll take a break from engine programming and actually play some chess. I’ll focus on improving my game (beyond patzer level) before the urge to improve MadChess’ game (to 2800 Elo) inevitably strikes.

 

Feature Category Date Commit1 WAC2 Elo Rating3 Improvement
Miscellaneous Improvements Evaluation 2022 Aug 30 6484a1b 287 2706 +19
Move Legality
Performance Improvement
Search 2022 Mar 18 533e382 289 2687 +36
Pawn Structure Evaluation 2022 Jan 11 d691b32 288 2651 +15
Threats Evaluation 2021 Oct 24 26e5323 289 2636 +7
Color-Agnostic Code Evaluation 2021 Sep 13 2b475bc 286 2629 +12
Singular Move Search 2021 Jun 14 0c601ea 290 2617 +13
Endgame Eval Scaling Evaluation 2021 Apr 08 4d22dec 286 2604 +12
Bishop Pair Evaluation 2021 Mar 14 2960ec9 285 2592 +22
Position Cache Optimization Search 2021 Feb 23 42d7702 286 2570 +8
Move Generation Optimization Search 2021 Feb 17 22002dc 287 2562 +12
PVS and Null Move Search 2021 Feb 09 f231dac 285 2550 +20
Remove Aspiration Windows Search 2020 Dec 20 4b7963b 290 2530 +9
Time Management Search 2020 Dec 19 d143bb5 286 2521 +8
Crash Bug Search 2020 Aug 29 2d855ec 288 2513 +0
King Safety Evaluation 2020 Aug 16 6794c89 288 2513 +63
Eval Param Tuning Evaluation 2020 Jul 23 bef88d5 283 2450 +30
Late Move Pruning Search 2020 Feb 08 6f3d17a 288 2420 +29
Piece Mobility Evaluation 2020 Feb 01 5c5d4fc 282 2391 +62
Passed Pawns Evaluation 2018 Dec 27 103 279 2329 +119
Staged Move Generation Search 2018 Dec 15 93 275 2210 +39
History Heuristics Search 2018 Dec 03 84 275 2171 +28
Eval Param Tuning Evaluation 2018 Nov 24 75 272 2143 +47
Sophisticated Search
Material and Piece Location
Baseline 2018 Nov 08 58 269 2096 0
  1. GitHub commit (hash) or Subversion source code revision (integer)
  2. Win At Chess position test, 3 seconds per position
  3. Bullet chess, 2 min / game + 1 sec / move

Banks 95th Amateur Series Division 7

MadChess 3.0 participated in Graham Banks’ 95th amateur tournament in division 7.

                               1    2    3    4    5    6    7    8    9    0    1    2    
1   Ceibo 0.9 64-bit           **** ½½10 ½111 1½½1 1½1½ ½11½ 1½11 1111 01½1 1½½½ ½011 1½11  33.0/44
2   Nawito 22.07 64-bit        ½½01 **** 1111 1½1½ 1½0½ 001½ 01½½ 1½1½ ½1½½ 10½1 001½ 1111  28.0/44
3   Lozza 2.4 64-bit           ½000 0000 **** ½1½1 1½½1 ½011 110½ 10½1 01½½ 1½01 0111 1101  24.5/44  491.75
4   Delocto 200419 64-bit      0½½0 0½0½ ½0½0 **** 0½01 ½½1½ 1½0½ 01½½ ½1½1 1111 111½ 1101  24.5/44  484.75
5   Blunder 8.5.5 64-bit       0½0½ 0½1½ 0½½0 1½10 **** ½0½½ ½½11 ½10½ ½½10 110½ 1111 ½½½1  24.0/44
6   Supernova 2.4 64-bit       ½00½ 110½ ½100 ½½0½ ½1½½ **** ½101 0001 11½0 0½10 ½111 ½½1½  22.5/44
7   Leorik 2.2 64-bit          0½00 10½½ 001½ 0½1½ ½½00 ½010 **** 1½½1 0½11 11½0 0011 ½½11  21.5/44
8   MadChess 3.0 64-bit        0000 0½0½ 01½0 10½½ ½01½ 1110 0½½0 **** 1000 1½11 0110 1½½1  20.0/44
9   RookieMonster t110 64-bit  10½0 ½0½½ 10½½ ½0½0 ½½01 00½1 1½00 0111 **** 0½0½ 1011 ½100  19.5/44
10  Betsabe II 2020            0½½½ 01½0 0½10 0000 001½ 1½01 00½1 0½00 1½1½ **** 0011 0011  17.5/44
11  Keele 1.0 64-bit           ½100 110½ 1000 000½ 0000 ½000 1100 1001 0100 1100 **** 1111  17.0/44
12  Loki 3.5.0 64-bit          0½00 0000 0010 0010 ½½½0 ½½0½ ½½00 0½½0 ½011 1100 0000 ****  12.0/44

Games

Judit Polgár Crushes Magnus Carlsen

I was up late last night playing chess online. Man, chess is a difficult game. It requires a humble attitude in order to accept losses and invest in the play and study time necessary to gradually improve. Which I’ve not done because I keep tinkering with my chess engine (a programming pursuit) instead of working on my game. Anyhow, after getting my ass handed to me online, I thought I’d spend time today to write a blog post about recent news that shocked the chess world.

Last month, Magnus Carlsen was in Madrid, Spain where the Candidates Tournament was held. As the current chess World Champion, he wasn’t playing in the tournament, he was just- I don’t know- hanging out. The winner of the Candidates will challenge Carlsen next year for the title of World Champion. Well, chess fans hoped so. As we learned shortly after the Candidates, Carlsen decided, for reasons I don’t fully understand, not to defend his title. But that’s not the news I’d like to write about.

This post is about girl power.

Let me explain. I read an interview of Swedish WFM Anna Cramling in which she stated, in response to a question about supporting women in chess:

I think that for getting more girls to start playing chess, role models are very important in general. We’ve now seen female streamers and I think that’s a great thing, but it’s also very important to have women who play chess in tournaments. People like GM Judit Polgár, for instance; people like that who are ambassadors for chess are very important. Judit Polgár has done a lot for chess after she retired from the competitive side of the game as well.

I think that when girls see other girls playing chess, or women playing chess, this stereotype that “girls don’t play chess” kind of disappears. Girls will think, “Oh, that looks cool. I want to do this too. How do you do this? Show me!”

Right on! There is no better role model for women in chess than Judit Polgár.

Magnus Carlsen is, arguably, the strongest chess player the world has ever seen. A case can be made that perhaps Garry Kasparov or Bobby Fischer, in their prime, were stronger players than Carlsen.

There is no debate, however, about who is the strongest female chess player. It’s Judit Polgár, no contest. No other woman has come close to her accomplishments. She is retired now. However, in the early 2000s, she was among the strongest players in the world competing in the highest-level tournaments. She reached a peak rank of 8th best in the world.

Let me put in perspective for you the stratospheric level of chess Polgár and Carlsen play. I’m struggling to win games way down in the patzer territory of an 800 Elo rating. Judit Polgár and Magnus Carlsen have peak ratings of 2735 and 2882 respectively. Roughly speaking, a 100 point gap in Elo rating indicates the weaker player has a 36% chance of winning a game. 200 point gap = 24%, 400 point gap = 9%, 800 point gap = 1%, gap between Carlsen and me = I have no chance to win.

In the 2000s, Judit Polgár was competing against men in a game of intelligence. Defeating them. Dealing with their chauvinistic attitudes. One example:

At Linares 1994, Polgár lost a controversial game to the World Champion Garry Kasparov. The tournament marked the first time the 17-year-old Polgár was invited to compete with the world’s strongest players. After four games she had two points. During her game with Kasparov in the fifth round, Kasparov gradually outplayed her and had a clear advantage after 35 moves. On his 36th move, the World Champion reportedly changed his mind about the move of a knight, and moved the piece to a different square. According to chess rules, once a player has released a piece, the move must stand, so if Kasparov did remove his hand, he should have been required to play his original move. Polgár did not challenge Kasparov in the moment, because, she stated, “I was playing the World Champion and didn’t want to cause unpleasantness during my first invitation to such an important event. I was also afraid that if my complaint was overruled I would be penalized on the clock when we were in time pressure.” She did, however, look questioningly at the arbiter, Carlos Falcon, who witnessed the incident and took no action.

The incident was caught on tape by a crew from the Spanish television company PVS, and the videotape showed that Kasparov’s fingers had left the knight. Tournament director Carlos Falcon did not forfeit Kasparov when this evidence was made available to him. As U.S. chess journalist Shelby Lyman pointed out, in the majority of sports “instant replays” do not overrule a referee’s original decision and chess is no exception. At the time the video had not been publicly released, at the request of tournament sponsor Luis Rentero, but it is now available on https://www.youtube.com/watch?v=aw4g3iDrsNk. At one point Polgár reportedly confronted Kasparov in the hotel bar, asking him, “How could you do this to me?” Following this incident, Kasparov bluntly told an interviewer “… she just publicly said I was cheating. … I think a girl of her age should be taught some good manners before making such statements.”

Yeah, not cool. Now you understand my use of the word girl.

Just to be clear. The above incident involved a former World Champion, Garry Kasparov, not Magnus Carlsen. I’m relating it to illustrate the shit she’s had to deal with when men don’t want to face the fact she is capable of defeating them.

That’s the backstory. Now, what happened in Madrid last month?

Magnus is hanging out in a park near the Candidates tournament. He’s playing games against chess hustlers, local Spanish players, and chess fans who realized the World Champion was nearby and willing to give anyone a game. He’s cool like that. Who walks up to the table and asks Magnus for a game? You guessed it, Judit Polgár.

What will happen when the strongest-ever female chess player challenges the strongest-ever male chess player to a game of blitz chess? Each player has three minutes to make all their moves. How long will the girl last? Before you watch their game, consider the challenges Judit faced.

  • Judit is 46 years old.
  • Magnus is 31 years old.
  • At the uppermost levels, chess is a young person’s game.
  • Judit has been retired from competitive play for eight years.
  • Magnus is an active player.
  • Magnus is the highest rated player in the world.
  • Magnus is the current World Champion.
  • As recently as two years ago, Magnus had an unbeaten streak of 125 games at classical time control, over a period of two years and three months.

What will happen? See for yourself.

Booyah! She’s incredible. I like when Magnus realizes he’s in serious trouble, is determined to find a way to defend, and says to the onlookers, “No applause yet. I’m going to find it.” Or maybe he says, “I’m going to fight.” When he realizes it’s hopeless, he offers his hand in resignation to Judit.

Now you know something about Judit Polgár. Share it with others, because her story is inspiring. You can gain the listener’s attention by beginning with a quote from a Grandmaster, who recalled Judit Polgár beating him when he was an established player and she was just a child. Who is Judit Polgár? He described her as:

This cute little auburn-haired monster who crushed you.

I had my chess engine, MadChess (approximately 2700 Elo), and a world-class chess engine, Komodo Dragon (3450 Elo), analyze Judit Polgár and Magnus Carlsen’s blitz game.

Gandalf And The Spinning Blade

MadChess 3.0 participated in a tournament Graham Banks arranged, named Gandalf And The Spinning Blade.

                           1    2    3    4    5    6    7    8    9    0    1    2    
1   Blunder 8.0.0 64-bit   **** 0½10 ½111 ½½11 0001 1½½½ ½½1½ 10½½ ½½½½ 111½ 1011 ½11½  27.5/44
2   CM9000 Enforcer        1½01 **** 000½ 1½½1 1010 1100 0½10 ½011 ½1½1 0½11 10½1 1½1½  25.0/44  534.00
3   Gandalf 7 64-bit       ½000 111½ **** ½0½0 ½½½1 ½00½ ½101 1111 1½0½ 11½1 1½10 0½1½  25.0/44  531.00
4   Drosophila 1.6 64-bit  ½½00 0½½0 ½1½1 **** ½10½ 0101 1011 000½ ½111 ½½10 1111 01½0  23.5/44
5   Zevra 2.5 64-bit       1110 0101 ½½½0 ½01½ **** ½100 0011 ½½10 ½½1½ ½½10 ½1½½ 1½0½  23.0/44
6   MadChess 3.0 64-bit    0½½½ 0011 ½11½ 1010 ½011 **** 1000 110½ 00½0 1½1½ 00½½ 111½  22.5/44
7   Rotor 0.8              ½½0½ 1½01 ½010 0100 1100 0111 **** 0110 0½1½ 0010 1½½0 1½½½  21.0/44  460.00
8   Nebula 2.0 64-bit      01½½ ½100 0000 111½ ½½01 001½ 1001 **** ½011 ½½1½ ½½½½ 010½  21.0/44  459.25
9   Lozza 2.3 64-bit       ½½½½ ½0½0 0½1½ ½000 ½½0½ 11½1 1½0½ ½100 **** 01½1 0½01 ½½½1  20.5/44
10  Philou 3.7.1 64-bit    000½ 1½00 00½0 ½½01 ½½01 0½0½ 1101 ½½0½ 10½0 **** ½110 1½11  19.5/44
11  Raven 1.20 64-bit      0100 01½0 0½01 0000 ½0½½ 11½½ 0½½1 ½½½½ 1½10 ½001 **** 0½11  19.0/44
12  Leorik 2.1 64-bit      ½00½ 0½0½ 1½0½ 10½1 0½1½ 000½ 0½½½ 101½ ½½½0 0½00 1½00 ****  16.5/44

Games

Banks 94th Amateur Series Division 7

MadChess 3.0 participated in Graham Banks’ 94th amateur tournament in division 7.

                              1    2    3    4    5    6    7    8    9    0    1    2    
1   Zevra 2.5 64-bit          **** ½1½0 ½½11 110½ ½½11 10½1 ½½10 1½11 1011 1½½½ 1½1½ 1111  31.0/44
2   MadChess 3.0 64-bit       ½0½1 **** ½½½½ ½110 ½0½½ 0½1½ ½111 11½½ ½11½ 0½11 11½0 1½1½  27.5/44
3   Blunder 7.6.0 64-bit      ½½00 ½½½½ **** ½½½0 11½½ 1½0½ ½½½1 00½½ 1½½½ 1½0½ ½111 011½  23.5/44
4   Leorik 2.1 64-bit         001½ ½001 ½½½1 **** ½0½0 1110 ½1½0 1001 0011 ½½1½ 0111 ½0½1  23.0/44
5   Betsabe II 2020           ½½00 ½1½½ 00½½ ½1½1 **** 11½½ 0001 00½0 11½1 ½001 1½½1 01½½  22.0/44
6   Raven 1.20 64-bit         01½0 1½0½ 0½1½ 0001 00½½ **** 1½1½ ½½1½ 1100 ½1½0 110½ 0100  20.5/44  450.75
7   Myrddin 0.89 64-bit       ½½01 ½000 ½½½0 ½0½1 1110 0½0½ **** 01½½ 1½½½ 10½½ ½½10 ½½½½  20.5/44  445.75
8   Tantabus 2.0.0 64-bit     0½00 00½½ 11½½ 0110 11½1 ½½0½ 10½½ **** ½½½0 00½1 10½0 1½10  20.5/44  437.50
9   paulchen332 0.1.1 64-bit  0100 ½00½ 0½½½ 1100 00½0 0011 0½½½ ½½½1 **** 1111 0½½½ 0111  20.5/44  430.25
10  Admete 1.5.0 64-bit       0½½½ 1½00 0½1½ ½½0½ ½110 ½0½1 01½½ 11½0 0000 **** 0½½½ 1½½1  20.0/44
11  Odonata 0.5.1 64-bit      0½0½ 00½1 ½000 1000 0½½0 001½ ½½01 01½1 1½½½ 1½½½ **** 0111  19.0/44
12  CT800 1.43 64-bit         0000 0½0½ 100½ ½1½0 10½½ 1011 ½½½½ 0½01 1000 0½½0 1000 ****  16.0/44

Games