MadChess 3.1 Beta 26e5323 (Threats)

I added evaluation of threats in the middlegame to MadChess 3.1 Beta. A bonus is given if a pawn or minor piece threatens to capture a more valuable piece on its next move. The evaluation code does not determine if the threatening piece is defended. That is left to the Search.GetQuietScore method to resolve. In other words, Search.GetQuietScore may determine the opponent can capture the threatening piece, eliminating the threat and rendering the evaluation bonus moot (because loss of a piece greatly outweighs the threat bonus). Evaluating threats increased the playing strength of MadChess 3.1 Beta by 7 ELO.  … Continue Reading

MadChess 3.1 Beta 2b475bc (Color-Agnostic Code)

I removed 350 lines of code from MadChess and increased its playing strength by 12 ELO. I’m happy with the ratio. The bulk of changes since my last blog post involve replacing redundant, color-specific code with color-agnostic code, mostly in the Eval class. I replaced code such as this… … with code that’s generalized for multiple pieces and colors. The above is just one example of refactored code. There are many others in PR 22 that adds 2,641 lines of code and removes 3,336 lines of code (net -695 lines of code). This refactoring took a lot of time. I… Continue Reading

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