MadChess 3.0 Beta Build 075 (Eval Param Tuning)

I ported my particle swarm tuning code from MadChess 2.x to MadChess 3.0 Beta, then simplified and improved it. My code uses the Texel tuning technique described by Peter Österlund in a TalkChess forum post. I improved my particle swarm algorithm in the following manner. Simplified update of evaluation parameters via EvaluationConfig class. Run the Iterate method of each ParticleSwarm on the .NET Core threadpool instead of using dedicated threads. Locate global best particle (among all particle swarms) and update particle velocities after all Iterate methods have completed. This eliminates need to synchronize reads and writes of global state via… Continue Reading

MadChess 3.0 Beta Build 058 (Baseline)

I’ve reached an important milestone in the development of my new chess engine. MadChess 3.0 Beta can play a timed game of chess. I copied the search function from MadChess 2.0 but implemented an evaluation function from scratch. The search function is rather sophisticated. Alpha / beta negamax PVS with aspiration windows MVV / LVA move order MultiPV with tracking of all principal variations (in search, not in hash table) Hashtable with score, bounds, and best move Delayed move generation (play best move from hashtable before generating moves) Null move pruning Killer moves Move history with aging (used to sort… Continue Reading

MadChess 3.0 Beta Build 039 (Bitboards)

For the last month or so, in the evenings and on the weekends, I’ve been writing a new version of MadChess. For this 3.0 version, I’m writing code using bitboards instead of the mailbox board representation I used in MadChess 1.x and 2.x. I considered using C++ and even went as far as purchasing Bjarne Stroustrup’s The C++ Programming Language book and reading the first four chapters. But in the end I decided to stick with C#, the programming language with which I’m most familiar, for a few reasons. Microsoft has been adding high-performance features to C# in recent editions,… Continue Reading

MadChess 2.0 Beta Build 127 (Limit-Strength)

I have added parameters to limit the playing strength of MadChess 2.0 Beta. The simplest way to limit the playing strength of MadChess 2.0 Beta is to set the LimitStrength and Elo parameters. The engine will automatically configure material scores and positional knowledge. In addition, the engine will configure search speed (Nodes Per Second), move error, blunder error, and blunder percent based on the Elo value. Continue Reading

MadChess 2.0 Beta Build 123 (Rook And Queen On 7th Rank)

I added rook and queen on 7th rank evaluation to MadChess 2.0 Beta. The code awards a bonus for a rook or queen on the 7th rank if the enemy king is on the 8th rank (its 1st rank). Also, I removed late move pruning. (When I implemented late move pruning in build 44 it added 39 Elo to the playing strength of MadChess 2.0 Beta.) I replaced it with more aggressive null and late move reductions, and more aggressive futility pruning, but found it decreased the playing strength. Next, I restored late move pruning and left in the aggressive… Continue Reading