Hello,
It seems like stockfish has a problem winning KBNK endings. Here is a test game I played:
[Date "2010.04.19"]
[White "Stockfish 1.7.1 64bit"]
[Black "petero"]
[Result "1/2-1/2"]
[TimeControl "60/120"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - - 0 1"]
1. Kb2 Kd4 2. Bd3 Ke5 3. Kc3 Kd5 4. Bc2 Ke5 5. Nd3+ Kd5 6. Nf2 Ke5 7. Be4
Kf6 8. Kd4 Ke6 9. Ba8 Kf6 10. Ne4+ Kf5 11. Nc5 Kf6 12. Be4 Ke7 13. Bd5 Kf6
14. Be6 Kg5 15. Bg8 Kf6 16. Bd5 Kf5 17. Nd7 Kg6 18. Ke4 Kg7 19. Bb3 Kg6 20.
Ne5+ Kf6 21. Kd5 Kf5 22. Bc2+ Kf6 23. Kd4 Ke6 24. Nc4 Kf6 25. Ke4 Ke6 26.
Ne3 Kf6 27. Bb1 Ke6 28. Ng4 Kf7 29. Ba2+ Kg6 30. Ne5+ Kf6 31. Kd4 Kf5 32.
Bf7 Kf6 33. Ke4 Kg7 34. Bd5 Kf6 35. Kf4 Kg7 36. Bg2 Kf6 37. Bc6 Kg7 38. Ng4
Kg6 39. Bg2 Kf7 40. Bd5+ Kg6 41. Be4+ Kf7 42. Ne5+ Kg7 43. Kf5 Kh8 44. Kf6
Kg8 45. Nd3 Kh8 46. Nc1 Kg8 47. Nb3 Kh8 48. Na1 Kg8 49. Nc2 Kh8 50. Kf7
{Stalemate} 1/2-1/2
My guess is that it is caused by some kind of hash table grafting problem, because if I change the ok_to_use_TT() function so that it always returns false, stockfish wins easily:
[Date "2010.04.19"]
[White "Stockfish 1.7.1 64bit"]
[Black "petero"]
[Result "1-0"]
[TimeControl "60/120"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - - 0 1"]
1. Kb2 Kd4 2. Nb3+ Kd5 3. Kc3 Ke5 4. Kc4 Ke6 5. Kd4 Kf6 6. Nc5 Kf7 7. Ke5
Kg7 8. Ne6+ Kg8 9. Kf6 Kh8 10. Ng5 Kg8 11. Nf7 Kf8 12. Bh7 Ke8 13. Ne5 Kd8
14. Ke6 Kc7 15. Nd7 Kc6 16. Bd3 Kc7 17. Be4 Kd8 18. Kd6 Ke8 19. Bg6+ Kd8
20. Nc5 Kc8 21. Bf5+ Kd8 22. Ne6+ Kc8 23. Kc6 Kb8 24. Nc5 Ka7 25. Kc7 Ka8
26. Kb6 Kb8 27. Na6+ Ka8 28. Be4#
{White mates} 1-0
If this problem only affects KBNK endings, I supposed the effect on ELO is very close to zero, but if it affects other positions too, then it might have an effect on ELO.
Stockfish seems to have trouble with KBNK endings
Moderator: Ras
-
- Posts: 726
- Joined: Mon Apr 19, 2010 7:07 pm
- Location: Sweden
- Full name: Peter Osterlund
-
- Posts: 4669
- Joined: Sun Mar 12, 2006 2:40 am
- Full name: Eelco de Groot
Re: Stockfish seems to have trouble with KBNK endings
Hello Peter,
I can't reproduce the problem with a 32-bit Stockfish 1.7 or Stockfish 1.7.1 at fixed search depth. 60 moves in 120 seconds should certainly be enough to play the endgame well, unless it would be a very old computer. Can you reproduce it with the 32-bit build, preferably the official one? Is this with the official build or did you compile Stockfish yourself?
Regards, Eelco
A few testgames from your starting postion, Shredder using its Shredderbases so you can check the progress.
[Event "Search Depth 10 Plies"]
[Site "Engine Match"]
[Date "2010.04.20"]
[Round "1"]
[White "Stockfish 1.7 JA Mingw [2 threads, single core]"]
[Black "Shredder 11 UCI"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - -"]
1. Kb2 {+76.91/10 35s} Ke6 {-76.96/10 0s} 2. Kc3 {+76.96/10
12s} Kf7 {-76.91/10 0s} (2... Kd5 {-M28/4 4s (Ke5)} 3. Ba2+
{+76.91/10 0s (Ne2)} Ke5 {-M28/4 0s} 4. Nd3+ {+76.96/10 0s}
Kf6 {-M27/4 0s} 5. Kd4 {+76.96/10 0s} Kf5 {-M26/4 0s (Kg6)}
6. Nb4 {+76.96/10 7s (Bb1)} Kg6 {-M25/4 0s} 7. Ke5
{+76.96/10 0s (Nd5)} Kg7 {-M24/4 0s (Kh7)} 8. Ke6
{+76.96/10 0s (Nc6)} Kh7 {-M23/4 0s} 9. Bb1+ {+77.02/10 0s
(Kf6)} Kg7 {-M23/4 0s (Kh8)} 10. Nc6 {+77.02/10 0s} Kh8
{-M22/4 0s} 11. Kf6 {+77.07/10 0s (Nd8)} Kg8 {-M21/4 0s}
12. Ne5 {+77.07/10 0s (Bg6)} Kh8 {-M20/4 0s} 13. Nf7+
{+77.12/10 11s (Bg6)} Kg8 {-M19/4 0s} 14. Bc2 {+77.12/10 0s
(Bg6)} Kf8 {-M18/4 0s} 15. Bh7 {+77.12/10 0s} Ke8 {-M17/4
0s} 16. Ne5 {+77.12/10 1s} Kd8 {-M16/4 0s (Kf8)} 17. Ke6
{+77.07/10 0s} Kc7 {-M15/4 0s} 18. Bc2 {+77.12/10 0s (Nd7)}
Kb6 {-M15/4 0s} 19. Kd5 {+77.12/10 0s (Nd3)} Kb5 {-M14/4
0s} 20. Nc6 {+77.12/10 0s} Kb6 {-M13/4 0s} 21. Ba4
{+77.17/10 0s} Kc7 {-M12/4 0s} 22. Na5 {+77.17/10 0s (Nd4)}
Kb6 {-M11/4 0s} 23. Nc4+ {+77.22/10 0s (Nb3)} Kc7 {-M10/4
0s} 24. Ke6 {+77.22/10 0s (Bb5)} Kd8 {-M9/4 0s (Kc8)}
25. Kd6 {+77.22/10 0s (Bd7)} Kc8 {-M9/4 0s} 26. Na5
{+77.22/10 0s (Bc6)} Kd8 {-M8/4 0s} 27. Nb7+ {+77.22/10 0s
(Bc6)} Kc8 {-M7/4 0s} 28. Kc6 {+77.27/10 0s} Kb8 {-M6/4 0s}
29. Kb6 {+M6/10 0s} Kc8 {-M5/4 0s} 30. Bb5 {+M5/10 0s
(Be8)} Kb8 {-M4/4 0s} 31. Nd6 {+M4/10 0s (Bd7)} Ka8 {-M3/4
0s} 32. Kc7 {+M3/10 0s} Ka7 {-M2/4 0s} 33. Nc8+ {+M2/10 0s}
Ka8 {-M1/4 0s} 34. Bc6# {+M1/10 0s}) 3. Ba2+ {+76.96/10 8s}
Kg7 {-76.96/10 0s} 4. Nd3 {+76.96/10 5s} Kh8 {-76.96/10 0s}
5. Kd4 {+77.02/10 12s} Kh7 {-77.02/10 0s} 6. Ke5 {+77.02/10
6s} Kg7 {-77.02/10 0s} 7. Bb1 {+77.07/10 12s} Kh7
{-77.07/10 0s} 8. Nf4+ {+77.07/10 2s} Kh6 {-77.07/10 0s}
9. Ne6 {+77.07/10 2s} Kh5 {-77.07/10 0s} 10. Bf5 {+77.12/10
5s} Kh6 {-77.12/10 0s} 11. Kf6 {+77.12/10 1s} Kh5
{-77.12/10 0s} 12. Nf4+ {+77.12/10 1s} Kh6 {-77.12/10 0s}
13. Nd3 {+77.12/10 0s} Kh5 {-77.12/10 0s} 14. Bg6+
{+77.12/10 0s} Kh6 {-77.12/10 0s} 15. Be4 {+77.12/10 0s}
Kh5 {-77.12/10 0s} 16. Ne5 {+77.12/10 0s} Kh6 {-77.17/10
0s} 17. Nf7+ {+77.17/10 0s} Kh5 {-77.17/10 0s} 18. Bf3+
{+77.17/10 0s} Kh4 {-77.17/10 0s} 19. Ne5 {+77.17/10 0s}
Kg3 {-77.17/10 0s} 20. Kf5 {+77.22/10 0s} Kf2 {-77.22/10
0s} 21. Ke4 {+77.22/10 0s} Kg3 {-77.22/10 0s} 22. Nd3
{+77.22/10 0s} Kh4 {-77.22/10 0s} 23. Kf4 {+77.22/10 0s}
Kh3 {-77.22/10 0s} 24. Ne1 {+77.27/10 0s} Kh4 {-77.22/10
0s} 25. Bd1 {+77.27/10 0s} Kh3 {-77.27/10 0s} 26. Bg4+
{+M7/10 0s} Kh2 {-77.27/10 0s} 27. Kf3 {+M7/10 0s} Kg1
{-M5/10 0s} 28. Bh3 {+M5/10 0s} Kh2 {-M4/10 0s} 29. Kg4
{+M4/10 0s} Kh1 {-M3/10 0s} 30. Kg3 {+M3/10 0s} Kg1 {-M2/10
0s} 31. Nf3+ {+M2/10 0s} Kh1 {-M1/10 0s} 32. Bg2# {+M1/10
0s} 1-0
[Event "Search Depth 10 Plies"]
[Site "Engine Match"]
[Date "2010.04.20"]
[Round "1"]
[White "Stockfish 1.7 JA Mingw"]
[Black "Shredder 11 UCI"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - -"]
1. Kb2 {+76.89/10 0s} Ke6 {-M29/4 0s (Kc4)} 2. Kc3
{+76.91/10 0s (Nd3)} Kd5 {-M28/4 0s (Ke5)} 3. Ba2+
{+76.91/10 0s (Ne2)} Ke5 {-M28/4 0s} 4. Nd3+ {+76.96/10 0s}
Kf6 {-M27/4 0s} 5. Kd4 {+76.91/10 0s} Kf5 {-M26/4 0s}
6. Nc1 {+76.96/10 0s (Bb1)} Kf6 {-M26/4 0s} 7. Ke4
{+76.96/10 0s} Kg6 {-M25/4 0s} 8. Ke5 {+76.96/10 0s (Nd3)}
Kg7 {-M24/4 0s (Kh7)} 9. Ne2 {+77.07/10 0s (Nd3)} Kg6
{-M23/4 0s (Kh7)} 10. Nf4+ {+77.07/10 0s (Be6)} Kg7 {-M22/4
0s} 11. Kf5 {+77.07/10 0s (Be6)} Kh7 {-M21/4 0s (Kh8)}
12. Kf6 {+77.07/10 0s} Kh8 {-M20/4 0s} 13. Ng6+ {+77.07/10
0s (Bf7)} Kh7 {-M19/4 0s} 14. Bb3 {+77.12/10 0s (Bf7)} Kh6
{-M18/4 0s} 15. Bg8 {+77.07/10 0s} Kh5 {-M17/4 0s} 16. Ne5
{+77.12/10 0s} Kh4 {-M16/4 0s} 17. Kf5 {+77.12/10 0s (Bd5)}
Kg3 {-M15/4 0s} 18. Ng4 {+77.12/10 0s} Kg2 {-M14/4 0s
(Kf3)} 19. Kf4 {+77.12/10 0s (Bc4)} Kf1 {-M14/4 0s} 20. Ke3
{+77.17/10 0s} Kg2 {-M13/4 0s} 21. Bd5+ {+77.17/10 0s
(Bb3)} Kg3 {-M12/4 0s (Kh3)} 22. Nf6 {+77.17/10 0s (Be6)}
Kh4 {-M11/4 0s (Kh3)} 23. Kf4 {+77.17/10 0s} Kh3 {-M10/4
0s} 24. Bf3 {+77.22/10 0s} Kh4 {-M9/4 0s} 25. Nd5
{+77.22/10 0s} Kh3 {-M8/4 0s} 26. Ne3 {+77.22/10 0s} Kh4
{-M7/4 0s} 27. Ng2+ {+77.22/10 0s (Bd1)} Kh3 {-M8/4 0s}
28. Be4 {+77.22/10 0s (Bb7)} Kh2 {-M7/4 0s} 29. Kf3 {+M7/10
0s (Kg4)} Kg1 {-M6/4 0s} 30. Ne3 {+M6/10 0s (Bf5)} Kh2
{-M5/4 0s (Kh1)} 31. Bf5 {+M5/10 0s} Kg1 {-M4/4 0s} 32. Kg3
{+M4/10 0s} Kh1 {-M3/4 0s} 33. Kf2 {+M3/10 0s} Kh2 {-M2/4
0s} 34. Nf1+ {+M2/10 0s} Kh1 {-M1/4 0s} 35. Be4# {+M1/10
0s} 1-0
[Event "Search Depth 10 Plies"]
[Site "Engine Match"]
[Date "2010.04.20"]
[Round "1"]
[White "Stockfish 1.7.1 JA"]
[Black "Shredder 11 UCI"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - -"]
1. Kb2 {+76.89/10 0s} Ke6 {-M29/4 1s (Kc4)} 2. Kc3
{+76.91/10 0s (Nd3)} Kd5 {-M28/4 0s (Ke5)} 3. Ba2+
{+76.91/10 0s (Ne2)} Ke5 {-M28/4 0s} 4. Nd3+ {+76.96/10 0s}
Kf6 {-M27/4 0s} 5. Kd4 {+76.91/10 0s} Kf5 {-M26/4 0s}
6. Nc1 {+76.96/10 0s (Bb1)} Kf6 {-M26/4 0s} 7. Ke4
{+76.96/10 0s} Kg6 {-M25/4 0s} 8. Ke5 {+76.96/10 0s (Nd3)}
Kg7 {-M24/4 0s (Kh7)} 9. Ne2 {+77.07/10 0s (Nd3)} Kg6
{-M23/4 0s (Kh7)} 10. Nf4+ {+77.07/10 0s (Be6)} Kg7 {-M22/4
0s} 11. Kf5 {+77.07/10 0s (Be6)} Kh7 {-M21/4 0s (Kh8)}
12. Kf6 {+77.07/10 0s} Kh8 {-M20/4 0s} 13. Ng6+ {+77.07/10
0s (Bf7)} Kh7 {-M19/4 0s} 14. Bb3 {+77.12/10 0s (Bf7)} Kh6
{-M18/4 0s} 15. Bg8 {+77.07/10 0s} Kh5 {-M17/4 0s} 16. Ne5
{+77.12/10 0s} Kh4 {-M16/4 0s} 17. Kf5 {+77.12/10 0s (Bd5)}
Kg3 {-M15/4 0s} 18. Ng4 {+77.12/10 0s} Kg2 {-M14/4 0s
(Kf3)} 19. Kf4 {+77.12/10 0s (Bc4)} Kf1 {-M14/4 0s} 20. Ke3
{+77.17/10 0s} Kg2 {-M13/4 0s} 21. Bd5+ {+77.17/10 0s
(Bb3)} Kg3 {-M12/4 0s (Kh3)} 22. Nf6 {+77.17/10 0s (Be6)}
Kh4 {-M11/4 0s (Kh3)} 23. Kf4 {+77.17/10 0s} Kh3 {-M10/4
0s} 24. Bf3 {+77.22/10 0s} Kh4 {-M9/4 0s} 25. Nd5
{+77.22/10 0s} Kh3 {-M8/4 0s} 26. Ne3 {+77.22/10 0s} Kh4
{-M7/4 0s} 27. Ng2+ {+77.22/10 0s (Bd1)} Kh3 {-M8/4 0s}
28. Be4 {+77.22/10 0s (Bb7)} Kh2 {-M7/4 0s} 29. Kf3 {+M7/10
0s (Kg4)} Kg1 {-M6/4 0s} 30. Ne3 {+M6/10 0s (Bf5)} Kh2
{-M5/4 0s (Kh1)} 31. Bf5 {+M5/10 0s} Kg1 {-M4/4 0s} 32. Kg3
{+M4/10 0s} Kh1 {-M3/4 0s} 33. Kf2 {+M3/10 0s} Kh2 {-M2/4
0s} 34. Nf1+ {+M2/10 0s} Kh1 {-M1/4 0s} 35. Be4# {+M1/10
0s} 1-0
I can't reproduce the problem with a 32-bit Stockfish 1.7 or Stockfish 1.7.1 at fixed search depth. 60 moves in 120 seconds should certainly be enough to play the endgame well, unless it would be a very old computer. Can you reproduce it with the 32-bit build, preferably the official one? Is this with the official build or did you compile Stockfish yourself?
Regards, Eelco
A few testgames from your starting postion, Shredder using its Shredderbases so you can check the progress.
[Event "Search Depth 10 Plies"]
[Site "Engine Match"]
[Date "2010.04.20"]
[Round "1"]
[White "Stockfish 1.7 JA Mingw [2 threads, single core]"]
[Black "Shredder 11 UCI"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - -"]
1. Kb2 {+76.91/10 35s} Ke6 {-76.96/10 0s} 2. Kc3 {+76.96/10
12s} Kf7 {-76.91/10 0s} (2... Kd5 {-M28/4 4s (Ke5)} 3. Ba2+
{+76.91/10 0s (Ne2)} Ke5 {-M28/4 0s} 4. Nd3+ {+76.96/10 0s}
Kf6 {-M27/4 0s} 5. Kd4 {+76.96/10 0s} Kf5 {-M26/4 0s (Kg6)}
6. Nb4 {+76.96/10 7s (Bb1)} Kg6 {-M25/4 0s} 7. Ke5
{+76.96/10 0s (Nd5)} Kg7 {-M24/4 0s (Kh7)} 8. Ke6
{+76.96/10 0s (Nc6)} Kh7 {-M23/4 0s} 9. Bb1+ {+77.02/10 0s
(Kf6)} Kg7 {-M23/4 0s (Kh8)} 10. Nc6 {+77.02/10 0s} Kh8
{-M22/4 0s} 11. Kf6 {+77.07/10 0s (Nd8)} Kg8 {-M21/4 0s}
12. Ne5 {+77.07/10 0s (Bg6)} Kh8 {-M20/4 0s} 13. Nf7+
{+77.12/10 11s (Bg6)} Kg8 {-M19/4 0s} 14. Bc2 {+77.12/10 0s
(Bg6)} Kf8 {-M18/4 0s} 15. Bh7 {+77.12/10 0s} Ke8 {-M17/4
0s} 16. Ne5 {+77.12/10 1s} Kd8 {-M16/4 0s (Kf8)} 17. Ke6
{+77.07/10 0s} Kc7 {-M15/4 0s} 18. Bc2 {+77.12/10 0s (Nd7)}
Kb6 {-M15/4 0s} 19. Kd5 {+77.12/10 0s (Nd3)} Kb5 {-M14/4
0s} 20. Nc6 {+77.12/10 0s} Kb6 {-M13/4 0s} 21. Ba4
{+77.17/10 0s} Kc7 {-M12/4 0s} 22. Na5 {+77.17/10 0s (Nd4)}
Kb6 {-M11/4 0s} 23. Nc4+ {+77.22/10 0s (Nb3)} Kc7 {-M10/4
0s} 24. Ke6 {+77.22/10 0s (Bb5)} Kd8 {-M9/4 0s (Kc8)}
25. Kd6 {+77.22/10 0s (Bd7)} Kc8 {-M9/4 0s} 26. Na5
{+77.22/10 0s (Bc6)} Kd8 {-M8/4 0s} 27. Nb7+ {+77.22/10 0s
(Bc6)} Kc8 {-M7/4 0s} 28. Kc6 {+77.27/10 0s} Kb8 {-M6/4 0s}
29. Kb6 {+M6/10 0s} Kc8 {-M5/4 0s} 30. Bb5 {+M5/10 0s
(Be8)} Kb8 {-M4/4 0s} 31. Nd6 {+M4/10 0s (Bd7)} Ka8 {-M3/4
0s} 32. Kc7 {+M3/10 0s} Ka7 {-M2/4 0s} 33. Nc8+ {+M2/10 0s}
Ka8 {-M1/4 0s} 34. Bc6# {+M1/10 0s}) 3. Ba2+ {+76.96/10 8s}
Kg7 {-76.96/10 0s} 4. Nd3 {+76.96/10 5s} Kh8 {-76.96/10 0s}
5. Kd4 {+77.02/10 12s} Kh7 {-77.02/10 0s} 6. Ke5 {+77.02/10
6s} Kg7 {-77.02/10 0s} 7. Bb1 {+77.07/10 12s} Kh7
{-77.07/10 0s} 8. Nf4+ {+77.07/10 2s} Kh6 {-77.07/10 0s}
9. Ne6 {+77.07/10 2s} Kh5 {-77.07/10 0s} 10. Bf5 {+77.12/10
5s} Kh6 {-77.12/10 0s} 11. Kf6 {+77.12/10 1s} Kh5
{-77.12/10 0s} 12. Nf4+ {+77.12/10 1s} Kh6 {-77.12/10 0s}
13. Nd3 {+77.12/10 0s} Kh5 {-77.12/10 0s} 14. Bg6+
{+77.12/10 0s} Kh6 {-77.12/10 0s} 15. Be4 {+77.12/10 0s}
Kh5 {-77.12/10 0s} 16. Ne5 {+77.12/10 0s} Kh6 {-77.17/10
0s} 17. Nf7+ {+77.17/10 0s} Kh5 {-77.17/10 0s} 18. Bf3+
{+77.17/10 0s} Kh4 {-77.17/10 0s} 19. Ne5 {+77.17/10 0s}
Kg3 {-77.17/10 0s} 20. Kf5 {+77.22/10 0s} Kf2 {-77.22/10
0s} 21. Ke4 {+77.22/10 0s} Kg3 {-77.22/10 0s} 22. Nd3
{+77.22/10 0s} Kh4 {-77.22/10 0s} 23. Kf4 {+77.22/10 0s}
Kh3 {-77.22/10 0s} 24. Ne1 {+77.27/10 0s} Kh4 {-77.22/10
0s} 25. Bd1 {+77.27/10 0s} Kh3 {-77.27/10 0s} 26. Bg4+
{+M7/10 0s} Kh2 {-77.27/10 0s} 27. Kf3 {+M7/10 0s} Kg1
{-M5/10 0s} 28. Bh3 {+M5/10 0s} Kh2 {-M4/10 0s} 29. Kg4
{+M4/10 0s} Kh1 {-M3/10 0s} 30. Kg3 {+M3/10 0s} Kg1 {-M2/10
0s} 31. Nf3+ {+M2/10 0s} Kh1 {-M1/10 0s} 32. Bg2# {+M1/10
0s} 1-0
[Event "Search Depth 10 Plies"]
[Site "Engine Match"]
[Date "2010.04.20"]
[Round "1"]
[White "Stockfish 1.7 JA Mingw"]
[Black "Shredder 11 UCI"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - -"]
1. Kb2 {+76.89/10 0s} Ke6 {-M29/4 0s (Kc4)} 2. Kc3
{+76.91/10 0s (Nd3)} Kd5 {-M28/4 0s (Ke5)} 3. Ba2+
{+76.91/10 0s (Ne2)} Ke5 {-M28/4 0s} 4. Nd3+ {+76.96/10 0s}
Kf6 {-M27/4 0s} 5. Kd4 {+76.91/10 0s} Kf5 {-M26/4 0s}
6. Nc1 {+76.96/10 0s (Bb1)} Kf6 {-M26/4 0s} 7. Ke4
{+76.96/10 0s} Kg6 {-M25/4 0s} 8. Ke5 {+76.96/10 0s (Nd3)}
Kg7 {-M24/4 0s (Kh7)} 9. Ne2 {+77.07/10 0s (Nd3)} Kg6
{-M23/4 0s (Kh7)} 10. Nf4+ {+77.07/10 0s (Be6)} Kg7 {-M22/4
0s} 11. Kf5 {+77.07/10 0s (Be6)} Kh7 {-M21/4 0s (Kh8)}
12. Kf6 {+77.07/10 0s} Kh8 {-M20/4 0s} 13. Ng6+ {+77.07/10
0s (Bf7)} Kh7 {-M19/4 0s} 14. Bb3 {+77.12/10 0s (Bf7)} Kh6
{-M18/4 0s} 15. Bg8 {+77.07/10 0s} Kh5 {-M17/4 0s} 16. Ne5
{+77.12/10 0s} Kh4 {-M16/4 0s} 17. Kf5 {+77.12/10 0s (Bd5)}
Kg3 {-M15/4 0s} 18. Ng4 {+77.12/10 0s} Kg2 {-M14/4 0s
(Kf3)} 19. Kf4 {+77.12/10 0s (Bc4)} Kf1 {-M14/4 0s} 20. Ke3
{+77.17/10 0s} Kg2 {-M13/4 0s} 21. Bd5+ {+77.17/10 0s
(Bb3)} Kg3 {-M12/4 0s (Kh3)} 22. Nf6 {+77.17/10 0s (Be6)}
Kh4 {-M11/4 0s (Kh3)} 23. Kf4 {+77.17/10 0s} Kh3 {-M10/4
0s} 24. Bf3 {+77.22/10 0s} Kh4 {-M9/4 0s} 25. Nd5
{+77.22/10 0s} Kh3 {-M8/4 0s} 26. Ne3 {+77.22/10 0s} Kh4
{-M7/4 0s} 27. Ng2+ {+77.22/10 0s (Bd1)} Kh3 {-M8/4 0s}
28. Be4 {+77.22/10 0s (Bb7)} Kh2 {-M7/4 0s} 29. Kf3 {+M7/10
0s (Kg4)} Kg1 {-M6/4 0s} 30. Ne3 {+M6/10 0s (Bf5)} Kh2
{-M5/4 0s (Kh1)} 31. Bf5 {+M5/10 0s} Kg1 {-M4/4 0s} 32. Kg3
{+M4/10 0s} Kh1 {-M3/4 0s} 33. Kf2 {+M3/10 0s} Kh2 {-M2/4
0s} 34. Nf1+ {+M2/10 0s} Kh1 {-M1/4 0s} 35. Be4# {+M1/10
0s} 1-0
[Event "Search Depth 10 Plies"]
[Site "Engine Match"]
[Date "2010.04.20"]
[Round "1"]
[White "Stockfish 1.7.1 JA"]
[Black "Shredder 11 UCI"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - -"]
1. Kb2 {+76.89/10 0s} Ke6 {-M29/4 1s (Kc4)} 2. Kc3
{+76.91/10 0s (Nd3)} Kd5 {-M28/4 0s (Ke5)} 3. Ba2+
{+76.91/10 0s (Ne2)} Ke5 {-M28/4 0s} 4. Nd3+ {+76.96/10 0s}
Kf6 {-M27/4 0s} 5. Kd4 {+76.91/10 0s} Kf5 {-M26/4 0s}
6. Nc1 {+76.96/10 0s (Bb1)} Kf6 {-M26/4 0s} 7. Ke4
{+76.96/10 0s} Kg6 {-M25/4 0s} 8. Ke5 {+76.96/10 0s (Nd3)}
Kg7 {-M24/4 0s (Kh7)} 9. Ne2 {+77.07/10 0s (Nd3)} Kg6
{-M23/4 0s (Kh7)} 10. Nf4+ {+77.07/10 0s (Be6)} Kg7 {-M22/4
0s} 11. Kf5 {+77.07/10 0s (Be6)} Kh7 {-M21/4 0s (Kh8)}
12. Kf6 {+77.07/10 0s} Kh8 {-M20/4 0s} 13. Ng6+ {+77.07/10
0s (Bf7)} Kh7 {-M19/4 0s} 14. Bb3 {+77.12/10 0s (Bf7)} Kh6
{-M18/4 0s} 15. Bg8 {+77.07/10 0s} Kh5 {-M17/4 0s} 16. Ne5
{+77.12/10 0s} Kh4 {-M16/4 0s} 17. Kf5 {+77.12/10 0s (Bd5)}
Kg3 {-M15/4 0s} 18. Ng4 {+77.12/10 0s} Kg2 {-M14/4 0s
(Kf3)} 19. Kf4 {+77.12/10 0s (Bc4)} Kf1 {-M14/4 0s} 20. Ke3
{+77.17/10 0s} Kg2 {-M13/4 0s} 21. Bd5+ {+77.17/10 0s
(Bb3)} Kg3 {-M12/4 0s (Kh3)} 22. Nf6 {+77.17/10 0s (Be6)}
Kh4 {-M11/4 0s (Kh3)} 23. Kf4 {+77.17/10 0s} Kh3 {-M10/4
0s} 24. Bf3 {+77.22/10 0s} Kh4 {-M9/4 0s} 25. Nd5
{+77.22/10 0s} Kh3 {-M8/4 0s} 26. Ne3 {+77.22/10 0s} Kh4
{-M7/4 0s} 27. Ng2+ {+77.22/10 0s (Bd1)} Kh3 {-M8/4 0s}
28. Be4 {+77.22/10 0s (Bb7)} Kh2 {-M7/4 0s} 29. Kf3 {+M7/10
0s (Kg4)} Kg1 {-M6/4 0s} 30. Ne3 {+M6/10 0s (Bf5)} Kh2
{-M5/4 0s (Kh1)} 31. Bf5 {+M5/10 0s} Kg1 {-M4/4 0s} 32. Kg3
{+M4/10 0s} Kh1 {-M3/4 0s} 33. Kf2 {+M3/10 0s} Kh2 {-M2/4
0s} 34. Nf1+ {+M2/10 0s} Kh1 {-M1/4 0s} 35. Be4# {+M1/10
0s} 1-0
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
-
- Posts: 726
- Joined: Mon Apr 19, 2010 7:07 pm
- Location: Sweden
- Full name: Peter Osterlund
Re: Stockfish seems to have trouble with KBNK endings
Hello Eelco,
I used a 64-bit version that I compiled myself under Fedora 12. However the 32-bit linux JA compile gives the same results:
[Date "2010.04.20"]
[White "Stockfish 1.7.1 JA"]
[Black "petero"]
[Result "1/2-1/2"]
[TimeControl "60/120"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - - 0 1"]
1. Kb2 Kd4 2. Bc2 Kc4 3. Ne2 Kd5 4. Kb3 Ke5 5. Kc4 Ke6 6. Ng3 Ke5 7. Nf5
Ke6 8. Nd4+ Ke5 9. Bh7 Kf6 10. Bb1 Ke5 11. Kc5 Kf6 12. Kd6 Kf7 13. Ba2+ Kf6
14. Kd5 Kf7 15. Kc5+ Kf6 16. Kd6 Kg6 17. Bd5 Kf6 18. Bc4 Kg6 19. Bd3+ Kf6
20. Kc5 Ke5 21. Kc4 Kf6 22. Kd5 Kf7 23. Nf5 Kf6 24. Bb1 Kf7 25. Ke5 Kg6 26.
Nd4+ Kf7 27. Ba2+ Kg6 28. Bb3 Kg7 29. Kd5 Kf6 30. Bc4 Kg6 31. Ne2 Kf6 32.
Bb3 Kg6 33. Ng3 Kf6 34. Ne4+ Kg6 35. Nd6 Kf6 36. Bc2 Kg7 37. Nf5+ Kf6 38.
Ng3 Kf7 39. Ba4 Kf6 40. Bd1 Kf7 41. Kd6 Kf6 42. Bc2 Kf7 43. Kd5 Kf6 44.
Ne4+ Kf7 45. Nd2 Kf6 46. Nb1 Kf7 47. Na3 Kf6 48. Nb5 Kf7 49. Bb1 Kf6 50.
Na3 Kf7
{Draw by fifty-move rule} 1/2-1/2
I use a quad core 2.4GHz Core 2 computer, which reaches search depths around 20 ply or more. I guess you don't see the problem because you used a fixed search depth.
The defense strategy I used was to keep the king close to the center but always make sure to have a retreat path into the corner that the bishop can't attack.
I used a 64-bit version that I compiled myself under Fedora 12. However the 32-bit linux JA compile gives the same results:
[Date "2010.04.20"]
[White "Stockfish 1.7.1 JA"]
[Black "petero"]
[Result "1/2-1/2"]
[TimeControl "60/120"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - - 0 1"]
1. Kb2 Kd4 2. Bc2 Kc4 3. Ne2 Kd5 4. Kb3 Ke5 5. Kc4 Ke6 6. Ng3 Ke5 7. Nf5
Ke6 8. Nd4+ Ke5 9. Bh7 Kf6 10. Bb1 Ke5 11. Kc5 Kf6 12. Kd6 Kf7 13. Ba2+ Kf6
14. Kd5 Kf7 15. Kc5+ Kf6 16. Kd6 Kg6 17. Bd5 Kf6 18. Bc4 Kg6 19. Bd3+ Kf6
20. Kc5 Ke5 21. Kc4 Kf6 22. Kd5 Kf7 23. Nf5 Kf6 24. Bb1 Kf7 25. Ke5 Kg6 26.
Nd4+ Kf7 27. Ba2+ Kg6 28. Bb3 Kg7 29. Kd5 Kf6 30. Bc4 Kg6 31. Ne2 Kf6 32.
Bb3 Kg6 33. Ng3 Kf6 34. Ne4+ Kg6 35. Nd6 Kf6 36. Bc2 Kg7 37. Nf5+ Kf6 38.
Ng3 Kf7 39. Ba4 Kf6 40. Bd1 Kf7 41. Kd6 Kf6 42. Bc2 Kf7 43. Kd5 Kf6 44.
Ne4+ Kf7 45. Nd2 Kf6 46. Nb1 Kf7 47. Na3 Kf6 48. Nb5 Kf7 49. Bb1 Kf6 50.
Na3 Kf7
{Draw by fifty-move rule} 1/2-1/2
I use a quad core 2.4GHz Core 2 computer, which reaches search depths around 20 ply or more. I guess you don't see the problem because you used a fixed search depth.
The defense strategy I used was to keep the king close to the center but always make sure to have a retreat path into the corner that the bishop can't attack.
-
- Posts: 10889
- Joined: Thu Mar 09, 2006 12:37 am
- Location: Tel-Aviv Israel
Re: Stockfish seems to have trouble with KBNK endings
J suspect that the problem is not at small fixed depth but only at high fixed depthEelco de Groot wrote:Hello Peter,
I can't reproduce the problem with a 32-bit Stockfish 1.7 or Stockfish 1.7.1 at fixed search depth. 60 moves in 120 seconds should certainly be enough to play the endgame well, unless it would be a very old computer. Can you reproduce it with the 32-bit build, preferably the official one? Is this with the official build or did you compile Stockfish yourself?
Regards, Eelco
Here is my game at 120 minutes/40 moves time control against stockfish when stockfish failed to make progress(I used tablebases for black) and I am close to have a drawn position thanks to the 50 move rule if stockfish continue not to make progress)
stockfish got depth 39
Maybe you should try high fixed depth and not small fixed depth with stockfish.
[Event "120'/40+60'/20+30'"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Stockfish 1.7.1 JA"]
[Black "agur"]
[Result "*"]
[SetUp "1"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - - 0 1"]
[PlyCount "32"]
[TimeControl "40/7200:20/3600:1800"]
1. Kb2 {77.27/39 268} Kd4 {2} 2. Nd3 {77.27/38 230} Kd5 {30} 3. Ba2+ {
77.27/39 289} Kd6 {3} 4. Kc3 {77.27/39 307} Ke7 {6} 5. Bc4 {77.27/36 380} Kf6 {
191} 6. Kb2 {77.27/37 248} Kg6 {598} 7. Kc1 {77.27/39 343} Kf6 {241} 8. Kd2 {
77.27/38 229} Kg6 {236} 9. Nf4+ {77.27/39 227} Kg5 {187} 10. Ne6+ {77.27/39 1}
Kf5 {20} 11. Nc7 {77.27/36 204} Ke5 {2121} 12. Ke2 {77.27/37 176} Kd4 {38} 13.
Bg8 {77.27/34 268} Ke4 {3} 14. Be6 {77.27/38 197} Kd4 {424} 15. Kf1 {
77.27/39 173} Kd3 {20} 16. Nb5 {77.27/40 154} Ke4 {17} *
-
- Posts: 10889
- Joined: Thu Mar 09, 2006 12:37 am
- Location: Tel-Aviv Israel
Re: Stockfish seems to have trouble with KBNK endings
I drew it against stockfish
120/40+60/20+30'
Here is the full game
stockfish used 256 mbytes hash single processor and default setting.
Maybe stockfish need coirrespondence time control to win it but I am not sure if correspondence time control is going to help it.
[Event "120'/40+60'/20+30'"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Stockfish 1.7.1 JA"]
[Black "Uri Blass"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - - 0 1"]
[PlyCount "101"]
[TimeControl "40/7200:20/3600:1800"]
1. Kb2 {77.27/39 268} Kd4 {2} 2. Nd3 {77.27/38 230} Kd5 {30} 3. Ba2+ {
77.27/39 289} Kd6 {3} 4. Kc3 {77.27/39 307} Ke7 {6} 5. Bc4 {77.27/36 380} Kf6 {
191} 6. Kb2 {77.27/37 248} Kg6 {598} 7. Kc1 {77.27/39 343} Kf6 {241} 8. Kd2 {
77.27/38 229} Kg6 {236} 9. Nf4+ {77.27/39 227} Kg5 {187} 10. Ne6+ {77.27/39 1}
Kf5 {20} 11. Nc7 {77.27/36 204} Ke5 {2121} 12. Ke2 {77.27/37 176} Kd4 {38} 13.
Bg8 {77.27/34 268} Ke4 {3} 14. Be6 {77.27/38 197} Kd4 {424} 15. Kf1 {
77.27/39 173} Kd3 {20} 16. Nb5 {77.27/40 154} Ke4 {17} 17. Ke2 {77.27/42 151}
Ke5 {27} 18. Bg8 {77.27/39 167} Ke4 {3} 19. Nc7 {77.27/38 128} Kd4 {4} 20. Bh7
{77.27/34 123} Kc5 {865} 21. Ke3 {77.27/36 115} Kc6 {3} 22. Na6 {77.27/38 117}
Kd5 {12} 23. Nb4+ {77.27/38 140} Kc5 {6} 24. Nd3+ {77.27/32 133} Kd5 {5} 25.
Be4+ {77.27/35 128} Kd6 {3} 26. Ba8 {77.27/37 129} Ke6 {13} 27. Nf4+ {
77.27/33 146} Ke5 {19} 28. Bc6 {77.27/34 124} Kf5 {11} 29. Ba4 {77.27/34 130}
Ke5 {21} 30. Kf3 {77.27/38 202} Kf5 {14} 31. Bc2+ {77.27/34 144} Ke5 {2} 32.
Nd3+ {77.27/35 199} Kd5 {5} 33. Ke3 {77.27/31 133} Ke6 {17} 34. Bb3+ {
77.27/31 195} Kf5 {1} 35. Bc4 {77.27/31 126} Kg4 {15} 36. Bb5 {77.27/28 151}
Kg5 {2} 37. Bd7 {77.27/27 145} Kg6 {7} 38. Kd4 {77.27/26 161} Kf6 {22} 39. Nc1
{0.00/30 73} Ke7 {20} 40. Bc6 {0.00/42 101} Kf7 {17} 41. Ke5 {0.00/55 143} Kg6
{17} 42. Bd5 {0.00/71 128} Kg7 {24} 43. Ne2 {72.11/100 122} Kg6 {22} 44. Nf4+ {
72.11/100 0} Kg7 {17} 45. Kf5 {0.00/100 0} Kh7 {12} 46. Ng6 {0.00/100 2} Kg7 {8
} 47. Nh4 {0.00/100 0} Kh7 {25} 48. Kf6 {0.00/100 1} Kh6 {14} 49. Bh1 {
0.00/100 2} Kh5 {15} 50. Ng2 {0.00/100 1} Kh6 {20} 51. Ne1 {0.00/100 1} 1/2-1/2
120/40+60/20+30'
Here is the full game
stockfish used 256 mbytes hash single processor and default setting.
Maybe stockfish need coirrespondence time control to win it but I am not sure if correspondence time control is going to help it.
[Event "120'/40+60'/20+30'"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Stockfish 1.7.1 JA"]
[Black "Uri Blass"]
[Result "1/2-1/2"]
[SetUp "1"]
[FEN "8/8/8/3k4/8/8/8/KBN5 w - - 0 1"]
[PlyCount "101"]
[TimeControl "40/7200:20/3600:1800"]
1. Kb2 {77.27/39 268} Kd4 {2} 2. Nd3 {77.27/38 230} Kd5 {30} 3. Ba2+ {
77.27/39 289} Kd6 {3} 4. Kc3 {77.27/39 307} Ke7 {6} 5. Bc4 {77.27/36 380} Kf6 {
191} 6. Kb2 {77.27/37 248} Kg6 {598} 7. Kc1 {77.27/39 343} Kf6 {241} 8. Kd2 {
77.27/38 229} Kg6 {236} 9. Nf4+ {77.27/39 227} Kg5 {187} 10. Ne6+ {77.27/39 1}
Kf5 {20} 11. Nc7 {77.27/36 204} Ke5 {2121} 12. Ke2 {77.27/37 176} Kd4 {38} 13.
Bg8 {77.27/34 268} Ke4 {3} 14. Be6 {77.27/38 197} Kd4 {424} 15. Kf1 {
77.27/39 173} Kd3 {20} 16. Nb5 {77.27/40 154} Ke4 {17} 17. Ke2 {77.27/42 151}
Ke5 {27} 18. Bg8 {77.27/39 167} Ke4 {3} 19. Nc7 {77.27/38 128} Kd4 {4} 20. Bh7
{77.27/34 123} Kc5 {865} 21. Ke3 {77.27/36 115} Kc6 {3} 22. Na6 {77.27/38 117}
Kd5 {12} 23. Nb4+ {77.27/38 140} Kc5 {6} 24. Nd3+ {77.27/32 133} Kd5 {5} 25.
Be4+ {77.27/35 128} Kd6 {3} 26. Ba8 {77.27/37 129} Ke6 {13} 27. Nf4+ {
77.27/33 146} Ke5 {19} 28. Bc6 {77.27/34 124} Kf5 {11} 29. Ba4 {77.27/34 130}
Ke5 {21} 30. Kf3 {77.27/38 202} Kf5 {14} 31. Bc2+ {77.27/34 144} Ke5 {2} 32.
Nd3+ {77.27/35 199} Kd5 {5} 33. Ke3 {77.27/31 133} Ke6 {17} 34. Bb3+ {
77.27/31 195} Kf5 {1} 35. Bc4 {77.27/31 126} Kg4 {15} 36. Bb5 {77.27/28 151}
Kg5 {2} 37. Bd7 {77.27/27 145} Kg6 {7} 38. Kd4 {77.27/26 161} Kf6 {22} 39. Nc1
{0.00/30 73} Ke7 {20} 40. Bc6 {0.00/42 101} Kf7 {17} 41. Ke5 {0.00/55 143} Kg6
{17} 42. Bd5 {0.00/71 128} Kg7 {24} 43. Ne2 {72.11/100 122} Kg6 {22} 44. Nf4+ {
72.11/100 0} Kg7 {17} 45. Kf5 {0.00/100 0} Kh7 {12} 46. Ng6 {0.00/100 2} Kg7 {8
} 47. Nh4 {0.00/100 0} Kh7 {25} 48. Kf6 {0.00/100 1} Kh6 {14} 49. Bh1 {
0.00/100 2} Kh5 {15} 50. Ng2 {0.00/100 1} Kh6 {20} 51. Ne1 {0.00/100 1} 1/2-1/2
-
- Posts: 28387
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Stockfish seems to have trouble with KBNK endings
One thing is for sure: if it can win not using TT, but not when using TT, there must be a horrible TT bug. A TT is supposed to speed up things, not wreck them...
-
- Posts: 10889
- Joined: Thu Mar 09, 2006 12:37 am
- Location: Tel-Aviv Israel
Re: Stockfish seems to have trouble with KBNK endings
I guess that it is a TT bug but not a horrible TT bug and I believe that inspite of the bug stockfish is significantly stronger in games when it is using TT.hgm wrote:One thing is for sure: if it can win not using TT, but not when using TT, there must be a horrible TT bug. A TT is supposed to speed up things, not wreck them...
Uri
-
- Posts: 726
- Joined: Mon Apr 19, 2010 7:07 pm
- Location: Sweden
- Full name: Peter Osterlund
Re: Stockfish seems to have trouble with KBNK endings
If we are really lucky, it is a horrible TT bug that is easy to fix, and after it has been fixed, stockfish will be even stronger than now. However, I suspect that we will not be that lucky...
My wild guess is that the problem is related to not having a "delay penalty", see http://home.hccnet.nl/h.g.muller/delay.html . However, not many programs seem to use delay penalties, and most programs are still able to win KBNK endings somehow.
My wild guess is that the problem is related to not having a "delay penalty", see http://home.hccnet.nl/h.g.muller/delay.html . However, not many programs seem to use delay penalties, and most programs are still able to win KBNK endings somehow.
-
- Posts: 613
- Joined: Sun Jan 18, 2009 7:03 am
Re: Stockfish seems to have trouble with KBNK endings
It's very hard to say what goes wrong in here, but it looks like a search bug. We will investigate the issue.
Joona Kiiski
-
- Posts: 613
- Joined: Sun Jan 18, 2009 7:03 am
Re: Stockfish seems to have trouble with KBNK endings
Another possibility is that Stockfish search tree is too highly imbalanced which seems to work well in most middlegame and endgame positions, but which can have disastrous effect in KNBK where optimum search tree formation is quite homogenous. Ironically low depth searches may work better than high depth searches where all moves may seem like equal.
Still it's possible that it's only a bug.
Still it's possible that it's only a bug.
Joona Kiiski