Skip to content

Commit 0515ad0

Browse files
committed
Remove unreachable values in mobility table
The possible maximum mobility cardinality (plus one in case of zero squares available) is: - Knights: max. 8 squares -> max. 9 entries - Bishops: max. 13 squares -> max. 14 entries - Rooks: max. 14 squares -> max. 15 entries - Queen: max. 27 squares -> max. 28 entries So remove the extra entries in the table. Spotted by Dariusz Orzechowski. No functional change.
1 parent bf51db2 commit 0515ad0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/evaluate.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,15 @@ namespace {
114114
S( 37, 28), S( 42, 31), S(44, 33) },
115115
{ S(-22,-27), S( -8,-13), S( 6, 1), S(20, 15), S(34, 29), S(48, 43), // Bishops
116116
S( 60, 55), S( 68, 63), S(74, 68), S(77, 72), S(80, 75), S(82, 77),
117-
S( 84, 79), S( 86, 81), S(87, 82), S(87, 82) },
117+
S( 84, 79), S( 86, 81) },
118118
{ S(-17,-33), S(-11,-16), S(-5, 0), S( 1, 16), S( 7, 32), S(13, 48), // Rooks
119119
S( 18, 64), S( 22, 80), S(26, 96), S(29,109), S(31,115), S(33,119),
120-
S( 35,122), S( 36,123), S(37,124), S(38,124) },
120+
S( 35,122), S( 36,123), S(37,124) },
121121
{ S(-12,-20), S( -8,-13), S(-5, -7), S(-2, -1), S( 1, 5), S( 4, 11), // Queens
122122
S( 7, 17), S( 10, 23), S(13, 29), S(16, 34), S(18, 38), S(20, 40),
123123
S( 22, 41), S( 23, 41), S(24, 41), S(25, 41), S(25, 41), S(25, 41),
124124
S( 25, 41), S( 25, 41), S(25, 41), S(25, 41), S(25, 41), S(25, 41),
125-
S( 25, 41), S( 25, 41), S(25, 41), S(25, 41), S(25, 41), S(25, 41),
126-
S( 25, 41), S( 25, 41) }
125+
S( 25, 41), S( 25, 41), S(25, 41), S(25, 41) }
127126
};
128127

129128
// Outpost[PieceType][Square] contains bonuses of knights and bishops, indexed

0 commit comments

Comments
 (0)