MadChess 2.0 Beta Build 059 (Free Passed Pawns)

I added free passed pawn evaluation to MadChess 2.0 Beta. Unobstructed passed pawns on the sixth or seventh rank are awarded a bonus if they may advance to the next square without material loss. The square must be unoccupied and the score after exchanging pieces on the advance square must not be negative.

In addition, I simplified the move ordering code. I felt the GetNextMove() method required too much external bookkeeping (to mark played moves, illegal moves, update local move variable, save move back to array, etc) and therefore was too prone to bugs. I replaced it with a two stage sort and a simple for loop. First, the four highest priority moves are identified. If the fifth move is reached, the remaining moves are sorted. This avoids the cost of sorting all moves in 90% of the cases where a cutoff occurs in the first few moves. The two stage sort performed as well as the GetNextMove() technique.

This added 31 Elo to the playing strength of MadChess 2.0 Beta.

MadChess 2.0                   2224 :    800 (+439,=151,-210),  64.3 %

vs.                                 :  games (   +,   =,   -),   (%) :   Diff,  SD, CFS (%)
Glass 1.6                           :     50 (   4,   9,  37),  17.0 :   -196,  25,    0.0
Sungorus 1.4                        :     50 (  19,   9,  22),  47.0 :    -86,  12,    0.0
FireFly v2.6.0                      :     50 (  25,  11,  14),  61.0 :    +21,  14,   93.6
ZCT 0.3.2450                        :     50 (  20,  12,  18),  52.0 :    +23,  14,   95.4
Jazz v444                           :     50 (  25,  10,  15),  60.0 :    +43,  13,  100.0
Beowulf 2.4                         :     50 (  23,   9,  18),  55.0 :    +58,  19,   99.9
Wing 2.0                            :     50 (  24,  18,   8),  66.0 :   +108,  15,  100.0
BikJump v2.01                       :     50 (  17,  16,  17),  50.0 :   +123,  13,  100.0
Brainless 1.0                       :     50 (  33,   6,  11),  72.0 :   +125,  19,  100.0
Matheus-2.3                         :     50 (  27,  10,  13),  64.0 :   +148,  12,  100.0
Monarch 1.7                         :     50 (  29,  12,   9),  70.0 :   +175,  15,  100.0
BigLion 2.23w                       :     50 (  34,   6,  10),  74.0 :   +201,  13,  100.0
Sharper 0.17                        :     50 (  38,   6,   6),  82.0 :   +217,  13,  100.0
Faile 1.4                           :     50 (  37,   8,   5),  82.0 :   +244,  12,  100.0
Jabba13032012                       :     50 (  42,   4,   4),  88.0 :   +275,  12,  100.0
Roce 0.0390                         :     50 (  42,   5,   3),  89.0 :   +344,  13,  100.0
Feature Category Date Rev1 WAC2 Elo Rating3 Improvement
Free Passed Pawns Evaluation 2015 Mar 10 59 270 2224 +31
Unstoppable Pawns
Draws, Material Trades
Evaluation 2015 Jan 31 52 270 2193 +39
Late Move Pruning Search 2015 Jan 10 44 273 2154 +39
History Heuristic
Late Move Reductions
Search 2015 Jan 04 40 275 2115 +50
Killer Moves Search 2015 Jan 03 38 275 2065 +61
Futility Pruning Search 2014 Dec 29 37 256 2004 +54
Null Move
Quiescence Recaptures
Search 2014 Dec 28 34 242 1950 +46
King Safety Evaluation 2014 Dec 24 32 225 1904 +27
Piece Mobility Evaluation 2014 Dec 16 29 225 1877 +64
Draw By Repetition Bug Evaluation 2014 Dec 10 27 225 1813 +47
Passed Pawns Evaluation 2014 Dec 09 26 225 1766 +72
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

Banks 51st Amateur Series Division 7

MadChess 1.4 participated in Graham Banks’ 51st amateur tournament in division 7.

                                  1    2    3    4    5    6    7    8    9    0    1    2    
1   Jazz 840 64-bit               **** 0100 ½01½ 01½1 0011 1½11 1101 1½½½ 11½½ ½1½½ ½1½½ 1111  28.5/44
2   Carballo 1.1                  1011 **** ½000 ½001 ½1½1 111½ 101½ 0110 0110 1½10 111½ 1111  28.0/44
3   FireFly 2.7.0 64-bit          ½10½ ½111 **** 0110 1110 0½½1 01½0 1111 ½1½0 ½010 00½0 11½½  25.0/44
4   PikoSzachy Extreme            10½0 ½110 1001 **** 01½1 0½0½ 1001 1½11 1111 0100 1001 0½1½  24.0/44
5   Lozza 1.14a 64-bit            1100 ½0½0 0001 10½0 **** ½011 1½00 1000 0½01 1111 01½½ 1111  22.0/44
6   Orion 0.2 64-bit              0½00 000½ 1½½0 1½1½ ½100 **** 1101 0000 11½0 ½111 0½½1 1110  21.5/44
7   Protej 0.5.8c                 0010 010½ 10½1 0110 0½11 0010 **** 0111 ½001 1010 011½ 0010  20.5/44  451.00
8   Fischerle 0.9.60 64-bit       0½½½ 1001 0000 0½00 0111 1111 1000 **** 1010 10½0 1111 0010  20.5/44  443.25
9   Mango Paola Ajedrez 4.1       00½½ 1001 ½0½1 0000 1½10 00½1 ½110 0101 **** 101½ ½101 ½01½  20.5/44  440.25
10  Absolute Zero 2.4.0.0 64-bit  ½0½½ 0½01 ½101 1011 0000 ½000 0101 01½1 010½ **** 10½½ 0111  20.0/44
11  Exacto 0.e 64-bit             ½0½½ 000½ 11½1 0110 10½½ 1½½0 100½ 0000 ½010 01½½ **** 1½0½  18.5/44
12  MadChess 1.4 64-bit           0000 0000 00½½ 1½0½ 0000 0001 1101 1101 ½10½ 1000 0½1½ ****  15.0/44

Games

MadChess 2.0 Beta Build 052 (Unstoppable Pawns, Draws, Material Trades)

I added code to detect unstoppable passed pawns and drawn endgames, and code to evaluate material trades. The code that evaluates material trades implements the age old advice, “When ahead trade pieces. When behind trade pawns.” A greater bonus is giving for trading pawns, since in many endgames the side with a material advantage cannot win without promoting a pawn.

This added 39 Elo to the playing strength of MadChess 2.0 Beta.

MadChess 2.0                   2193 :    800 (+399,=168,-233),  60.4 %

vs.                                 :  games (   +,   =,   -),   (%) :   Diff,  SD, CFS (%)
Glass 1.6                           :     50 (   4,   7,  39),  15.0 :   -223,  27,    0.0
Sungorus 1.4                        :     50 (  18,   7,  25),  43.0 :   -117,  12,    0.0
ZCT 0.3.2450                        :     50 (  13,  12,  25),  38.0 :    -15,  14,   14.3
FireFly v2.6.0                      :     50 (  18,  19,  13),  55.0 :    -13,  15,   19.0
Jazz v444                           :     50 (  19,  15,  16),  53.0 :     +9,  14,   73.6
Beowulf 2.4                         :     50 (  21,  13,  16),  55.0 :    +31,  20,   93.9
Wing 2.0                            :     50 (  22,  11,  17),  55.0 :    +71,  15,  100.0
Brainless 1.0                       :     50 (  26,  11,  13),  63.0 :    +82,  19,  100.0
BikJump v2.01                       :     50 (  22,  10,  18),  54.0 :    +93,  13,  100.0
Matheus-2.3                         :     50 (  21,  17,  12),  59.0 :   +115,  13,  100.0
Monarch 1.7                         :     50 (  28,  11,  11),  67.0 :   +142,  15,  100.0
BigLion 2.23w                       :     50 (  32,  12,   6),  76.0 :   +170,  13,  100.0
Sharper 0.17                        :     50 (  37,   5,   8),  79.0 :   +184,  13,  100.0
Faile 1.4                           :     50 (  36,  12,   2),  84.0 :   +213,  12,  100.0
Jabba13032012                       :     50 (  41,   1,   8),  83.0 :   +242,  13,  100.0
Roce 0.0390                         :     50 (  41,   5,   4),  87.0 :   +311,  13,  100.0
Feature Category Date Rev1 WAC2 Elo Rating3 Improvement
Unstoppable Pawns
Draws, Material Trades
Evaluation 2015 Jan 31 52 270 2193 +39
Late Move Pruning Search 2015 Jan 10 44 273 2154 +39
History Heuristic
Late Move Reductions
Search 2015 Jan 04 40 275 2115 +50
Killer Moves Search 2015 Jan 03 38 275 2065 +61
Futility Pruning Search 2014 Dec 29 37 256 2004 +54
Null Move
Quiescence Recaptures
Search 2014 Dec 28 34 242 1950 +46
King Safety Evaluation 2014 Dec 24 32 225 1904 +27
Piece Mobility Evaluation 2014 Dec 16 29 225 1877 +64
Draw By Repetition Bug Evaluation 2014 Dec 10 27 225 1813 +47
Passed Pawns Evaluation 2014 Dec 09 26 225 1766 +72
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 044 (Late Move Pruning)

I added late move pruning to MadChess 2.0 Beta. Moves are sorted according to the history heuristic. If a quiet move qualifies for the largest late move reduction, but is less than or equal to four moves from the search horizon, it is skipped. The move is very unlikely to cause a beta cutoff and no time is wasted searching it.

This added 39 Elo to the playing strength of MadChess 2.0 Beta. MadChess 2.0 Beta is now stronger than MadChess 1.4.

MadChess 2.0                   2154 :    800 (+347,=162,-291),  53.5 %

vs.                                 :  games (   +,   =,   -),   (%) :   Diff,  SD, CFS (%)
Glass 1.6                           :     50 (   4,   2,  44),  10.0 :   -281,  27,    0.0
Sungorus 1.4                        :     50 (  14,  16,  20),  44.0 :   -156,  12,    0.0
Capivara LK 0.09a01a                :     50 (   9,  14,  27),  32.0 :   -153,  16,    0.0
Mediocre v0.34                      :     50 (  13,   8,  29),  34.0 :    -63,  15,    0.0
FireFly v2.6.0                      :     50 (  20,  13,  17),  53.0 :    -46,  14,    0.0
ZCT 0.3.2450                        :     50 (  20,  11,  19),  51.0 :    -43,  15,    0.2
Jazz v444                           :     50 (  12,   9,  29),  33.0 :    -39,  13,    0.1
Wing 2.0                            :     50 (  19,   9,  22),  47.0 :    +31,  14,   98.9
BikJump v2.01                       :     50 (  20,  12,  18),  52.0 :    +58,  14,  100.0
Matheus-2.3                         :     50 (  21,  12,  17),  54.0 :    +76,  14,  100.0
Monarch 1.7                         :     50 (  27,  11,  12),  65.0 :   +106,  14,  100.0
BigLion 2.23w                       :     50 (  33,   6,  11),  72.0 :   +133,  12,  100.0
Sharper 0.17                        :     50 (  34,  10,   6),  78.0 :   +147,  13,  100.0
Faile 1.4                           :     50 (  30,  11,   9),  71.0 :   +174,  12,  100.0
Jabba13032012                       :     50 (  36,   7,   7),  79.0 :   +204,  13,  100.0
Roce 0.0390                         :     50 (  35,  11,   4),  81.0 :   +273,  12,  100.0
Feature Category Date Rev1 WAC2 Elo Rating3 Improvement
Late Move Pruning Search 2015 Jan 10 44 273 2154 +39
History Heuristic
Late Move Reductions
Search 2015 Jan 04 40 275 2115 +50
Killer Moves Search 2015 Jan 03 38 275 2065 +61
Futility Pruning Search 2014 Dec 29 37 256 2004 +54
Null Move
Quiescence Recaptures
Search 2014 Dec 28 34 242 1950 +46
King Safety Evaluation 2014 Dec 24 32 225 1904 +27
Piece Mobility Evaluation 2014 Dec 16 29 225 1877 +64
Draw By Repetition Bug Evaluation 2014 Dec 10 27 225 1813 +47
Passed Pawns Evaluation 2014 Dec 09 26 225 1766 +72
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 040 (History Heuristic + Late Move Reductions)

I added a history heuristic and late move reductions to MadChess 2.0 Beta. When a move causes a beta cutoff, the move’s history value is incremented by the distance to the horizon squared. (Distance to the horizon squared is used to prevent moves deep in the search tree from having too much influence over move order.) A history value is saved for each combination of piece type and move destination square. Moves are ordered by their history values descending (after cached best move, capture victim, capture attacker, promoted piece, and killer moves). The search horizon is reduced for moves that appear late in the ordered move list. The later the move, the more the search horizon is reduced. Because the move does not have a history of causing a beta cutoff, it is likely to fail low and less time is spent searching it.

History values are aged (reduced by a percentage) during iterative deepening of the search, to prevent moves from shallow searches from having too much influence over the move order of deeper searches.

In addition, I changed the move representation from unsigned integers to unsigned longs to provide more bits for recording move history values.

This added 50 Elo to the playing strength of MadChess 2.0 Beta.

MadChess 2.0                   2115 :    800 (+305,=170,-325),  48.8 %

vs.                                 :  games (   +,   =,   -),   (%) :   Diff,  SD, CFS (%)
Glass 1.6                           :     50 (   3,  10,  37),  16.0 :   -273,  24,    0.0
Capivara LK 0.09a01a                :     50 (   3,  18,  29),  24.0 :   -196,  14,    0.0
Sungorus 1.4                        :     50 (  12,   9,  29),  33.0 :   -195,  11,    0.0
Mediocre v0.34                      :     50 (  14,   7,  29),  35.0 :    -99,  14,    0.0
FireFly v2.6.0                      :     50 (  13,  10,  27),  36.0 :    -93,  13,    0.0
ZCT 0.3.2450                        :     50 (  14,  13,  23),  41.0 :    -86,  15,    0.0
Jazz v444                           :     50 (  11,  12,  27),  34.0 :    -75,  13,    0.0
Wing 2.0                            :     50 (  19,   9,  22),  47.0 :     -6,  13,   32.2
BikJump v2.01                       :     50 (  20,   6,  24),  46.0 :    +18,  14,   89.2
Matheus-2.3                         :     50 (  19,  14,  17),  52.0 :    +37,  13,   99.7
Monarch 1.7                         :     50 (  20,   8,  22),  48.0 :    +60,  13,  100.0
BigLion 2.23w                       :     50 (  24,  17,   9),  65.0 :    +92,  12,  100.0
Sharper 0.17                        :     50 (  39,   4,   7),  82.0 :   +110,  12,  100.0
Faile 1.4                           :     50 (  29,  16,   5),  74.0 :   +135,  11,  100.0
Jabba13032012                       :     50 (  30,  10,  10),  70.0 :   +162,  13,  100.0
Roce 0.0390                         :     50 (  35,   7,   8),  77.0 :   +233,  12,  100.0
Feature Category Date Rev1 WAC2 Elo Rating3 Improvement
History Heuristic
Late Move Reductions
Search 2015 Jan 04 40 275 2115 +50
Killer Moves Search 2015 Jan 03 38 275 2065 +61
Futility Pruning Search 2014 Dec 29 37 256 2004 +54
Null Move
Quiescence Recaptures
Search 2014 Dec 28 34 242 1950 +46
King Safety Evaluation 2014 Dec 24 32 225 1904 +27
Piece Mobility Evaluation 2014 Dec 16 29 225 1877 +64
Draw By Repetition Bug Evaluation 2014 Dec 10 27 225 1813 +47
Passed Pawns Evaluation 2014 Dec 09 26 225 1766 +72
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