Banks 40th Amateur Series Division 7

MadChess made its debut in Graham Banks’ 40th Amateur Tournament in Division 7. The format was a fourteen engine quadruple round-robin. Time control was 40 moves in 25 minutes, repeating. The tournament ran from Thursday, April 25th to Tuesday, May 14th.

I am very pleased with MadChess’ performance.

  • Finished in eighth place.
  • Scored better than 50%.
  • Won a game against 11 of 13 opponents.
  • Had an equal or winning record against 7 of 13 opponents.
                                             1    2    3    4    5    6    7    8    9    0    1    2    3    4    
1   Capivara LK 0.09a01a 64-bit  2298    -4  **** ½1½½ ½1½½ ½1½1 10½½ ½1½0 ½½½0 ½0½1 1½1½ 11½½ 1½1½ 1111 1111 1111  36.5/52
2   Tigran 2.3 64-bit            2289   -18  ½0½½ **** 0001 ½011 0110 ½101 0001 ½110 0111 1111 1111 1111 0111 1111  35.0/52
3   ProChess 1.02AD              2244    +7  ½0½½ 1110 **** 0½00 ½½11 1000 0011 ½½1½ 11½1 111½ 1001 11½1 1111 11½1  33.5/52  768.75
4   FireFly 2.6.0 64-bit         2258    -7  ½0½0 ½100 1½11 **** 0100 ½1½½ ½011 0½½0 1½11 1111 1010 1110 1111 1111  33.5/52  763.00
5   Rhetoric Lite                2236    -5  01½½ 1001 ½½00 1011 **** ½½1½ 1100 1½01 0011 1111 ½½10 1½1½ 0111 ½½11  32.0/52  767.00
6   ChessKiss 1.7 64-bit         2214   +18  ½0½1 ½010 0111 ½0½½ ½½0½ **** 10½½ 1½1½ 011½ 0011 ½110 1111 111½ 1110  32.0/52  750.00
7   Gibbon 2.57a 64-bit          2251   -28  ½½½1 1110 1100 ½100 0011 01½½ **** 1011 0½½0 0101 1111 1½10 ½101 11½1  31.5/52
8   MadChess 1.2                 2200    -7  ½1½0 ½001 ½½0½ 1½½1 0½10 0½0½ 0100 **** 0½01 ½1½½ ½1½1 1½11 0111 1111  29.0/52  651.75
9   Shallow 1.0 64-bit           2200    -7  0½0½ 1000 00½0 0½00 1100 100½ 1½½1 1½10 **** ½011 0½11 1111 1111 1111  29.0/52  611.25
10  Cupcake 1.1a                 2091    -5  00½½ 0000 000½ 0000 0000 1100 1010 ½0½½ ½100 **** 1½00 11½1 11½½ 1111  20.5/52
11  BigLion 2.23x                2084    -4  0½0½ 0000 0110 0101 ½½01 ½001 0000 ½0½0 1½00 0½11 **** 001½ ½1½½ ½011  20.0/52
12  Dabbaba 7.49                 1974    -4  0000 0000 00½0 0001 0½0½ 0000 0½01 0½00 0000 00½0 110½ **** 011½ ½110  12.5/52
13  Soldat III 0.172             1938    -4  0000 1000 0000 0000 1000 000½ ½010 1000 0000 00½½ ½0½½ 100½ **** ½001  10.5/52
14  Jabba 13032012               1897    -5  0000 0000 00½0 0000 ½½00 0001 00½0 0000 0000 0000 ½100 ½001 ½110 ****   8.5/52

Games

Shifting Focus

Those of you who’ve written a chess engine understand how difficult it is to refrain from tinkering with the code. One always has ideas for more efficient algorithms or more concise code. These ideas need expression, need testing and verification. But at some point, due to the cruel law of diminishing returns, one has to walk away and work on other problems.

I feel I’ve reached that point. I’d like to shift my focus from improving the playing strength of MadChess to writing a Graphical User Interface (GUI). To that end, I spent time today reading about the latest Microsoft technologies for building Windows applications. I’m not entirely sure, but I believe I’ll use Windows Presentation Foundation (WPF). I like the combination of XML markup (for positioning / styling user interface controls) and C# code (for handling user input and implementing the application logic).

Plus, WPF provides a ribbon control. This evening I managed to construct a basic WPF application with a ribbon.

Now I need to make a list of chess GUI features I’d like to implement. And prioritize the list. Then start replacing the bogus buttons in the basic WPF application with chess buttons and chess features…

Update a few weeks later: In case you’re wondering, I never pursued this. Went back to programming my chess engine instead of a GUI.

Testing MadChess 1.3

I am testing MadChess 1.3 at rapid time controls (15 min / game + 10 sec / move). You can follow the games on the Live Games page.

I’m running four instances of the Shredder GUI. I wrote a script to transfer tournament standings and games to this website, using the Windows FTP command line utility. I registered a task in the Windows Task Scheduler to run the script every five minutes.

Earlier I tested MadChess 1.3 at faster time controls and got these results:

  • Bullet ( 2 min / game +  1 sec / move): 2153 +/- 22 Elo
  • Blitz  ( 5 min / game +  3 sec / move): 2234 +/- 22 Elo
  • Rapid  (15 min / game + 10 sec / move): 2313 +/- 26 Elo

Update May 25: I stopped the match at 500 games. These tests indicate MadChess’ strength increases (relative to the same opponents) as the time control increases.

MadChess 1.2 Released

I’ve managed to add another 100+ Elo to MadChess. I estimate MadChess’ playing strength is ~ 2090 Elo at bullet time control. At blitz, I estimate its strength is ~ 2140 Elo. The strength improvement is mostly due to more efficient move generation and an improved principal variation search algorithm. Those and other more cosmetic changes are detailed below.

Source code and EXEs available on the Downloads page.

  1. Implemented a check evasion move selector.
  2. Improved principal variation search algorithm.
  3. Improved efficiency of aspiration windows. Window is increased in configurable steps instead of doubling.
  4. Decreased positional bonuses.
  5. Added bonuses for backward pawns, connected rooks (on file) and good attacks (attacks of greater value pieces).
  6. Updated pawn endgame location values to encourage pawn pushes.
  7. Improved time management of classical time controls (x moves in y seconds).
  8. Improved memory usage of position cache.
  9. Decreased allocations of move collection classes during search.
  10. Removed duplicate search code at root node. Consolidated into a single search method.
  11. Removed duplicate pawn promotion and en passant code. Consolidated into pawn class.
  12. Added debug code to detect move generation errors.

MadChess 1.1 Released

I’ve made many changes to MadChess, detailed below. I tested at my usual bullet time control (2 min + 1 sec / move) and found only a 30 Elo gain, a bit disappointing for so many changes. However, informal testing at 40 moves in 4 min shows a much larger gain- potentially 60 Elo. This makes sense because my engine is a relatively slow searcher. Perhaps the CCRL testers can verify?

I removed 174 lines of code and gained 30 Elo. At this rate, if I remove all the code my engine will play with super Grandmaster strength, ha ha!

Source code and EXEs available on the Downloads page.

  1. Added tapered evaluation.
    1. Calculate static score for middlegame and endgame.
    2. Determine game phase from material on board.
    3. Calculate weighted average of middlegame and endgame static scores.
    4. This eliminates the discontinuity of a sudden jump from middlegame to endgame static scores.
    5. Static score slowly tapers from middlegame to endgame.
  2. Moved piece location values (aka piece square tables) to text files and made configurable via a UCI option.
  3. Separated passed pawn static score into middlegame score and endgame score.
  4. Added knight mobility static score.
  5. Separated piece mobility static scores into middlegame mobility and endgame mobility.
  6. Improved evaluation of king safety, especially evaluation of coordination of attacking pieces.
  7. Eliminated Reduce Pawn Push, Reduce Capture, Reduce Killer Move, Reduce In Check, and Reduce Check UCI options.  (All reductions disallowed.)
  8. Eliminated all reductions and lazy evaluation in principal variation.
  9. Simplified late move reductions.
  10. Added Reduce Root UCI option (default = false).
  11. Improved performance of Score Inaccuracy code. Renamed UCI option from Score Inaccuracy to Score Error.
  12. Added a UCI option, Max Nodes Per Second, to throttle search speed. Eliminated Evaluation Delay UCI option.
  13. Consult best move cache in main search and quiet search instead of only in main search.
  14. Age values in history cache when receiving new position (reduce 90%) and during search (reduce 50% if value exceeds maximum).
  15. Eliminated Middlegame Time Factor UCI option. (All moves given equal time.)
  16. Improved time management, especially for traditional time controls (such as 40 moves in 4 minutes).  Interrupt if ply takes four times longer than expected to search.
  17. Refactored code.
    1. Removed 174 lines of code.
    2. Rewrote to comply with Microsoft managed recommended rules.
    3. Rewrote to comply with JetBrains ReSharper default rules.