Not logged inRybka Chess Community Forum
Up Topic The Rybka Lounge / Computer Chess / Technical questions about Stockfish's search
- By Josef (**) [at] Date 2017-11-11 18:07
Hi,

playing around with Stockfish I came to this position where it ultimately finds a #10:
[img]
r5r1/5ppk/n2p3n/p1pP1P2/1pq1P3/P2N1NQ1/1P5P/4R1RK w - - 0 28
[/img]
Analysis around the depth where it finds the # is

24/48+  00:14       34,718k  2,555k  +126.91  Sd3-f4
24/48  00:15       36,892k  2,554k  +M14  Sd3-f4 Kh7-h8 f5-f6 g7xf6 Dg3-h3 Tg8-g6 Tg1xg6 f7xg6 Dh3xh6+ Kh8-g8 Dh6xg6+ Kg8-f8 Sf4-e6+ Kf8-e7 Dg6-g7+ Ke7-e8 Dg7-f8+ Ke8-d7 Df8xa8 Dc4-f1+ Te1xf1 Sa6-b8 Da8xb8 Kd7-e7 Db8-f8+ Ke7-d7 Df8-d8+
25/28  00:17       40,942k  2,542k  +M10  Sd3-f4 g7-g6 f5xg6+ Tg8xg6 Sf4xg6 Dc4-d4 Sf3xd4 Ta8-g8 Sg6-f8+ Kh7-h8 Dg3-h3 Tg8-g6 Sf8xg6+ Kh8-g7 Sd4-f5+ Kg7-g8 Dh3xh6 f7xg6 Dh6-g7+

I make some observations here I currently don't understand. Maybe someone can explain (I could read it in the source, but that takes time).

Question 1:
I would expect it to find a #10 at the latest (possibly earlier due to search extensions) at depth 20. Actually it does not see it before depth 25. How can that happen? For the most complicated #10, what would be the possible upper bound of the search depth? Could there be positions where Stockfish never finds a #10?

Question 2:
In the line with #14 it displays depth 24/48, but the main line is 27 ply which matches neither number. An explanation could be that the 48 ply line didn't make it into main line but another line with just 3 extensions. But in the #10 line it displays 25/28 and main line has 19 ply only. How can it happen that the main line is shorter than base depth? I guess it has to do with fail, as is the cause for the main line being only 1 ply in the 126.91 line, right? But than it can happen during analysis (and actually happens) that for a long time I only see a very short main line when I would like to see more. Do I have to consider this "bad luck", then?

Question 3:
Immediately before discovering #  Stockfish displays extreme evaluations like 126.91. What's the logic here? What is the highest possible score, and what's the meaning of the 91 cp at that scale?

Question 4:
Looking at 2 more analysis lines, I see

26/20  00:17       42,607k  2,538k  +M10  Sd3-f4 g7-g6 f5xg6+ Tg8xg6 Sf4xg6 Dc4-d4 Sf3xd4 Ta8-g8 Sg6-f8+ Kh7-h8 Dg3-h3 Tg8-g6 Sf8xg6+ Kh8-g7 Sd4-f5+ Kg7-g8 Dh3xh6 f7xg6 Dh6-g7+
27/20  00:18       44,076k  2,534k  +M10  Sd3-f4 g7-g6 f5xg6+ Tg8xg6 Sf4xg6 Dc4-c3 b2xc3 Ta8-g8 Sg6-f8+ Kh7-h8 Dg3-h4 Tg8-g6 Sf8xg6+ Kh8-g7 Sg6-f8+ Sh6-g4 Tg1xg4+ Kg7xf8 Dh4-d8+

Since eval is still #10, why does Stockfish change the line? Is that on purpose or just random fluctuation?

Question 5:
Why is base depth greater thak peak depth in the lines above?

Question 6:
I ran Stockfish single threaded so far. I find engine output in subsequent runs (after restarting the engine, of course) matches to the character (which I appreciate, as I remember some engine authors added artificial randomness which is out of place today since you get natural randomness from multiprocessing, so in Stockfish you can switch between a slower deterministic mode and a faster indeterministic). When repeating the search on all 4 cores I get the expected meandering and, on average, the expected speedup. But, occasionally, it finds the mate after only 3 s (after restarting the engine, of course):

20/35  00:02       16,782k  8,589k  +27.51  Sd3-f4 Kh7-h8 f5-f6 Dc4-d4 Sf3xd4 Sa6-b8 f6xg7+ Kh8-h7 Sf4-h5 Sb8-d7 Dg3xd6 Ta8-a6 Dd6xd7 f7-f5 d5-d6 Ta6xd6 Dd7xd6 Sh6-g4 e4xf5 Sg4-f2+ Kh1-g2 Tg8xg7+ Sh5xg7 c5xd4
21/34  00:03       20,198k  8,878k  +M14  Sd3-f4 Kh7-h8 f5-f6 Dc4-d4 Sf3xd4 Sa6-b8 f6xg7+ Kh8-h7 Sf4-h5 Sb8-d7 Dg3xd6 Tg8-e8 Dd6xd7 Ta8-a6 Dd7xe8 Sh6-g8 De8xg8+ Kh7xg8 Sd4-f5 Ta6-g6 Sf5-e7+ Kg8-h7 Tg1xg6 f7xg6 g7-g8D+ Kh7-h6 Dg8xg6+
22/28  00:03       25,091k  9,013k  +M14  Sd3-f4 Kh7-h8 f5-f6 Dc4-d4 Sf3xd4 Kh8-h7 f6xg7 Sa6-b8 Sf4-h5 Sb8-d7 Dg3xd6 Tg8-e8 Dd6xd7 Ta8-a6 Dd7xe8 Sh6-g8 De8xg8+ Kh7xg8 Sd4-f5 Ta6-g6 Sf5-e7+ Kg8-h7 Tg1xg6 f7xg6 g7-g8D+ Kh7-h6 Dg8xg6+
23/20  00:03       25,363k  9,007k  +M10  Sd3-f4 g7-g6 f5xg6+ Tg8xg6 Sf4xg6 Dc4-c3 b2xc3 Ta8-g8 Sg6-f8+ Kh7-h8 Dg3-h4 Tg8-g6 Sf8xg6+ Kh8-g7 Sg6-f8+ Sh6-g4 Tg1xg4+ Kg7xf8 Dh4-d8+

How is it possible that the engine behaves superscalar on occasions? Wouldn't it be possible to nurture that miraculous behavior?

Best Regards,
Josef
Up Topic The Rybka Lounge / Computer Chess / Technical questions about Stockfish's search

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill