I improved MadChess 3.0 Beta’s time management. I added code that increases MoveTimeSoftLimit
, a TimeSpan
variable that controls how long the engine examines a position (in a timed game) before responding with its move. The code increases MoveTimeSoftLimit
25% each ply (depth >= 9) if the score decreases at least one third of a pawn from the prior ply. In some engines this is known as “panic time.” The engine notices the score dropping and- to anthropomorphize it- panics like a human chess player would, spending more time than usual searching for a move that prevents its position from crumbling.
In MadChess 3.0 Beta, when it’s the engine’s turn to move (in a timed game), it allots time to search for a best move. It calculates MoveTimeSoftLimit
by examining the game clock and the current position. It then calculates MoveTimeHardLimit
simply by multiplying MoveTimeSoftLimit
by four. The soft time limit is examined each ply. If the engine already has used 70 / 128ths of the allotted time (55%) or more, it replies with the best move found so far rather than begin searching the next ply (because it anticipates not having enough time to complete the search). Once MadChess begins searching a ply, it will not interrupt the search unless it’s reached or exceeded the MoveTimeHardLimit
.
In addition, I improved code that calculates move time limits when playing a game with a traditional clock (non Fischer clock). Previously, MadChess 3.0 Beta mismanaged time in non Fischer clock games and occasionally lost on time. Now its playing strength in non Fischer clock games is on par with its strength in Fischer clock games. Usually I test MadChess in tournaments that use a Fischer clock (my computer opponent rating lists all use a Fischer clock), so playing games at 20 moves / 1 min (repeating) was special testing I did for this feature- but don’t intend to continue- to eliminate an engine deficiency. Considering “taste and comfort are personal,” as my father says, I recognize other people may prefer games with a traditional clock. So I’ve ensured MadChess plays well in those time controls.
I did not test sudden death time controls. Why? Because time scrambles don’t produce quality chess by humans or computer chess engines. In my opinion, MadChess’ performance in sudden death time control is not worth testing.
This “panic time” code increased the playing strength of MadChess 3.0 Beta by 8 Elo.
Feature | Category | Date | Commit1 | WAC2 | Elo Rating3 | Improvement |
---|---|---|---|---|---|---|
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 |
- GitHub commit (hash) or Subversion source code revision (integer)
- Win At Chess position test, 3 seconds per position
- Bullet chess, 2 min / game + 1 sec / move