MadChess 3.1 Beta 0c601ea (Singular Move)

I strengthened MadChess by extending the search horizon of singular moves. I gleaned the idea from the Stockfish chess engine. Quoting from my Pull Request #17: In the GetSearchHorizon method, added call to a new method, IsBestMoveSingular, that determines if best move that had failed high in recent searches is best by a significant margin. If so, extend the search by one ply. A code comment explains why: The best move (from the cache) is singular. That is, it’s the only good move in the position. Evaluation of the current position relies on the accuracy of the singular move’s score.… Continue Reading

MadChess 3.0 Released

I have released version 3.0 of my chess engine. This is a complete rewrite of the engine using bitboards. I began the project two and a half years ago and worked on it sporadically, with long stretches of inactivity. I didn’t work on MadChess at all in 2019. Life got too busy, personally and professionally. Gradually, I improved MadChess’ playing strength, surpassing the previous version, and crossing the 2600 ELO threshold. Considering MadChess 3.0 doesn’t have a sophisticated evaluation function, I’m satisfied to have reached that milestone. I’ll likely pursue evaluation improvements in a future version. I have written MadChess… Continue Reading

MadChess 3.0 Beta 4d22dec (Endgame Eval Scaling)

I improved MadChess 3.0 Beta’s detection of drawn endgames. The IsPawnlessDraw method scores the following positions as drawn. Though it continues to search moves for a swindle (opponent mistake that makes a drawn game winnable). 2N vrs <= 1 Minor Q vrs 2B Q vrs 2N Q vrs Q Q vrs R + Minor R vrs R + <= 1 Minor Q vrs 2R 2R vrs R + Minor 2R vrs 2R Testing revealed considering R vrs <= 2 Minors a draw increased evaluation error and caused the engine to play weaker. I left that endgame in the IsPawnlessDraw function… Continue Reading

MadChess 3.0 Beta 2960ec9 (Bishop Pair)

I improved MadChess 3.0 Beta’s evaluation function by adding middlegame and endgame evaluation parameters for bishop pair. Tuning code indicated the bishop pair parameters immediately reduced evaluation error when examining a database consisting of approximately 54,000 Grandmaster games (both players 2600 ELO or stronger). I ran the Particle Swarm Optimization tuner on all evaluation parameters and it further reduced evaluation error. This improved evaluation function increased the playing strength of MadChess 3.0 Beta by 22 ELO.   Feature Category Date Commit1 WAC2 ELO Rating3 Improvement Bishop Pair Evaluation 2021 Mar 14 2960ec9 285 2592 +22 Position Cache Optimization Search 2021… Continue Reading

MadChess 3.0 Beta 42d7702 (Position Cache Optimization)

Quoting from my Pull Request #12: Converted Cache class’ _positions field from a jagged array to a flat array. The flat array is more memory efficient than a jagged array. Jagged arrays have a .NET object header for each sub-array (for garbage collection tracking of reachable-from-root). This enables more positions to be stored per megabyte of memory. The code in this PR stores 65,536 positions per MB = 8,388,608 positions for a typically sized 128 MB cache. Added stats to track cache hit %, best move found in cached position %, and count of invalid best moves. Stats are displayed… Continue Reading