Finding a bug from a specific position in OliThink - Reward

Discussion of chess software programming and technical issues.

Moderator: Ras

OliverBr
Posts: 797
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Finding a bug from a specific position in OliThink - Reward

Post by OliverBr »

Hello together,

there is a bug in OliThink 5.10.1 (probably most versions before, too), which I would like to find.
Unfortunately I don't have the time with a baby and much work to look for it myself.

So I am asking you to find it and there is a reward involved. Finding or helping to find the bug, thus improving the ELO of OliThink brings a donate from my side :)

The only move by all engines in the following position (black to move) is Kxa7:

[fen]8/R5P1/1k3P2/1b6/4K3/p5r1/8/8 b - - 1 67[/fen]

During Search OliThink comes to the idea that Bc4 was a better move. This is wrong. Some iterations later it goes back to Kxa7

Here is Evaluation from OliThink 5.10.1. It can easily be reproduced by analyzing this position.

Code: Select all

 22	+3.78 	42.3M  	0:09.59	Kxa7 2. f7 Bc6 3. Kf4 Rf3 4. Kg4 a2 5. f8=Q Rxf8 6. gxf8=Q a1=Q 7. Qc5 Kb7 8. Qb4 Kc7 9. Qf4 Kd8 10. Kf5 Qb1 11. Kg5 Qd3 12. Qf5 Qg3 13. Qg4 Qe3 14. Qf4 Qc5 15. Qf5 Bd5 16. Qe5 Kc8 17. Kg6 Qg1 18. Kh6 Qc5  
 21	+3.75 	39.7M  	0:08.98	Kxa7 2. f7 Bc6 3. Kf4 Rf3 4. Kg4 a2 5. f8=Q Rxf8 6. gxf8=Q a1=Q 7. Qc5 Kb7 8. Qb4 Kc7 9. Qf4 Kd8 10. Kf5 Qb1 11. Kg5 Bd7 12. Qf8 Kc7 13. Qc5 Kb7 14. Qd5 Bc6 15. Qd4 Qf1 16. Kg6  
 20	+3.74 	38.5M  	0:08.72	Kxa7 2. f7 Bc6 3. Kf4 Rf3 4. Kg4 a2 5. f8=Q Rxf8 6. gxf8=Q a1=Q 7. Qc5 Kb7 8. Qb4 Kc7 9. Qf4 Kd8 10. Kf5 Bd7 11. Kg6 Be8 12. Kg5 Qg1 13.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 Rf3 4. Kg4 a2 5. f8=Q Rxf8 6. gxf8=Q a1=Q 7. Qc5 Kb7 8. Kf5 Qa4 9. Kf6 Qh4 10. Qg5  
 11	+3.60 	26706  	0:00.00	Kxa7 2. f7 Bc6 3. Kf4 Rf3 4. Kg4 a2 5. f8=Q Rxf8 6. gxf8=Q a1=Q 7. Qb4 Bd5  
 10	+3.61 	17027  	0:00.00	Kxa7 2. f7 Bc6 3. Kf4 Rf3 4. Kg4 a2 5. f8=Q Rxf8 6. gxf8=Q a1=Q 7. Kh4  
  9	+3.61 	11143  	0:00.00	Kxa7 2. f7 Bc6 3. Kf4 Rf3 4. Kg4 a2 5. f8=Q Rxf8 6. gxf8=Q a1=Q  
  8	+3.61 	7552    	0:00.00	Kxa7 2. f7 Bc6 3. Kf4 Rf3 4. Kg4 a2 5. f8=Q Rxf8  
  7	+1.83 	4702    	0:00.00	Kxa7 2. f7 a2 3. f8=Q a1=Q 4. Qf2 Ka6 5. Qxg3  
  6	+3.61 	803      	0:00.00	Kxa7 2. f7 a2 3. f8=Q a1=Q 4. g8=Q  
  5	+3.61 	456      	0:00.00	Kxa7 2. f7 a2 3. f8=Q a1=Q  
  4	+3.61 	204      	0:00.00	Kxa7 2. f7 a2 3. f8=Q  
  3	+3.61 	109      	0:00.00	Kxa7 2. f7 a2  
  2	+5.65 	37        	0:00.00	Kxa7 2. f7  
  1	+5.65 	18        	0:00.00	Kxa7  
PS: Why doesn't the FEN display work anymore?

Here the complete game, just forward to the end to see the position:

[pgn]
1. Nf3
{[%eval 0,1] [%emt 00:00:00]}
1... d5
{[%eval 0,1] [%emt 00:00:00]}
2. g3
{[%eval 0,1] [%emt 00:00:00]}
2... Bg4
{[%eval 0,1] [%emt 00:00:00]}
3. Bg2
{[%eval 0,1] [%emt 00:00:00]}
3... Nd7
{[%eval 0,1] [%emt 00:00:00]}
4. O-O
{[%eval 0,1] [%emt 00:00:00]}
4... e6
{[%eval 0,1] [%emt 00:00:00]}
5. d3
{[%eval 0,1] [%emt 00:00:00]}
5... Bd6
{[%eval 0,1] [%emt 00:00:00]}
6. c4
{[%eval 0,1] [%emt 00:00:00]}
6... c6
{[%eval 0,1] [%emt 00:00:00]}
7. Qb3
{[%eval 0,1] [%emt 00:00:00]}
7... Qb6
{[%eval 0,1] [%emt 00:00:00]}
8. Be3
{[%eval 0,1] [%emt 00:00:00]}
8... Qxb3
{[%eval 0,1] [%emt 00:00:00]}
9. axb3
{[%eval -16,18] [%emt 00:00:25]}
9... a6
{(Ne7) [%eval 2,25] [%emt 00:00:18]}
10. Rc1
{(cxd5) [%eval -6,21] [%emt 00:01:04]}
10... Ne7
{(Ne7) [%eval 0,26] [%emt 00:00:24]}
11. c5
{(Bd2) [%eval -3,21] [%emt 00:00:17]}
11... Bc7
{(Bc7) [%eval 13,25] [%emt 00:00:18]}
12. Ra4
{(Bd2) [%eval -4,23] [%emt 00:00:17]}
12... h5
{(Bxf3) [%eval 30,27] [%emt 00:00:22]}
13. Bf4
{(Bf4) [%eval -29,21] [%emt 00:01:16]}
13... e5
{(e5) [%eval 39,28] [%emt 00:00:26]}
14. Bd2
{(Bd2) [%eval -32,21] [%emt 00:00:15]}
14... f6
{(b5) [%eval 34,27] [%emt 00:00:22]}
15. h3
{(h4) [%eval -34,19] [%emt 00:00:27]}
15... Be6
{(Be6) [%eval 41,26] [%emt 00:00:20]}
16. Ba5
{(h4) [%eval -37,19] [%emt 00:00:16]}
16... Bxa5
{(Bxa5) [%eval 76,29] [%emt 00:00:19]}
17. Rxa5
{(Rxa5) [%eval -42,21] [%emt 00:00:19]}
17... g5
{(g5) [%eval 91,27] [%emt 00:00:47]}
18. e3
{(Nfd2) [%eval -43,19] [%emt 00:00:27]}
18... Ng6
{(g4) [%eval 80,27] [%emt 00:00:50]}
19. Nc3
{(Nfd2) [%eval -26,21] [%emt 00:00:33]}
19... Ke7
{(g4) [%eval 74,24] [%emt 00:00:21]}
20. b4
{(Ne2) [%eval -28,20] [%emt 00:00:58]}
20... g4
{(Bxh3) [%eval 93,28] [%emt 00:00:19]}
21. hxg4
{(hxg4) [%eval -59,20] [%emt 00:00:37]}
21... hxg4
{(Bxg4) [%eval 95,29] [%emt 00:00:19]}
22. Nd2
{(Nd2) [%eval -31,20] [%emt 00:00:15]}
22... f5
{(f5) [%eval 93,28] [%emt 00:00:30]}
23. Rca1
{(Re1) [%eval -35,19] [%emt 00:00:21]}
23... f4
{(Rad8) [%eval 147,25] [%emt 00:00:19]}
24. b5
{(gxf4) [%eval -26,23] [%emt 00:01:31]}
24... f3
{(cxb5) [%eval 135,27] [%emt 00:00:22]}
25. bxc6
{(bxc6) [%eval -75,23] [%emt 00:01:12]}
25... bxc6
{(bxc6) [%eval 169,28] [%emt 00:00:20]}
26. Nxf3
{(Nxf3) [%eval -75,23] [%emt 00:00:23]}
26... gxf3
{(gxf3) [%eval 179,27] [%emt 00:00:20]}
27. Bxf3
{(Bxf3) [%eval -70,24] [%emt 00:00:13]}
27... Raf8
{(Raf8) [%eval 187,26] [%emt 00:00:23]}
28. Bg2
{(Bg2) [%eval -67,23] [%emt 00:00:18]}
28... Nb8
{(Nb8) [%eval 168,27] [%emt 00:00:21]}
29. R5a4
{(Na2) [%eval -63,23] [%emt 00:00:19]}
29... Kf7
{(Kf6) [%eval 165,25] [%emt 00:00:47]}
30. Na2
{(Rb4) [%eval -63,18] [%emt 00:00:13]}
30... Ne7
{(Kf6) [%eval 165,25] [%emt 00:00:26]}
31. Nb4 {-1.61/28 20} Bc8 {+1.60/23 8} 32. Ra5 {-1.50/29 16} Rfg8
{+1.70/23 7} 33. R1a4 {-1.58/29 10} Kf6 {+1.64/23 8} 34. Ra3 {-1.54/25 5}
Nf5 {+1.86/25 19} 35. Nc2 {-1.55/26 8} d4 {+1.67/21 7} 36. exd4
{-1.66/28 10} Nxd4 {+1.63/30 0.6} 37. Nxd4 {-1.32/29 6} exd4 {+1.67/29 5}
38. R5a4 {-1.33/28 2.2} Rg5 {+1.79/24 10} 39. Rxd4 {-1.14/29 11} Rxc5
{+1.44/27 5} 40. Rc3 {-1.14/34 26} Rb5 {+1.61/29 18} 41. Bxc6 {-0.74/28 3}
Nxc6 {+1.79/23 0.1} 42. Rxc6+ {-0.73/28 3} Ke5 {+1.68/25 3} 43. Rdd6
{-0.63/29 0.7} Bb7 {+1.68/25 1.8} 44. f4+ {-0.75/30 2.8} Kf5 {+1.51/24 2.7}
45. Rb6 {-0.78/30 0.5} Rh1+ {+1.52/27 8} 46. Kf2 {-0.76/33 1.0} Rxb2+
{+1.51/27 1.4} 47. Rxb2 {-0.77/34 3} Rh2+ {+1.75/25 1.7} 48. Ke3
{-0.77/35 1.0} Rxb2 {+1.58/25 3} 49. Rh6 {-0.77/35 7} Rg2 {+1.54/24 3} 50.
Rh5+ {-0.77/35} Ke6 {+1.40/22 3} 51. Rh6+ {-0.68/30 0.5} Kd5 {+1.57/21 2.9}
52. Rg6 {-0.68/29 2.9} Rg1 {+1.60/23 0.8} 53. Rg5+ {-0.81/30 4} Kd6
{+1.62/22 0.2} 54. g4 {-0.81/32 4} Re1+ {+1.58/21 2.9} 55. Kf2 {-0.59/26 7}
Rh1 {+1.69/21 3} 56. Rf5 {-0.63/25 2.5} Rh2+ {+1.41/21 6} 57. Ke3
{-0.43/27 1.3} Bc6 {+1.26/22 1.9} 58. g5 {-0.13/24 2.5} Rh3+ {+0.96/22 8}
59. Kd4 {-0.13/31 2.8} Bb5 {+0.85/23 4} 60. g6 {-0.23/31} Rxd3+
{+1.24/19 4} 61. Ke4 {-1.17/25 1.0} Rg3 {+1.15/23 2.0} 62. Rf6+
{-0.47/26 2.2} Kc5 {+1.62/22 4} 63. f5 {-1.27/29 4} a5 {+1.79/25 1.5} 64.
Rf7 {-1.31/28 1.3} a4 {+1.76/21 1.6} 65. g7 {-1.34/27 1.4} Kb6
{+2.23/20 2.9} 66. f6 {-1.25/29} a3 {+0.40/20 4} 67. Ra7 {-1.20/39}
*
[/pgn]
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
jonkr
Posts: 178
Joined: Wed Nov 13, 2019 1:36 am
Full name: Jonathan Kreuzer

Re: Finding a bug from a specific position in OliThink - Reward

Post by jonkr »

I'm guessing there is no bug? Unless I have a bug in Slow Chess :)
With 5-man tablebases it's showing at least 5 moves including Bc4 as 0.00 draws
SlowChess Blitz 2.83 avx2 (512 MB hash, 1 thread)
FEN: 8/R5P1/1k3P2/1b6/4K3/p5r1/8/8 b - - 1 67

1. [19] 0.00 Bc6+ Kf4 Kxa7 f7 Rf3+ Kg4 Rxf7 g8=Q Bd5 Qd8 Be6+ Kg5 Kb7 Qd4 Rf5+ Kg6 a2 Qe4+ Kc7 Qxe6 <table>
2. [19] 0.00 Kxa7 f7 a2 f8=Q Bc6+ Kf4 a1=Q Qc5+ Kb7 Kxg3 Qe1+ Kg4 Bd7+ Kg5 Qe6 Qb4+ Ka6 g8=Q Qxg8+ <table>
3. [19] 0.00 Bc4 f7 Bxf7 Rxf7 a2 Rf1 Kb5 Ra1 Rxg7 <table>
4. [19] 0.00 Bd3+ Kf4 Kxa7 f7 Rxg7 f8=Q Rd7 Qc5+ Kb7 Qb4+ Kc6 Qa5 Bb5 Qxa3 <table>
5. [19] 0.00 Rg4+ Kf3 Kxa7 f7 a2 f8=Q a1=Q Qc5+ Kb7 Qxb5+ Kc7 Kxg4 <table>
abulmo2
Posts: 467
Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme

Re: Finding a bug from a specific position in OliThink - Reward

Post by abulmo2 »

OliverBr wrote: Thu Feb 10, 2022 1:36 am [fen]8/R5P1/1k3P2/1b6/4K3/p5r1/8/8 b - - 1 67[/fen]

During Search OliThink comes to the idea that Bc4 was a better move. This is wrong. Some iterations later it goes back to Kxa7
Looks like both Bc4 and Kxa7 are drawish moves. According to stockfish 12 with table base:

Code: Select all

info depth 34 seldepth 25 multipv 1 score cp 0 nodes 13144818 nps 1382937 hashfull 1000 tbhits 483420 time 9505 pv b6a7 f6f7 b5c6 e4f4 g3f3 f4g4 f3f7 g7g8q c6d5 g8d8 d5e6 g4h5 a3a2 d8d4 a7b8 d4d6 f7c7 d6b6 c7b7 b6d8 e6c8 d8a5 b7c7 a5a2
info depth 34 seldepth 25 multipv 2 score cp 0 nodes 13144818 nps 1382937 hashfull 1000 tbhits 483420 time 9505 pv b5c6 e4f4 b6a7 f6f7 g3f3 f4g4 f3f7 g7g8q c6d5 g8d8 d5e6 g4h5 a3a2 d8d4 a7b8 d4d6 f7c7 d6b6 c7b7 b6d8 e6c8 d8a5 b7c7 a5a2
info depth 34 seldepth 10 multipv 3 score cp 0 nodes 13144818 nps 1382937 hashfull 1000 tbhits 483420 time 9505 pv b5c4 f6f7 c4f7 a7f7 a3a2 f7f1 b6a5 f1a1 g3g7
info depth 34 seldepth 9 multipv 4 score cp 0 nodes 13144818 nps 1382937 hashfull 1000 tbhits 483420 time 9505 pv b5d3 e4f4 b6a7 f6f7 g3g7 f7f8q g7d7 f8a3
Richard Delorme
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Finding a bug from a specific position in OliThink - Reward

Post by hgm »

The fen BBcodes have to be on the same line as the fen. You had those on separate lines. I now corrected that.
Guenther
Posts: 4718
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Finding a bug from a specific position in OliThink - Reward

Post by Guenther »

hgm wrote: Thu Feb 10, 2022 8:16 am The fen BBcodes have to be on the same line as the fen. You had those on separate lines. I now corrected that.
doesn't work here
https://rwbc-chess.de

[Trolls n'existent pas...]
User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

Re: Finding a bug from a specific position in OliThink - Reward

Post by mvanthoor »

OliverBr wrote: Thu Feb 10, 2022 1:36 am ...
My not-so-strong ~2160 engine starts out with Kxa7, but at depth 12 and up, it starts doubting between Kxa7 and Bxc4. I don't know how deep it would need to go to come to a definite conclusion, because it gets 'stuck' at depth 15. (The engine doesn't have any pruning yet.)

Code: Select all

go
info score cp 525 depth 1 seldepth 4 time 0 nodes 44 nps 0 pv b6a7
info score cp 536 depth 2 seldepth 5 time 0 nodes 441 nps 0 pv b5c6 e4f5 b6a7
info score cp 538 depth 3 seldepth 8 time 1 nodes 1722 nps 1722000 pv b6a7 e4f4 g3g1
info score cp 531 depth 4 seldepth 9 time 4 nodes 7137 nps 1784250 pv b6a7 e4f4 g3g2 f4e4
info score cp 462 depth 5 seldepth 11 time 8 nodes 33201 nps 4150125 pv b6a7 f6f7 b5c6 e4e5 g3e3 e5d4 e3e1
info score cp 66 depth 6 seldepth 12 time 22 nodes 127979 nps 5817227 pv b6a7 f6f7 a3a2 g7g8q g3e3 e4e3 a2a1q
info score cp 554 depth 7 seldepth 15 time 54 nodes 353877 nps 6553278 pv b6a7 f6f7 b5c6 e4f4 g3f3 f4e5 a3a2 g7g8q a2a1q e5e6
info score cp 271 depth 8 seldepth 16 time 178 nodes 1231098 nps 6916281 hashfull 2 pv b6a7 f6f7 b5c6 e4f4 g3f3 f4g5 a3a2 g7g8q a2a1q f7f8q f3f8 g8f8
info score cp 271 depth 9 seldepth 18 time 519 nodes 3572990 nps 6884374 hashfull 8 pv b6a7 f6f7 b5c6 e4f4 g3f3 f4g5 a3a2 f7f8q f3f8 g7f8q a2a1q
info score cp 240 depth 10 seldepth 19 time 1970 nodes 13443403 nps 6824062 hashfull 27 pv b6a7 f6f7 b5c6 e4f4 g3f3 f4g5 a3a2 f7f8q f3f8 g7f8q a2a1q g5g6
info score cp 268 depth 11 seldepth 22 time 5425 nodes 35942037 nps 6625260 hashfull 73 pv b6a7 f6f7 b5c6 e4f4 g3f3 f4g4 a3a2 f7f8q f3f8 g7f8q a2a1q f8e7 a7b8 g4f5
info score cp 248 depth 12 seldepth 24 time 17337 nodes 112612282 nps 6495488 hashfull 202 pv b5c4 a7d7 g3g1 f6f7 c4f7 d7f7 a3a2 f7f6 b6a5 f6f5 a5b4
info score cp 259 depth 13 seldepth 25 time 37884 nodes 240707906 nps 6353814 hashfull 399 pv b6a7 f6f7 b5c6 e4f4 g3f3 f4g5 a3a2 f7f8q f3f8 g7f8q a2a1q f8c5 a7b7 c5b4 b7a6 b4c4 c6b5 c4e6 a6b7
info score cp 265 depth 14 seldepth 28 time 85373 nodes 530345240 nps 6212096 hashfull 692 pv b5c4 f6f7 c4f7 a7f7 a3a2 f7f1 g3g7 e4d5 g7a7 f1a1 a7a3 d5e6 b6c5 e6f6
info score cp 244 depth 15 seldepth 30 time 326763 nodes 2109964902 nps 6457172 hashfull 942 pv b6a7 f6f7 b5c6 e4f4 g3f3 f4g5 a3a2 f7f8q f3f8 g7f8q a2a1q f8c5 a7b7 c5b4 b7a6 b4c4 a6b6 c4b4 b6c7 b4e7 c7c8 g5g6
So... it doesn't seem a bug to me. In the case of my engine, it would come down to the time control that is used, which would make the engine play either Kxa7 or Bc4 depending on the depth it happens to end on.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Finding a bug from a specific position in OliThink - Reward

Post by hgm »

Guenther wrote: Thu Feb 10, 2022 10:02 am
hgm wrote: Thu Feb 10, 2022 8:16 am The fen BBcodes have to be on the same line as the fen. You had those on separate lines. I now corrected that.
doesn't work here
You are probably accessing talkchess.com as https. Then you cannot see the http stuff, for security reasons.