MadChess 2.0 Beta Build 023 (Delay Move Generation)

I added code to delay move generation if a cached position specifies a best move. The best move is played first. If it causes a beta cutoff, the expense of generating moves is avoided. If not, moves are generated and searched, skipping the best move, which has already been searched. Also, I corrected a bug that caused all searches to use an infinite aspiration window.  The corrected code will search the first ply using an infinite aspiration window, then search subsequent plies with a narrow window around the first ply’s score.  If the score of subsequent searches lies on an… Continue Reading

MadChess 2.0 Beta Build 022 (MVV / LVA Move Order)

I corrected a bug in move order. Moves mistakenly were ordered by most valuable victim, then most valuable attacker (MVV / MVA). I changed the order to most valuable victim, then least valuable attacker (MVV / LVA), so pawn takes queen captures are ordered before queen takes queen captures. In addition, I added code to recognize draws by insufficient material. And I corrected an index out of bounds bug involving move arrays. This added 30 Elo to the playing strength of MadChess 2.0 Beta. MadChess 2.0 1626 : 800 (+51,=79,-670), 11.3 % vs. : games ( +, =, -), (%)… Continue Reading

MadChess 2.0 Beta Build 021 (Tapered Evaluation)

I added tapered evaluation to MadChess 2.0 Beta. The evaluation assigns a material score, a middlegame piece location score, and an endgame piece location score. Then calculates the game phase and returns a weighted average of the middlegame and endgame scores. By separating piece location scores into middlegame and endgame phases, I can encourage MadChess to hold its queen back during the middlegame, and bring its king to the center during the endgame, for example. This added 107 Elo to the playing strength of MadChess 2.0 Beta. MadChess 2.0 1596 : 800 (+42,=72,-686), 9.8 % vs. : games ( +,… Continue Reading

MadChess 2.0 Beta Build 020 (Baseline)

I’ve reached an important milestone in the development of my new chess engine. MadChess 2.0 Beta can play a timed game of chess. I’ve implemented an alpha / beta negamax search with aspiration windows and a capture / check evasion quiescence search. Evaluation is limited to material and middlegame piece square tables. No tapered evaluation, no passed pawn bonus, no piece mobility, no king safety, no reductions or pruning of moves, etc. I ran a gauntlet tournament, pitting MadChess 2.0 Beta against weak chess engines. MadChess 2.0 1489 : 800 (+17,=56,-727), 5.6 % vs. : games ( +, =, -),… Continue Reading

MadChess 2.0 Beta Build 001 (Procedural Code)

I’ve been writing a new version of MadChess. For this 2.0 version, I’m writing code using procedural techniques rather than the object-oriented techniques I used in MadChess 1.x. When I say the code is “procedural”, I mean it has two primary traits. The code uses primitive data structures instead of classes. The code emphasizes performance over readability and maintainability. I’m writing the code in C# with a mailbox board representation, similar to MadChess 1.x. The board has an array of Positions. Each Position has an integer array of Squares. Moves are encoded into an unsigned integer. I’m using a copy-make… Continue Reading