hgm wrote:An even nicer one: This time it is only
six Knights against three Queens. Again Stockfish, playing the Queens gets a time-odds advantage of a factor 5 (10 min vs 2 min/40moves for the Knights).
Initially, Stockfish evaluates itself at +13.5. So this must be a new World record: making Stockfish lose from a +13.5 position, facing time odds as well!
Code: Select all
[Event "Computer Chess Game"]
[Site "SCHAAK_PC"]
[Date "2010.03.22"]
[Round "-"]
[White "NewEng 0.16"]
[Black "Stockfish 1.6 JA"]
[Result "1-0"]
[TimeControl "40/600"]
[FEN "1q1qk1q1/pppppppp/8/8/8/8/PPPPPPPP/NNN1KNNN w - - 0 1"]
[SetUp "1"]
{--------------
. q . q k . q .
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P P P P P P P P
N N N . K N N N
white to play
--------------}
1. Nab3 {-0.98/12 1.0} f5 {+13.57/16 30} 2. d4 {-0.68/12 1.3} b6
{+13.65/16 29} 3. e3 {-0.62/12 1.4} g5 {+14.02/15 25} 4. Nd3 {-0.38/12 1.6}
a5 {+14.18/16 51} 5. Nhg3 {-0.26/13 2.9} Qb7 {+14.30/15 21} 6. f3
{+0.06/14 4} c5 {+14.38/15 37} 7. dxc5 {+0.01/13 1.0} a4 {+14.34/15 16} 8.
N3d2 {-0.29/13 1.4} bxc5 {+14.94/16 22} 9. a3 {-0.24/13 2.9} f4
{+14.46/15 18} 10. N3e2 {-0.18/13 1.5} c4 {+14.66/15 17} 11. Nb4
{+0.07/14 2.7} Qa7 {+14.22/15 13} 12. e4 {+0.06/15 2.7} g4 {+14.30/15 16}
13. g3 {+0.62/13 1.5} fxg3 {+14.58/15 14} 14. hxg3 {+0.80/13 3} Qdb6
{+14.10/15 42} 15. Nbc3 {+0.68/12 1.5} Qf2+ {+14.02/12 12} 16. Kd1
{+0.48/13 1.7} Qg6 {+13.45/14 30} 17. Nbd5 {+1.22/12 1.9} Qb7
{+13.29/13 19} 18. Nfe3 {+0.67/12 2.4} gxf3 {+15.51/14 17} 19. Ngxf3
{+0.39/13 1.3} Qxb2 {+14.94/14 6} 20. Ndxc4 {+0.22/13 2.2} Qa1+
{+15.39/13 1.9} 21. Kd2 {-2.13/15 2.3} Kf8 {+15.19/14 18} 22. Nce5
{+1.90/13 5} Qa6 {+14.94/15 11} 23. Nxd7+ {+2.55/12 2.5} Kg8 {+14.46/16 13}
24. Nde5 {+2.08/13 4} Qxa3 {+14.42/13 6} 25. Nf5 {+2.49/13 4} Qa1
{+14.18/12 5} 26. Ndxe7+ {+2.43/12 1.8} Kf8 {+14.06/10} 27. N7c6
{+2.41/13 2.2} Qb7 {+13.45/12 6} 28. Ncd4 {+2.77/11 1.7} Qh1 {+8.12/13 13}
29. Nxa4 {+3.81/12 4} Qa6 {+10.86/14 19} 30. Nc3 {+3.79/12 2.2} Qff1
{+10.50/13 13} 31. g4 {+4.01/12 4} Qfa1 {+7.19/13 9} 32. Nd5 {+4.27/11 1.8}
Q1a4 {+10.38/11 7} 33. g5 {+4.47/12 2.1} Qa3 {+6.70/11 3} 34. c3
{+4.49/12 4} Qb2+ {+6.54/12 3} 35. Ke3 {+4.58/12 1.4} Qf1 {+5.73/13 5} 36.
c4 {+4.73/12 2.1} h6 {+5.09/10 1.9} 37. g6 {+8.09/12 3} Qbb7 {+1.21/11 3}
38. g7+ {+8.34/12 2.0} Kg8 {+0.92/11 1.7} 39. c5 {+9.21/13 4} Qb8
{+0.64/10 1.6} 40. c6 {+12.74/12 2.6} Qd8 {-8.20/10 2.7} 41. c7
{+15.78/13 3} Qda8 {-12.56/16 59} 42. Nde7+ {+16.82/13 3} Kh7 {-8.00/6} 43.
g8=Q+ {+16.83/13 1.0} Qxg8 {-8.20/6} 44. Nxg8 {+16.50/15 2.0} Kxg8
{-13.37/19 58} 45. c8=Q+ {+16.53/14 1.5} Qxc8 {-14.38/15} 46. Ne7+
{+17.02/15 2.1} Kf8 {-22.59/20 41} 47. Nxc8 {+17.23/15 6} Kg7
{-29.57/18 26} 48. Nf5+ {+17.39/14 1.9} Kg8 {-30.26/18 21} 49. Nxh6+
{+17.98/13 1.0} Kf8 {-77.05/22 48} 50. Nf5 {+18.01/14 2.3} Qa1
{-21.48/19 34} 51. Ncd6 {+18.05/15 4} Kg8 {-105.75/17 19} 52. Nec4
{+19.64/15 6} Qa7+ {-92.46/17 39} 53. Ned4 {+25.10/16 1.7} Qa1
{-105.75/16 12} 54. e5 {+25.20/15 2.4} Qc1+ {-101.72/16 12} 55. Ke4
{+25.51/16 1.0} Qb1+ {-99.78/14 2.3} 56. Kd5 {+25.90/17 2.4} Qb4
{-99.80/13 1.0} 57. e6 {+25.87/14 1.3} Kh7 {-99.84/12} 58. Ng5+
{+319.91/14 1.4} Kg6 {-109.92/14 11} 59. Nge4 {+319.92/15 1.7} Kh5
{-99.86/13 2.8} 60. Nf6+ {+319.93/16 3} Kg5 {-99.88/8} 61. Nde4+
{+319.94/17 1.9} Kf4 {-99.90/12} 62. Ne2+ {+319.95/19 1.8} Kxf5 {-99.92/6}
63. Ne3+ {+319.96/22 2.0} Kg6 {-99.94/6} 64. Nf4+ {+319.97/26 2.0} Kg7
{-99.96/6} 65. Nf5+ {+319.98/28 3} Kh8 {-99.98/6} 66. Ng6# {+319.99/31 2.0}
{White mates} 1-0
[d]7k/8/4PNN1/3K1N2/1q2N3/8/8/8 b - - 0 66
final position
I think I might revise my position: even facing only six Knights, the position is badly lost for three Queens. I cannot exclude that Stockfish is badly broken for this number of Knights, though, so I will have to do some tests with other engines as well.
Yes I think that may be true Harm, the material imbalance table is working against Stockfish here if it favours the two Knights for a Queen trade which it probably does in all possible cases. There are all other sorts of interactions computed for Knights vs Pawns, Knights vs. Queens etc. in the table and they all may be off if there is such a big number of Knights and/or Queens. But the table will probably always trade the two Knights for a Queen. I'm not sure if you should also correct here on the Black side for redundancy of major pieces, having three Queens, Larry Kaufman suggests in his paper in case you have more than one Rook or at least one Rook and Queen it may be favourable to trade off one of the majors, I'm not sure of the exact rule from Larry but the rule in Stockfish would then trade the Rook if possible. The question is if three Queens vs two would be less good then two against one, and trading Queens is advised. There is not yet such a Queen redundancy rule in Stockfish only in case there are also Rooks, and I'm not sure about it. But it does not seem an implausible rule because it would also help make the pawns for the stronger more valuable when major pieces disappear.
I could suggest some quick changes to the material imbalance table that maybe would make Stockfish play this game a little better. Just in case you'd want to compile a new version of it yourself Harm, or anyone else? But the rules are not yet tested. I'm for the moment assuming that 6 Knights would be roughly equivalent with three Queens and you should not trade Queens with 6 Knights. I had to introduce no less than a fourth order correction factor to make this jump between 4 Knights and 6 Knights large enough

I could just have used a larger constant factor with maybe and a third degree correction that would be less extravagant, but for the moment I'll stick with this.
In Rainbow Serpent's material.cpp that now looks like this:
Code: Select all
// Polynomial material balance parameters
const Value RedundantQueenPenalty = Value(320);
const Value RedundantRookPenalty = Value(550);
const Value RedundantKnightPenalty = -Value(50); // NEW
Code: Select all
// Redundancy of major pieces, formula based on Kaufman's paper
// "The Evaluation of Material Imbalances in Chess"
// http://mywebpages.comcast.net/danheisman/Articles/evaluation_of_material_imbalance.htm
if (pieceCount[c][ROOK] >= 1)
matValue -= sign * ((pieceCount[c][ROOK] - 1) * RedundantRookPenalty + pieceCount[c][QUEEN] * RedundantQueenPenalty);
else if (pieceCount[c][QUEEN] > 1)
matValue -= sign * ((pieceCount[c][QUEEN] - 1) * Value(50) + (pieceCount[c][QUEEN] - 2) * Value(75)); // NEW
if (pieceCount[c][KNIGHT] >= 4)
matValue -= sign * ((pieceCount[c][KNIGHT]) * (pieceCount[c][KNIGHT] - 1) * (pieceCount[c][KNIGHT] - 2) * (pieceCount[c][KNIGHT] - 3) * RedundantKnightPenalty); // NEW 4th-degree correction
them = opposite_color(c);
v = 0;
// Second-degree polynomial material imbalance by Tord Romstad
//
// We use NO_PIECE_TYPE as a place holder for the bishop pair "extended piece",
// this allow us to be more flexible in defining bishop pair bonuses.
The correction factor with different number of Knights goes up very steeply and I think just enough between 4 and 6 Knights
N=7 840 * RedundantKnightPenalty
N=6 360 * RedundantKnightPenalty
N=5 120 * RedundantKnightPenalty
N=4 24 * RedundantKnightPenalty
N=3 0
With the above code the position with seven Knights is now favoured heavily for the Knight side

I did not yet check the 6 Knights case, from the game Stockfish against New Eng.
[d]1q1qk1q1/pppppppp/8/8/8/8/PPPPPPPP/NNNNKNNN w - - 0 1
Code: Select all
00:00:00.2 3,87 1 28 Nhg3
00:00:00.2 3,79 2 83 Nab3 c6
00:00:00.2 4,36 3 10501 Nab3 c6 Nhg3 d5 Nd4
00:00:00.2 4,44 4 13968 Nab3 c6 Nhg3 d5 Nd4
00:00:00.3 4,84 5 60121 Nab3 c6 Nhg3 Qd6 Nf3
00:00:01.0 4,84 6 495382 Nab3 c6 Nhg3 Qd6 Nf3 Qb6 Nbc3
00:00:01.9 4,44 7 971729 Nab3 c5 Nhg3 h5 Nxc5 Qdc7 N5d3 h4 Ne4 Qxc2 Nbc3 f5 Ng5
00:00:03.4 4,48 8 1727171 Nab3 c5 Nhg3 h5 Ne4 Qh7 Nexc5 Qxc2 Na3 Qf5
00:00:08.0 3,91 9 4152502 Nab3 c5 Nhg3 h5 Ne4 b6 Na1 d5 Neg3 Kd7 Nab3
00:00:11.6 4,00 9 6039176 Nbc3 d5 e3 c5 Nhg3 e5 Nge2 f5 Nf3
00:00:15.3 4,04 9 7892403 Nhg3 c5 e3 f5 Nbc3 f4 Nh5 fxe3 Ndxe3 b5
00:00:27.6 4,20 10 14276601 Nhg3 c5 e3 Qbc7 Nf3 g5 d3 g4 Nfd2 b5 e4 c4 Nfe3 f6 Na3 cxd3 Nxd3 Qxa2
00:01:03.3 4,24 11 32657821 Nhg3 c5 e3 e6 Nf3 g5 Nbc3 d5 Ng1 Kf8 Nge2 d4 Ne4 dxe3 Ndxe3 c4
00:01:24.0 4,16 12 43261422 Nhg3 c5 e3 f5 Nbc3 d5 Nce2 d4 Nf3 dxe3 Nxf5 exf2+ Nxf2 g6 N5e3 Qf7 Nfg3
00:04:54.4 4,08 13 152023431 Nhg3 c5 Nf3 g5 h3 d5 Na3 Qg6 e3 h5 Nd3 g4 Nh4
00:07:50.1 4,08 14 241856532 Nhg3 c5 Nf3 g5 h3 d5 Nbc3 b5 e3 f5 Nxf5 b4 Nb1 g4 hxg4 Qxg4 N5g3 Qb5 Nce2 Kf8
00:20:08.9 4,16 15 624518407 Nhg3 d5 Nab3 e5 e3 c5 Nxc5 h5 N5b3 Qh7 Na3 Kf8 N3e2 b5 d3 b4 Nb1 Qf6
00:31:19.2 4,16 16 963669045 Nhg3 d5 Nd3 h5 Nxh5 c5 Nhg3 Qb6 Nf3 g5 Ng1 d4 a3 Qc6 Nf3
00:55:05.0 3,96 17 1698877623 Nhg3 c5 d3 d5 Nbd2 Qf8 Nab3 f5 Ngf3 f4 Nh1 c4 dxc4 dxc4 Nxc4 Qbc7
[Engine: Rainbow Serpent 1.6.3s(dc) Build 221 (Athlon 2009 MHz, 128 MB)
by Tord Romstad, Marco Costalba, Joona Kiiski Modifications: Dann Corbit]
For some reason the game stops here, without a proper result message. (I still have to debug this; I suspect that Stockfish resigned, but that due to a WinBoard problem this is not properly handled. The WinBoard clocks are stopped and reste to 10 & 2 min, so WB must think the game is over.) But is is clear that Stockfish is badly losing, its score having dropped from the initial +10 t0 -11, and two of its Queens exterminated at the expense of only a single Knight.
Stockfish losing on time may be built in and not a Winboard bug Harm, under certain circumstances Stockfish just lets the clock run out, rather than resign (is it possible with UCI to resign?). I think it is a rather annoying tactic but maybe designed to annoy the Rybka clones
Eelco