MadChess 2.0 Beta Build 025 (Time Management)

I added code to measure the time taken to search each ply and calculate if enough time remains to search the next ply. This lessens the number of searches that must be abandoned in the middle of a ply, and the best move from the prior ply played. These abandoned searches waste time.

This added 24 Elo to the playing strength of MadChess 2.0 Beta. I believe improved time management will pay greater dividends once I add search reductions and pruning of moves.

MadChess 2.0                   1694 :    800 (+101,=54,-645),  16.0 %

vs.                                 :  games (   +,  =,   -),   (%) :   Diff,  SD, CFS (%)
BikJump v2.01                       :    100 (   7,  5,  88),   9.5 :   -385,  16,    0.0
Matheus-2.3                         :    100 (   3,  4,  93),   5.0 :   -373,  15,    0.0
Monarch 1.7                         :    100 (   9, 12,  79),  15.0 :   -338,  16,    0.0
BigLion 2.23w                       :    100 (  13,  6,  81),  16.0 :   -312,  14,    0.0
Faile 1.4                           :    100 (  10,  2,  88),  11.0 :   -306,  13,    0.0
Sharper 0.17                        :    100 (  17,  6,  77),  20.0 :   -292,  15,    0.0
Jabba13032012                       :    100 (  19, 11,  70),  24.5 :   -234,  14,    0.0
Roce 0.0390                         :    100 (  23,  8,  69),  27.0 :   -160,  14,    0.0
Feature Category Date Rev1 WAC2 Elo Rating3 Improvement
Time Management Search 2014 Dec 08 25 231 1694 +24
Delay Move Generation
Aspiration Window Bug
Search 2014 Dec 02 23 231 1670 +44
MVV / LVA Move Order
Draw By Insufficient Material
Move List Overflow Bug
Search 2014 Dec 01 22 235 1626 +30
Tapered Evaluation
MG and EG Piece Location
Evaluation 2014 Nov 29 21 234 1596 +107
Alpha / Beta Negamax
Aspiration Windows
Quiescence, Hash
Material, Piece Squares
Baseline 2014 Nov 25 20 236 1489
  1. Subversion source code revision
  2. Win At Chess position test, 3 seconds per position
  3. Bullet chess, 2 min / game + 1 sec / move

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 aspiration boundary, the window gradually is widened from 50 to 200 to 500 to infinite centipawns.

This added 44 Elo to the playing strength of MadChess 2.0 Beta

MadChess 2.0                   1670 :    800 (+64,=100,-636),  14.3 %

vs.                                 :  games (  +,   =,   -),   (%) :   Diff,  SD, CFS (%)
BikJump v2.01                       :    100 (  1,   7,  92),   4.5 :   -413,  17,    0.0
Matheus-2.3                         :    100 (  6,  13,  81),  12.5 :   -389,  16,    0.0
Monarch 1.7                         :    100 (  3,  10,  87),   8.0 :   -368,  17,    0.0
BigLion 2.23w                       :    100 ( 11,  11,  78),  16.5 :   -335,  14,    0.0
Faile 1.4                           :    100 (  3,  15,  82),  10.5 :   -330,  14,    0.0
Sharper 0.17                        :    100 ( 12,   9,  79),  16.5 :   -318,  16,    0.0
Jabba13032012                       :    100 ( 15,  12,  73),  21.0 :   -259,  15,    0.0
Roce 0.0390                         :    100 ( 13,  23,  64),  24.5 :   -184,  14,    0.0
Feature Category Date Rev1 WAC2 Elo Rating3 Improvement
Delay Move Generation
Aspiration Window Bug
Search 2014 Dec 02 23 231 1670 +44
MVV / LVA Move Order
Draw By Insufficient Material
Move List Overflow Bug
Search 2014 Dec 01 22 235 1626 +30
Tapered Evaluation
MG and EG Piece Location
Evaluation 2014 Nov 29 21 234 1596 +107
Alpha / Beta Negamax
Aspiration Windows
Quiescence, Hash
Material, Piece Squares
Baseline 2014 Nov 25 20 236 1489
  1. Subversion source code revision
  2. Win At Chess position test, 3 seconds per position
  3. Bullet chess, 2 min / game + 1 sec / move

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 (  +,  =,   -),   (%) :   Diff,  SD, CFS (%)
BikJump v2.01                       :    100 (  0,  6,  94),   3.0 :   -460,  18,    0.0
Matheus-2.3                         :    100 (  1,  6,  93),   4.0 :   -443,  17,    0.0
Monarch 1.7                         :    100 (  1,  3,  96),   2.5 :   -418,  17,    0.0
BigLion 2.23w                       :    100 (  8, 15,  77),  15.5 :   -381,  16,    0.0
Faile 1.4                           :    100 (  9, 11,  80),  14.5 :   -374,  15,    0.0
Sharper 0.17                        :    100 (  7, 11,  82),  12.5 :   -365,  17,    0.0
Jabba13032012                       :    100 ( 13, 11,  76),  18.5 :   -305,  16,    0.0
Roce 0.0390                         :    100 ( 12, 16,  72),  20.0 :   -230,  15,    0.0
Feature Category Date Rev1 WAC2 Elo Rating3 Improvement
MVV / LVA Move Order
Draw By Insufficient Material
Move List Overflow Bug
Search 2014 Dec 01 22 235 1626 +30
Tapered Evaluation
MG and EG Piece Location
Evaluation 2014 Nov 29 21 234 1596 +107
Alpha / Beta Negamax
Aspiration Windows
Quiescence, Hash
Material, Piece Squares
Baseline 2014 Nov 25 20 236 1489
  1. Subversion source code revision
  2. Win At Chess position test, 3 seconds per position
  3. Bullet chess, 2 min / game + 1 sec / move

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 (  +,  =,   -),   (%) :   Diff,  SD, CFS (%)
BikJump v2.01                       :    100 (  0,  2,  98),   1.0 :   -490,  18,    0.0
Matheus-2.3                         :    100 (  3, 10,  87),   8.0 :   -467,  17,    0.0
Monarch 1.7                         :    100 (  2,  2,  96),   3.0 :   -446,  18,    0.0
BigLion 2.23w                       :    100 (  5, 11,  84),  10.5 :   -413,  17,    0.0
Faile 1.4                           :    100 (  7, 10,  83),  12.0 :   -404,  16,    0.0
Sharper 0.17                        :    100 (  4,  9,  87),   8.5 :   -396,  17,    0.0
Jabba13032012                       :    100 (  7, 12,  81),  13.0 :   -337,  17,    0.0
Roce 0.0390                         :    100 ( 14, 16,  70),  22.0 :   -258,  16,    0.0
Feature Category Date Rev1 WAC2 Elo Rating3 Improvement
Tapered Evaluation
MG and EG Piece Location
Evaluation 2014 Nov 29 21 234 1596 +107
Alpha / Beta Negamax
Aspiration Windows
Quiescence, Hash
Material, Piece Squares
Baseline 2014 Nov 25 20 236 1489
  1. Subversion source code revision
  2. Win At Chess position test, 3 seconds per position
  3. Bullet chess, 2 min / game + 1 sec / move

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 (  +,  =,   -),   (%) :   Diff,  SD, CFS (%)
BikJump v2.01                       :    100 (  1,  7,  92),   4.5 :   -589,  21,    0.0
Matheus-2.3                         :    100 (  2,  4,  94),   4.0 :   -572,  21,    0.0
Monarch 1.7                         :    100 (  1,  8,  91),   5.0 :   -545,  21,    0.0
BigLion 2.23w                       :    100 (  2,  5,  93),   4.5 :   -520,  21,    0.0
Faile 1.4                           :    100 (  2,  8,  90),   6.0 :   -511,  21,    0.0
Sharper 0.17                        :    100 (  1,  5,  94),   3.5 :   -502,  21,    0.0
Jabba13032012                       :    100 (  7,  6,  87),  10.0 :   -441,  21,    0.0
Roce 0.0390                         :    100 (  1, 13,  86),   7.5 :   -367,  20,    0.0

This establishes a baseline rating.

Feature Category Date Rev1 WAC2 Elo Rating3 Improvement
Alpha / Beta Negamax
Aspiration Windows
Quiescence, Hash
Material, Piece Squares
Baseline 2014 Nov 25 20 236 1489
  1. Subversion source code revision
  2. Win At Chess position test, 3 seconds per position
  3. Bullet chess, 2 min / game + 1 sec / move