probability for fail low after fail high

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

Uri Blass
Posts: 11222
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

probability for fail low after fail high

Post by Uri Blass »

I did not do statistics calculation but from watching analysis of stockfish
I get the impression that in most of the cases there is going to be a fail low after fail high and in most of the cases there is going to be a fail high after fail low.

My question is the following:

1)Is there a tool to calculate probability to get fail low in an iteration after fail high and probability to get fail high in an iteration after fail low?

The tool can simply get 1,000 positions and analyze everyone of them for
at least 10 seconds(when it always finish the iteration that the engine got after 10 seconds) and based on the output tell me the probability for fail high after fail low and the probability for fail low after fail high.

I think that it is interesting to get this information for different engines.

The result should be something like the following:

10000 fail high after at least 1 second of analysis:
After them we have the following probabilities:

1)30% fail high again
2)51% fail low
3)19% end of the iteration.

9000 fail low after at least 1 second of analysis
1)53% fail high
2)26% fail low
3)21% end of the iteration.

number of fail high and fail low can be clearly bigger than the number of position because the same position may have 20 fail high and 20 fail low after at least 1 second.

It may be interesting to have statistics also for fail high and fail low that happen faster after less than 0.1 second to see if there is a difference between it and what happens in longer time control.
Dann Corbit
Posts: 12870
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: probability for fail low after fail high

Post by Dann Corbit »

Stockfish has the famous "sewing machine" effect on fail high/fail low.
Because they print out the nonsense scores for each file high and each fail low, the output can become very polluted. So I had to invent a UCI option to turn the noise off.
I guess that most other engines will behave differently than stockfish.
Even so, whatever Stockfish is doing in the search must be pretty good or it would not win all those games.
User avatar
Eelco de Groot
Posts: 4724
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: probability for fail low after fail high

Post by Eelco de Groot »

Dann Corbit wrote:Stockfish has the famous "sewing machine" effect on fail high/fail low.
Because they print out the nonsense scores for each file high and each fail low, the output can become very polluted. So I had to invent a UCI option to turn the noise off.
Louis mentioned a long while ago that Stockfish can do that in its own logging (when that code was still in the official base), so not the UCI output. Not much use in a GUI but for private uses maybe it is useful to know. I just thought I'd mention it, since you resurrected the logging code Dann.
I guess that most other engines will behave differently than stockfish.
Even so, whatever Stockfish is doing in the search must be pretty good or it would not win all those games.
I'm not sure, private engines can suppress the fail highs and lows in their output. The concern I had is not that I think the code is not tuned almost optimally but that at long time controls, or if you simulate that at STC, Marco and Joona et al. would use hash pressure to simulate that, that the re-searches take much longer if hash entries are being replaced. Just because there is not enough memory, old entries have to go but you immediately need them again because you are basically are searching the exact same tree, only with a bit wider window. That is why I think at long time controls you profit from very large hash in Stockfish, and maybe it could be a little bit less if the search was different. (I don't have a computer with much memory, so I can not really check this).
I used to think that in the case of asymmetric windows, it was better to make them a bit wider on the underside, so that you prevent cases of false fail lows making alpha too low and inferior moves get tested unnecessarily in PV search. But now I'm not so sure anymore, if that is not actually the most important feature of the way Stockfish does its search :) Vas mentioned that once, years ago, that he artificially lowered alpha just for this purpose. But that may have been a red herring, absolutely.

Anyway most times the re-searches mean there is no clear move to find and eval is going up and down, because there is no clear pattern to search for in that particular position. That does not mean there is no pattern, but the program does not have one available for that particular situation, or it is not tuned right.
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
User avatar
Eelco de Groot
Posts: 4724
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: probability for fail low after fail high

Post by Eelco de Groot »

You can improve the time to depth in other ways. I am not talking about time to solution, I do not really know if it is better or worse. But what I posted in the thread from Carl Bicknell

[d]r3k2r/1q2bp2/2b1p2p/pp2p1pP/4N1P1/PP1Q1P2/2P5/1KBR3R w q -

Engine: Sf20150412_002 MOD MP (512 MB)
by Tord Romstad, Marco Costalba and Joona Kiiski
.
.
.
32/54 17:11 -0.69 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rhf1 Rd8 30.Rxd8+ Bxd8 31.Kc1 Rh7
32.Rf3 Rd7 33.Rc3 Rd4 34.Re3 Rd6
35.a4 bxa4 36.bxa4 Rd7 37.Rb3 Rc7
38.Rc3 Rb7 39.Rb3 (2.778.853.919) 2694

33/54 18:59 -0.63++ 26.Bb2 (3.137.671.333) 2753

33/54 19:55 -0.69-- 26.Bb2 Bxe4 (3.306.432.439) 2766

33/54 20:01 -0.63++ 26.Bb2 (3.326.201.004) 2767

33/54 20:42 -0.71-- 26.Bb2 Bxe4 (3.441.957.418) 2769

33/57 21:45 -0.60++ 26.Bb2 (3.638.973.410) 2788

33/57 23:04 -0.72 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rh3 Rc8 30.Rhd3 Rh7 31.Bc3 a4
32.Kb2 Rf7 33.Rf3 Rd8 34.Rxd8+ Bxd8
35.Bb4 axb3 36.cxb3 Rd7 37.Kc3 Be7
38.Bxe7 Kxe7 39.Re3 (3.880.936.444) 2803

34/57 24:28 -0.66++ 26.Bb2 (4.138.120.530) 2818

34/57 25:32 -0.72-- 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 Rc8 30.Rf1 a4 31.Bc3 Ra8
32.Bb2 Ra6 33.Rfd1 Ra7 34.Rc3 Kf7
35.Rc6 Rd8 36.Rxd8 Bxd8 37.Rc8 Rd7
38.c4 bxc4 39.bxc4 (4.324.396.731) 2821

34/57 26:08 -0.71 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 Rc8 30.Rf1 Rf8 31.Bc3 b4
32.axb4 axb4 33.Bb2 Rb8 34.Rfd1 Rb7
35.Rf1 Rd7 36.Rxd7 Kxd7 37.c4 bxc3
38.Bxc3 Kc6 39.Kc2 (4.421.884.784) 2819

35/58 26:53 -0.65++ 26.Bb2 (4.561.558.683) 2827

35/58 28:14 -0.71-- 26.Bb2 Bxe4 (4.782.270.531) 2821

35/58 28:43 -0.65++ 26.Bb2 (4.860.561.423) 2820

35/62 32:36 -0.72-- 26.Bb2 Bxe4 (5.552.236.245) 2837

35/62 33:28 -0.71 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 Rc8 30.Rf1 a4 31.Bc3 Ra8
32.Bb2 Ra6 33.Rfd1 Ra7 34.Rc3 Kf7
35.Rc6 Rd8 36.Rxd8 Bxd8 37.Rc5 Rb7
38.Rc8 Be7 39.b4 (5.685.668.045) 2830

36/62 34:58 -0.65++ 26.Bb2 (5.949.090.880) 2835

36/62 37:31 -0.71-- 26.Bb2 Bxe4 (6.376.072.872) 2832

36/62 38:25 -0.65++ 26.Bb2 (6.534.139.225) 2834

36/62 47:30 -0.73-- 26.Bb2 Bxe4 (8.138.272.129) 2855

36/62 48:55 -0.62++ 26.Bb2 (8.398.564.610) 2861

36/62 52:37 -0.63 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 Rc8 30.Rf1 Rf8 31.Bc3 b4
32.axb4 axb4 33.Bb2 Rc5 34.Kc1 Rc6
35.c4 bxc3 36.Rxc3 Kd7 37.Rxc6 Kxc6
38.Kc2 Ra8 39.Rc1 (9.042.411.366) 2863

37/63 62:27 -0.69-- 26.Bb2 Bxe4 (10.831.066.123) 2890

37/63 63:53 -0.63++ 26.Bb2 (11.083.001.012) 2890

37/63 64:43 -0.69-- 26.Bb2 Bxe4 (11.225.236.455) 2890

37/63 66:46 -0.61++ 26.Bb2 (11.600.445.271) 2895

37/64 72:11 -0.72-- 26.Bb2 Bxe4 (12.504.101.410) 2886

37/65 84:44 -0.56++ 26.Bb2 (14.932.768.153) 2936

37/65 125:03 -0.77 26.Rhe1 Qc7 27.Bb2 Rd8 28.Qf1 Rxd1+
29.Rxd1 f6 30.Qd3 Qd7 31.Qe2 Qb7
32.a4 Bxe4 33.Qxe4 Qxe4 34.fxe4 bxa4
35.bxa4 Rf8 36.Kc1 Bc5 37.Bc3 Ke7
38.Kd2 f5 39.Bxe5 (21.898.481.930) 2918

38/65 133:33 -0.71++ 26.Rhe1 (23.157.647.903) 2889

38/65 146:04 -0.65++ 26.Bb2 (25.131.894.289) 2867

38/65 148:13 -0.71-- 26.Bb2 Bxe4 (25.473.172.401) 2864

38/68 153:21 -0.63++ 26.Bb2 (26.399.308.782) 2868

38/68 157:45 -0.65 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rhf1 Rd8 30.Rxd8+ Kxd8 31.Bc3 b4
32.axb4 axb4 33.Bd2 Kd7 34.Kc1 Ra8
35.Kd1 Ra1+ 36.Ke2 Ra7 37.Be3 Ra2
38.Kd3 Ke8 39.Kd2 (27.100.749.494) 2863

39/68 191:58 -0.71-- 26.Bb2 Bxe4 (31.892.119.192) 2768

39/68 198:51 -0.65++ 26.Bb2 (33.085.746.914) 2773

39/68 209:04 -0.71-- 26.Bb2 Bxe4 (34.879.923.372) 2780

39/68 213:11 -0.63++ 26.Bb2 (35.589.812.943) 2782

39/69 226:32 -0.74-- 26.Bb2 Bxe4 (37.892.646.150) 2787

39/69 240:46 -0.58++ 26.Bb2 (40.542.791.531) 2806

39/69 275:43 -0.73 26.Rhe1 Qc7 27.Bb2 Rd8 28.Qe2 Rxd1+
29.Rxd1 f6 30.c4 b4 31.axb4 axb4
32.Qd3 Rg8 33.Kc2 Kf7 34.Nf2 Qb7
35.Ne4 Qc8 36.Nd2 Rg7 37.Ne4 Qc7
38.Qe3 Kg8 39.Ra1 (46.936.452.775) 2837

40/69 289:10 -0.67++ 26.Rhe1 (49.309.741.383) 2842

40/69 304:55 -0.73-- 26.Rhe1 Qc7 (52.131.732.383) 2849

40/69 310:56 -0.67++ 26.Rhe1 (53.202.878.435) 2851

40/69 330:57 -0.75-- 26.Rhe1 Qc7 (56.778.211.986) 2859

40/73 344:46 -0.64++ 26.Rhe1 (59.304.478.254) 2866

40/73 390:34 -0.68 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rhf1 Rc8 30.Rd3 a4 31.Bc3 Rf8
32.Kb2 axb3 33.cxb3 Rc7 34.Rf2 Ra7
35.b4 Rd7 36.Rxd7 Kxd7 37.Kb3 Ra8
38.Be1 Rc8 39.Bc3 (67.520.794.800) 2881

41/73 442:59 -0.75-- 26.Bb2 Bxe4 (76.959.897.750) 2895

41/73 454:48 -0.68++ 26.Bb2 (79.172.140.561) 2901

41/73 471:07 -0.75-- 26.Bb2 Bxe4 (82.325.360.801) 2912

41/73 479:30 -0.67++ 26.Bb2 (83.992.815.856) 2919

41/73 562:47 -0.68 26.Rhe1 Qc7 27.Bb2 Rd8 28.Qe2 f6
29.c4 b4 30.axb4 Rxd1+ 31.Rxd1 axb4
32.Rd2 Kf7 33.Rd1 Kg7 34.Qc2 Rd8
35.Rxd8 Qxd8 36.Qe2 Kf8 37.Kc2 Qd7
38.Qe3 Kg7 39.Qe2 (99.680.708.891) 2952

42/73 626:01 -0.64 26.Rhe1 Qc7 27.Bb2 Rd8 28.Qe2 f6
29.c4 b4 30.axb4 axb4 31.Rd3 Rxd3
32.Qxd3 Qd8 33.Qe2 Kf7 34.Rf1 Kg8
35.Qe3 Rh7 36.Kc1 Qc7 37.Rd1 Rf7
38.Ng3 Kh8 39.Ne4 (111.324.032.370) 2963

43/73 720:32 -0.70-- 26.Rhe1 Qc7 (128.469.958.448) 2971

43/73 750:37 -0.64++ 26.Rhe1 (134.049.438.810) 2976

43/73 770:36 -0.70-- 26.Rhe1 Qc7 (137.627.500.339) 2976

43/73 797:43 -0.62++ 26.Rhe1 (142.565.201.556) 2978

43/73 928:12 -0.73 26.Rhe1 Qc7 27.c4 Rd8 28.Qe2 Rxd1
29.Rxd1 b4 30.axb4 axb4 31.Qd3 Rg8
32.Kb2 Kf8 33.Kc2 Kg7 34.Bb2 Ra8
35.Qe3 Kg8 36.Ra1 Rxa1 37.Bxa1 Qa5
38.Bb2 f6 39.Qd3 (164.876.372.552) 2960

44/76 1098:19-0.67++ 26.Rhe1 (197.471.955.869) 2996

44/76 1192:06-0.73-- 26.Rhe1 Qc7 (214.448.589.316) 2998

44/76 1265:51-0.67++ 26.Rhe1 (228.062.365.025) 3002

best move: Rh1-e1 time: 1272:24.253 min n/s: 3.002.753 nodes: 229.208.215.176

I did nothing about Fail Highs and Lows, but increased reductions in version _003 make the picture very different at least in time to depth

r3k2r/1q2bp2/2b1p2p/pp2p1pP/4N1P1/PP1Q1P2/2P5/1KBR3R w q -

Engine: Rainbow Serpent Sf20150412_003 MOD MP (Q6700, 32 bit, 4 threads, 512 MB)
Change: Use Nullmove R formula also for cheap 'MultiCut'
by Tord Romstad, Marco Costalba and Joona Kiiski
.
.
.
32/54 8:24 -0.70 26.Rhe1 Qc7 27.Bb2 Rd8 28.Qe2 f6
29.c4 b4 30.axb4 axb4 31.Qc2 Rg8
32.Rd2 Rxd2 33.Qxd2 Kf7 34.Qd3 Qd7
35.Qc2 Rg7 36.Rd1 Qc7 37.Qe2 Kg8
38.Nf2 Kh8 39.Nd3 (1.456.009.892) 2883

33/56 13:17 -0.76-- 26.Rhe1 Qc7 27.c4 Rd8 28.Qe2 b4
29.Rxd8+ Kxd8 30.axb4 Bxb4 31.Rd1+ Ke7
32.Bb2 Rd8 33.Rxd8 Kxd8 34.Nf6 Kc8
35.Bxe5 Qb7 36.Qd3 Bxf3 37.Kc1 Bc6
38.Qh7 Qb6 39.Qh8+ (2.298.091.269) 2882

33/56 15:02 -0.70++ 26.Rhe1 (2.600.265.754) 2881

33/56 15:22 -0.76-- 26.Rhe1 Qc7 (2.659.353.211) 2882

33/56 15:56 -0.71 26.Rhe1 Qc7 27.c4 b4 28.a4 Rd8
29.Qe3 f6 30.Qe2 Rxd1 31.Rxd1 Rg8
32.Qd3 Kf7 33.Nd2 Rg7 34.Qc2 Kg8
35.Bb2 Kh8 36.Ne4 Rg8 37.Nd2 Qc8
38.Ne4 Rd8 39.Kc1 (2.757.875.282) 2882

34/56 16:41 -0.65++ 26.Rhe1 (2.888.411.717) 2884

34/56 16:57 -0.71-- 26.Rhe1 Qc7 (2.933.756.660) 2884

34/58 23:27 -0.65++ 26.Bb2 (4.072.385.775) 2893

34/58 24:06 -0.73-- 26.Bb2 Bxe4 (4.186.404.848) 2894

34/65 25:08 -0.68 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rhf1 Rd8 30.Rxd8+ Kxd8 31.Bc3 b4
32.Bd2 Kc7 33.c4 Rd8 34.Kc2 Rd4
35.Re1 Kc6 36.axb4 Rxd2+ 37.Kxd2 Bxb4+
38.Ke2 Bxe1 39.Kxe1 (4.391.314.127) 2910

35/65 26:26 -0.62++ 26.Bb2 (4.635.828.468) 2921

35/65 27:41 -0.68-- 26.Bb2 Bxe4 27.fxe4 (4.848.335.749) 2917

35/65 28:24 -0.62++ 26.Bb2 (4.971.589.197) 2917

35/65 28:27 -0.66 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 Ra7 30.Rf1 Rd7 31.a4 bxa4
32.bxa4 Rc7 33.Kc1 Rc8 34.Rb3 Rg8
35.Rc3 Kf7 36.Rff3 Rgd8 37.Rxc8 Rxc8
38.Rc3 Bc5 39.Kd1 (4.979.574.390) 2916

36/65 30:21 -0.72-- 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 Ra7 30.Rf1 Rd7 31.a4 bxa4
32.bxa4 Rc7 33.Kc1 Rc8 34.Rc3 Kf7
35.Rff3 Rhd8 36.Rxc8 Rxc8 37.Rc3 Bc5
38.Kd1 Rc7 39.Ke2 (5.309.623.567) 2914

36/65 30:37 -0.66++ 26.Bb2 (5.358.313.997) 2916

36/65 31:18 -0.72-- 26.Bb2 Bxe4 (5.500.510.080) 2928

36/65 31:35 -0.65++ 26.Bb2 (5.555.795.512) 2930

36/65 38:09 -0.75-- 26.Bb2 Bxe4 (6.850.566.839) 2991

36/65 41:04 -0.74 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 Rc8 30.Rhd1 Rh7 31.Bc3 a4
32.Rf1 Rf7 33.Kb2 axb3 34.cxb3 Ra8
35.b4 Rc8 36.Kb3 Bd8 37.a4 bxa4+
38.Kxa4 Rfc7 39.Kb3 (7.347.627.145) 2981

37/65 41:53 -0.67++ 26.Bb2 (7.500.962.615) 2984

37/65 42:39 -0.61++ 26.Bb2 (7.637.730.054) 2984

37/65 43:29 -0.67-- 26.Bb2 Bxe4 (7.783.015.720) 2982

37/65 44:20 -0.69 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 Rc8 30.Rf1 a4 31.Bc3 Rf8
32.Kb2 Rc7 33.Ba5 Ra7 34.Bb4 Bxb4
35.axb4 axb3 36.Kxb3 Kf7 37.Rc3 Rfa8
38.Rc5 Ra3+ 39.Kb2 (7.929.065.172) 2980

38/65 44:57 -0.63++ 26.Bb2 (8.034.583.445) 2978

38/65 45:53 -0.69-- 26.Bb2 Bxe4 (8.190.127.783) 2974

38/65 46:26 -0.63++ 26.Bb2 (8.297.788.703) 2978

38/65 47:05 -0.68 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 Rc8 30.Rf1 a4 31.Bc3 Rg8
32.Kb2 Rf8 33.Ba5 Ra8 34.Bb4 axb3
35.Kxb3 Rc8 36.Rfd1 Rc7 37.c3 Rb7
38.R1d2 Ra7 39.Kb2 (8.422.760.292) 2980

39/65 48:16 -0.62++ 26.Bb2 (8.637.260.272) 2981

39/65 50:18 -0.68-- 26.Bb2 Bxe4 (9.004.880.107) 2983

39/65 50:47 -0.62++ 26.Bb2 (9.094.323.527) 2984

39/65 53:33 -0.69-- 26.Bb2 Bxe4 (9.597.229.373) 2986

39/77 69:31 -0.66 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 Rd8 30.Rc3 Rf8 31.Rf1 Rd2
32.Rc8+ Kf7 33.Rc7 Rfd8 34.Bc3 Rd1+
35.Rxd1 Rxd1+ 36.Kb2 f5 37.gxf5 exf5
38.exf5 Rd5 39.Bxa5 (12.719.819.646) 3049

40/77 71:25 -0.60++ 26.Bb2 (13.082.021.966) 3052

40/77 73:13 -0.66-- 26.Bb2 Bxe4 27.fxe4 f6 28.Rdf1 a4
29.Rh3 Rf8 30.Rhf3 Qc6 31.Qe3 Rb8
32.Qa7 Qa8 33.Qxa8 Rxa8 34.Rc3 Bd6
35.Rc6 Kd7 36.Rb6 Kc7 37.Rxb5 Kc6
38.c4 axb3 39.Rxb3 (13.411.578.678) 3052

40/77 78:08 -0.65 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rhf1 Rh7 30.Rf3 Rc8 31.Bc3 Rd8
32.Rdf1 b4 33.axb4 axb4 34.Bb2 Rd2
35.R3f2 Rxf2 36.Rxf2 Kd7 37.c4 bxc3
38.Bxc3 Rh8 39.Ra2 (14.316.384.990) 3053

41/77 82:24 -0.61 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rd3 a4 30.Rf1 Rc8 31.Bc3 Ra8
32.Bb2 Rf8 33.Rdf3 Rb8 34.Ka2 Rc8
35.Kb1 Rc6 36.Ba1 Ra6 37.Bb2 Ra8
38.Ka2 Ra7 39.Kb1 (15.100.008.884) 3053

42/77 107:37 -0.67-- 26.Bb2 Bxe4 (20.115.089.873) 3114

42/77 132:34 -0.73-- 26.Bb2 Bxe4 (24.349.106.222) 3061

42/77 140:38 -0.67++ 26.Bb2 (25.846.161.879) 3062

42/77 170:56 -0.75-- 26.Bb2 Bxe4 (31.050.713.791) 3027

42/80 196:48 -0.64++ 26.Bb2 (36.492.590.245) 3090

42/80 203:01 -0.68 26.Bb2 Bxe4 27.Qxe4 Qxe4 28.fxe4 f6
29.Rhf1 Rf8 30.Rf3 Rd8 31.Rxd8+ Kxd8
32.a4 bxa4 33.bxa4 Bb4 34.c3 Be7
35.Rf1 Kd7 36.Kc2 Rb8 37.Rd1+ Ke8
38.Bc1 Rb7 39.Be3 (37.708.701.575) 3095

43/80 241:20 -0.74-- 26.Bb2 Bxe4 (44.445.639.922) 3069

43/80 261:04 -0.68++ 26.Bb2 (48.186.883.580) 3076

43/80 265:20 -0.74-- 26.Bb2 Bxe4 (49.031.196.297) 3079

best move: Bc1-b2 time: 269:18.709 min n/s: 3.079.685 nodes: 49.814.979.033
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
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: probability for fail low after fail high

Post by bob »

Dann Corbit wrote:Stockfish has the famous "sewing machine" effect on fail high/fail low.
Because they print out the nonsense scores for each file high and each fail low, the output can become very polluted. So I had to invent a UCI option to turn the noise off.
I guess that most other engines will behave differently than stockfish.
Even so, whatever Stockfish is doing in the search must be pretty good or it would not win all those games.
Actually not. reductions, extensions and forward pruning, particularly anything based on move ordering, adds to search instability, which is what this phenomenon is called. You search, you get a fail high on some move that was not ordered first (else it would have been searched first) and by moving it up in the list, LMR reduces it less, and it fails low. It is annoying as hell. I've been puzzling over this for a year now. For the longest, I was of the opinion "if a move fails high, it is good, even if it fails low on the re-search." I am beginning to think that might not be the case. When Crafty fails high at the root, that move goes to the front of the move list and is always the PV. It pisses me off to see the score come back from the re-search and be LOWER than the original PV.

There is work to do here to handle this correctly. I'm even considering an array at the root containing (a) each move; (b) the backed up score; (c) the PV for that move. And just keeping that array in order no matter what kind of crapola happens with fail highs and lows. And then playing the move with the best score, period. This is under current investigation because the search instabilities are becoming ridiculous at times.

I'll let cluster testing make the final call, as to whether this is better or not. It is a bit messy, because I want the output (particularly the log output) to be readable, which means when I see something like this:

+0.05 first-move and PV
++ > +.05 fail high move
+0.02 fail high move and score

I then immediately print (again)
+0.05 first-move and PV to show that the fail high went to the toilet and was flushed.

The hard case is the same move fails high twice, the low once, then high again, then low twice. What do do with that?
Dann Corbit
Posts: 12870
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: probability for fail low after fail high

Post by Dann Corbit »

Eelco de Groot wrote:
Dann Corbit wrote:Stockfish has the famous "sewing machine" effect on fail high/fail low.
Because they print out the nonsense scores for each file high and each fail low, the output can become very polluted. So I had to invent a UCI option to turn the noise off.
Louis mentioned a long while ago that Stockfish can do that in its own logging (when that code was still in the official base), so not the UCI output. Not much use in a GUI but for private uses maybe it is useful to know. I just thought I'd mention it, since you resurrected the logging code Dann.
I completely redid the logging. I am using very little from the previous code and in fact, I print out the pv based on a routine that was used to poke the pv nodes back into the hash table at the end of an iteration. I will never see that effect in the logging because it comes from printing out fail high and fail low.
Ferdy
Posts: 4856
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: probability for fail low after fail high

Post by Ferdy »

Uri Blass wrote:I did not do statistics calculation but from watching analysis of stockfish
I get the impression that in most of the cases there is going to be a fail low after fail high and in most of the cases there is going to be a fail high after fail low.

My question is the following:

1)Is there a tool to calculate probability to get fail low in an iteration after fail high and probability to get fail high in an iteration after fail low?

The tool can simply get 1,000 positions and analyze everyone of them for
at least 10 seconds(when it always finish the iteration that the engine got after 10 seconds) and based on the output tell me the probability for fail high after fail low and the probability for fail low after fail high.

I think that it is interesting to get this information for different engines.

The result should be something like the following:

10000 fail high after at least 1 second of analysis:
After them we have the following probabilities:

1)30% fail high again
2)51% fail low
3)19% end of the iteration.

9000 fail low after at least 1 second of analysis
1)53% fail high
2)26% fail low
3)21% end of the iteration.

number of fail high and fail low can be clearly bigger than the number of position because the same position may have 20 fail high and 20 fail low after at least 1 second.

It may be interesting to have statistics also for fail high and fail low that happen faster after less than 0.1 second to see if there is a difference between it and what happens in longer time control.
Here is first attempt of such tool. Check if I get it right. At the end there is summary of the stat. I categorize it into 2, cat 1 is for fail high counting per iter, then cat 2 for fail low. Also I have added fail low again for cat 2, meaning it starts at fail low then there is fail low found again. Counting starts at time 1000 or more. There are markers for new iter and same iter and other for review. Only single position first.

Code: Select all

Sample output.

Enter uci engine filename? sf6.exe
Enter epd filename? test.epd
Enter Hash size in MB? 128
Enter number of Threads? 1
Enter analysis time/pos in sec? 10

id name Stockfish 6 64 POPCNT

info depth 1 seldepth 1 multipv 1 score cp -75 nodes 100 nps 50000 tbhits 0 time 2 pv g4g5
info depth 2 seldepth 2 multipv 1 score cp -74 nodes 324 nps 162000 tbhits 0 time 2 pv g4g5 h6h3 g2h3 c5d5
info depth 3 seldepth 3 multipv 1 score cp -74 nodes 548 nps 274000 tbhits 0 time 2 pv g4g5 h6h3 g2h3
info depth 4 seldepth 4 multipv 1 score cp -74 nodes 1253 nps 626500 tbhits 0 time 2 pv g4g5 h6h3 g2h3 c5d5
info depth 5 seldepth 6 multipv 1 score cp -89 nodes 1978 nps 659333 tbhits 0 time 3 pv g4g5 h6h3 g2h3 c5d5 f5f6 d6e5
info depth 6 seldepth 7 multipv 1 score cp -28 nodes 6624 nps 1324800 tbhits 0 time 5 pv b1b8 f2f1b g2f1 e3e2 f1e2 h6e6 e2d3
info depth 7 seldepth 9 multipv 1 score cp 0 nodes 12818 nps 1602250 tbhits 0 time 8 pv b1b8 h6e6 b8d8 d6c6 d8c8 c6d6 c8d8
info depth 8 seldepth 10 multipv 1 score cp -44 nodes 15613 nps 1734777 tbhits 0 time 9 pv b1b8 c5d5 b8d8 d6c6 d8d5 c4d6 d5c5 c6b6 g4g5 d6f5
info depth 9 seldepth 16 multipv 1 score cp 0 nodes 55759 nps 2065148 tbhits 0 time 27 pv b1b8 h6e6 b8d8 d6c6 d8c8 c6d6 c8d8
info depth 10 seldepth 16 multipv 1 score cp 0 nodes 68687 nps 2081424 tbhits 0 time 33 pv b1b8 h6e6 b8d8 d6c6 d8c8 c6d6 c8d8
info depth 11 seldepth 19 multipv 1 score cp -3 nodes 98309 nps 2137152 tbhits 0 time 46 pv b1b8 c5d5 b8d8 d6e7 f5d5 h6e6 d5d7 e7f6 d8f8 f6g5 f8g8 g5f4 g8f8 f4e4 g2f1 c4a3 f8d8
info depth 12 seldepth 24 multipv 1 score cp -120 nodes 215323 nps 2290670 tbhits 0 time 94 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5d6 e7d6 g4g5 c4a3 g5g6 a3c4 g6g7
info depth 13 seldepth 24 multipv 1 score cp -132 nodes 277816 nps 2334588 tbhits 0 time 119 pv b1b8 c5d5 b8d8 d6e7 f5d5 c4b6 d5e5 e7d8 e5e3 h6f6 g2f1 b6c4 e3d3 d8e7 g4g5 f6f8 h3h4 c4e5 d3d4
info depth 14 seldepth 25 multipv 1 score cp -143 nodes 377837 nps 2376333 tbhits 0 time 159 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5c5 c4a3 c5a5 d6d4 g4g5 a3c2 a5a7 e7f8 a7a6 d4h4
info depth 15 seldepth 25 multipv 1 score cp -152 nodes 528034 nps 2411114 tbhits 0 time 219 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5c5 c4a3 g4g5 d6d2 f2f3 a3c2 c5a5 a4a3 f3e4 d2h2 a5a7 e7f8 h3h4 h2h4 e4d3
info depth 16 seldepth 31 multipv 1 score cp -156 nodes 738046 nps 2460153 tbhits 0 time 300 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5c5 c4a3 g4g5 d6d4 c5c7 e7f8 c7a7 d4b4 a7a6 f8f7 f2e2 b4h4 a6f6 f7g7 f6a6 a3c2
info depth 17 seldepth 39 multipv 1 score cp -98 nodes 1206585 nps 2498105 tbhits 0 time 483 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5h5 e3e2 h5h7 e7e8 h7h8 e8f7 d5d7 f7f6 h8f8 f6g5 f8g8 g5f4 g8f8 f4e3 f8f3 e3e4 g2f2 e2e1q f2e1 e4f3 e1d1 e6a6 d7d4
info depth 18 seldepth 47 multipv 1 score cp -167 nodes 1821988 nps 2492459 tbhits 0 time 731 pv b1b8 c5d5 b8d8 d6e7 f5d5 c4b6 d5h5 h6f6 d8d1 e3e2 h5e5 f6e6 e5e6 e7e6 d1d6 e6d6 g2f2 b6c4 f2e2 c4a3 e2d3 d6c5 h3h4 a3c4 g4g5 c4e5 d3e4 e5g6
info depth 19 seldepth 47 multipv 1 score cp -156 nodes 2270994 nps 2484676 tbhits 0 time 914 pv b1b8 c5d5 b8d8 d6e7 f5d5 c4b6 d5h5 h6f6 d8d1 e3e2 h5e5 f6e6 e5e6 e7e6 d1d6 e6d6 g2f2 b6c4 f2e2 c4a3 e2d3 d6c5 d3c3 a3c4 g4g5 c4e5 c3b2

new iter
info depth 20 seldepth 47 multipv 1 score cp -187 nodes 3768055 nps 2502028 tbhits 0 time 1506 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d6 c5a5 e3a3 g4g5 e7f7 a5a7 f7e6 h3h4 d6e4 g1f1 e6f5 a7a5 f5g4 g5g6

new iter
info depth 21 seldepth 47 multipv 1 score cp -186 nodes 6156471 nps 2540846 tbhits 0 time 2423 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d2 c5a5 e3a3 g1f2 e7e6 h3h4 d2e4 f2e2 a3h3 e2f1 a4a3 g4g5 h3f3 f1e1 f3h3 e1e2

new iter
info depth 22 seldepth 47 multipv 1 score cp -177 nodes 7865672 nps 2542234 tbhits 0 time 3094 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g3 e2e3 g3f4 e3a3 d5c5 c4b2 c5a5 a3h3 g4g5 h3h2 a5a7 e7e6 a7a6 e6d5 g5g6 h2g2 f4f5 g2g3 f5f6 a4a3 g6g7 b2c4 a6a8

new iter
category 2
info depth 23 seldepth 47 multipv 1 score cp -184 upperbound nodes 9685099 nps 2545361 tbhits 0 time 3805 pv b1b8 c5d5
same iter
num_same_iter = 2
info depth 23 seldepth 47 multipv 1 score cp -190 upperbound nodes 10666564 nps 2540868 tbhits 0 time 4198 pv b1b8 c5d5
same iter
num_same_iter = 3
info depth 23 seldepth 47 multipv 1 score cp -188 nodes 11571395 nps 2540372 tbhits 0 time 4555 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d6 c5a5 e3a3 g4g5 e7e6 g1g2 a3a2 g2f3 d6c4 a5a7 a4a3 h3h4 c4e5 f3e4 a2e2 e4f4 a3a2 h4h5

new iter
category 1
info depth 24 seldepth 47 multipv 1 score cp -182 lowerbound nodes 13108240 nps 2544795 tbhits 0 time 5151 pv b1b8
same iter
num_same_iter = 2
info depth 24 seldepth 47 multipv 1 score cp -188 upperbound nodes 13786660 nps 2532450 tbhits 0 time 5444 pv b1b8 c5d5
same iter
num_same_iter = 3
info depth 24 seldepth 47 multipv 1 score cp -183 nodes 14265931 nps 2530317 tbhits 0 time 5638 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d2 c5a5 e3a3 g1f2 e7d6 h3h4 d2e4 f2e2 a3h3 g4g5 h3h4 e2f3 e4c5 g5g6 h4h8 g6g7 h8g8 a5a7

new iter
category 1
info depth 25 seldepth 47 multipv 1 score cp -177 lowerbound nodes 15488680 nps 2537048 tbhits 0 time 6105 pv b1b8
same iter
num_same_iter = 2
info depth 25 seldepth 47 multipv 1 score cp -183 upperbound nodes 17019363 nps 2537552 tbhits 0 time 6707 pv b1b8 c5d5
same iter
num_same_iter = 3
info depth 25 seldepth 47 multipv 1 score cp -192 upperbound nodes 18426562 nps 2530078 tbhits 0 time 7283 pv b1b8 c5d5
same iter
num_same_iter = 4
info depth 25 seldepth 47 multipv 1 score cp -197 nodes 20528916 nps 2531933 tbhits 0 time 8108 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2f1 e2a2 d5c5 c4a3 h3h4 e7d6 c5c8 a3b5 g4g5 d6e7 h4h5 a2h2 g5g6 e7f6 c8f8 f6g7 f8f5 a4a3 f5b5 a3a2 b5b7 g7h6 b7h7 h6g5

new iter
category 1
info depth 26 seldepth 47 multipv 1 score cp -191 lowerbound nodes 23970080 nps 2549737 tbhits 0 time 9401 pv b1b8
same iter
num_same_iter = 2
info depth 26 seldepth 47 multipv 1 score cp -197 upperbound nodes 24996127 nps 2538451 tbhits 0 time 9847 pv b1b8 c5d5
same iter
num_same_iter = 3
info depth 26 seldepth 47 multipv 1 score cp -191 lowerbound nodes 25097746 nps 2538459 tbhits 0 time 9887 pv b1b8
info nodes 25388310 time 10002
bestmove b1b8 ponder c5d5

Position summmary:
fen: 8/8/3k3r/2rN1R2/p1n3P1/P3p2P/5pK1/1R6 w - - 0 1

Category 1:
Fail high          = 3
1. fail high again = 1 ( 33.3%)
2. fail low        = 4 (133.3%)
3. end of iter     = 2 ( 66.7%)

Category 2:
Fail low           = 1
1. fail low again  = 1 (100.0%)
2. fail high       = 0 (  0.0%)
3. end of iter     = 1 (100.0%)

Done!!
press enter key to exit
Uri Blass
Posts: 11222
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: probability for fail low after fail high

Post by Uri Blass »

Ferdy wrote:
Uri Blass wrote:I did not do statistics calculation but from watching analysis of stockfish
I get the impression that in most of the cases there is going to be a fail low after fail high and in most of the cases there is going to be a fail high after fail low.

My question is the following:

1)Is there a tool to calculate probability to get fail low in an iteration after fail high and probability to get fail high in an iteration after fail low?

The tool can simply get 1,000 positions and analyze everyone of them for
at least 10 seconds(when it always finish the iteration that the engine got after 10 seconds) and based on the output tell me the probability for fail high after fail low and the probability for fail low after fail high.

I think that it is interesting to get this information for different engines.

The result should be something like the following:

10000 fail high after at least 1 second of analysis:
After them we have the following probabilities:

1)30% fail high again
2)51% fail low
3)19% end of the iteration.

9000 fail low after at least 1 second of analysis
1)53% fail high
2)26% fail low
3)21% end of the iteration.

number of fail high and fail low can be clearly bigger than the number of position because the same position may have 20 fail high and 20 fail low after at least 1 second.

It may be interesting to have statistics also for fail high and fail low that happen faster after less than 0.1 second to see if there is a difference between it and what happens in longer time control.
Here is first attempt of such tool. Check if I get it right. At the end there is summary of the stat. I categorize it into 2, cat 1 is for fail high counting per iter, then cat 2 for fail low. Also I have added fail low again for cat 2, meaning it starts at fail low then there is fail low found again. Counting starts at time 1000 or more. There are markers for new iter and same iter and other for review. Only single position first.

Code: Select all

Sample output.

Enter uci engine filename? sf6.exe
Enter epd filename? test.epd
Enter Hash size in MB? 128
Enter number of Threads? 1
Enter analysis time/pos in sec? 10

id name Stockfish 6 64 POPCNT

info depth 1 seldepth 1 multipv 1 score cp -75 nodes 100 nps 50000 tbhits 0 time 2 pv g4g5
info depth 2 seldepth 2 multipv 1 score cp -74 nodes 324 nps 162000 tbhits 0 time 2 pv g4g5 h6h3 g2h3 c5d5
info depth 3 seldepth 3 multipv 1 score cp -74 nodes 548 nps 274000 tbhits 0 time 2 pv g4g5 h6h3 g2h3
info depth 4 seldepth 4 multipv 1 score cp -74 nodes 1253 nps 626500 tbhits 0 time 2 pv g4g5 h6h3 g2h3 c5d5
info depth 5 seldepth 6 multipv 1 score cp -89 nodes 1978 nps 659333 tbhits 0 time 3 pv g4g5 h6h3 g2h3 c5d5 f5f6 d6e5
info depth 6 seldepth 7 multipv 1 score cp -28 nodes 6624 nps 1324800 tbhits 0 time 5 pv b1b8 f2f1b g2f1 e3e2 f1e2 h6e6 e2d3
info depth 7 seldepth 9 multipv 1 score cp 0 nodes 12818 nps 1602250 tbhits 0 time 8 pv b1b8 h6e6 b8d8 d6c6 d8c8 c6d6 c8d8
info depth 8 seldepth 10 multipv 1 score cp -44 nodes 15613 nps 1734777 tbhits 0 time 9 pv b1b8 c5d5 b8d8 d6c6 d8d5 c4d6 d5c5 c6b6 g4g5 d6f5
info depth 9 seldepth 16 multipv 1 score cp 0 nodes 55759 nps 2065148 tbhits 0 time 27 pv b1b8 h6e6 b8d8 d6c6 d8c8 c6d6 c8d8
info depth 10 seldepth 16 multipv 1 score cp 0 nodes 68687 nps 2081424 tbhits 0 time 33 pv b1b8 h6e6 b8d8 d6c6 d8c8 c6d6 c8d8
info depth 11 seldepth 19 multipv 1 score cp -3 nodes 98309 nps 2137152 tbhits 0 time 46 pv b1b8 c5d5 b8d8 d6e7 f5d5 h6e6 d5d7 e7f6 d8f8 f6g5 f8g8 g5f4 g8f8 f4e4 g2f1 c4a3 f8d8
info depth 12 seldepth 24 multipv 1 score cp -120 nodes 215323 nps 2290670 tbhits 0 time 94 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5d6 e7d6 g4g5 c4a3 g5g6 a3c4 g6g7
info depth 13 seldepth 24 multipv 1 score cp -132 nodes 277816 nps 2334588 tbhits 0 time 119 pv b1b8 c5d5 b8d8 d6e7 f5d5 c4b6 d5e5 e7d8 e5e3 h6f6 g2f1 b6c4 e3d3 d8e7 g4g5 f6f8 h3h4 c4e5 d3d4
info depth 14 seldepth 25 multipv 1 score cp -143 nodes 377837 nps 2376333 tbhits 0 time 159 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5c5 c4a3 c5a5 d6d4 g4g5 a3c2 a5a7 e7f8 a7a6 d4h4
info depth 15 seldepth 25 multipv 1 score cp -152 nodes 528034 nps 2411114 tbhits 0 time 219 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5c5 c4a3 g4g5 d6d2 f2f3 a3c2 c5a5 a4a3 f3e4 d2h2 a5a7 e7f8 h3h4 h2h4 e4d3
info depth 16 seldepth 31 multipv 1 score cp -156 nodes 738046 nps 2460153 tbhits 0 time 300 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5c5 c4a3 g4g5 d6d4 c5c7 e7f8 c7a7 d4b4 a7a6 f8f7 f2e2 b4h4 a6f6 f7g7 f6a6 a3c2
info depth 17 seldepth 39 multipv 1 score cp -98 nodes 1206585 nps 2498105 tbhits 0 time 483 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5h5 e3e2 h5h7 e7e8 h7h8 e8f7 d5d7 f7f6 h8f8 f6g5 f8g8 g5f4 g8f8 f4e3 f8f3 e3e4 g2f2 e2e1q f2e1 e4f3 e1d1 e6a6 d7d4
info depth 18 seldepth 47 multipv 1 score cp -167 nodes 1821988 nps 2492459 tbhits 0 time 731 pv b1b8 c5d5 b8d8 d6e7 f5d5 c4b6 d5h5 h6f6 d8d1 e3e2 h5e5 f6e6 e5e6 e7e6 d1d6 e6d6 g2f2 b6c4 f2e2 c4a3 e2d3 d6c5 h3h4 a3c4 g4g5 c4e5 d3e4 e5g6
info depth 19 seldepth 47 multipv 1 score cp -156 nodes 2270994 nps 2484676 tbhits 0 time 914 pv b1b8 c5d5 b8d8 d6e7 f5d5 c4b6 d5h5 h6f6 d8d1 e3e2 h5e5 f6e6 e5e6 e7e6 d1d6 e6d6 g2f2 b6c4 f2e2 c4a3 e2d3 d6c5 d3c3 a3c4 g4g5 c4e5 c3b2

new iter
info depth 20 seldepth 47 multipv 1 score cp -187 nodes 3768055 nps 2502028 tbhits 0 time 1506 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d6 c5a5 e3a3 g4g5 e7f7 a5a7 f7e6 h3h4 d6e4 g1f1 e6f5 a7a5 f5g4 g5g6

new iter
info depth 21 seldepth 47 multipv 1 score cp -186 nodes 6156471 nps 2540846 tbhits 0 time 2423 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d2 c5a5 e3a3 g1f2 e7e6 h3h4 d2e4 f2e2 a3h3 e2f1 a4a3 g4g5 h3f3 f1e1 f3h3 e1e2

new iter
info depth 22 seldepth 47 multipv 1 score cp -177 nodes 7865672 nps 2542234 tbhits 0 time 3094 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g3 e2e3 g3f4 e3a3 d5c5 c4b2 c5a5 a3h3 g4g5 h3h2 a5a7 e7e6 a7a6 e6d5 g5g6 h2g2 f4f5 g2g3 f5f6 a4a3 g6g7 b2c4 a6a8

new iter
category 2
info depth 23 seldepth 47 multipv 1 score cp -184 upperbound nodes 9685099 nps 2545361 tbhits 0 time 3805 pv b1b8 c5d5
same iter
num_same_iter = 2
info depth 23 seldepth 47 multipv 1 score cp -190 upperbound nodes 10666564 nps 2540868 tbhits 0 time 4198 pv b1b8 c5d5
same iter
num_same_iter = 3
info depth 23 seldepth 47 multipv 1 score cp -188 nodes 11571395 nps 2540372 tbhits 0 time 4555 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d6 c5a5 e3a3 g4g5 e7e6 g1g2 a3a2 g2f3 d6c4 a5a7 a4a3 h3h4 c4e5 f3e4 a2e2 e4f4 a3a2 h4h5

new iter
category 1
info depth 24 seldepth 47 multipv 1 score cp -182 lowerbound nodes 13108240 nps 2544795 tbhits 0 time 5151 pv b1b8
same iter
num_same_iter = 2
info depth 24 seldepth 47 multipv 1 score cp -188 upperbound nodes 13786660 nps 2532450 tbhits 0 time 5444 pv b1b8 c5d5
same iter
num_same_iter = 3
info depth 24 seldepth 47 multipv 1 score cp -183 nodes 14265931 nps 2530317 tbhits 0 time 5638 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d2 c5a5 e3a3 g1f2 e7d6 h3h4 d2e4 f2e2 a3h3 g4g5 h3h4 e2f3 e4c5 g5g6 h4h8 g6g7 h8g8 a5a7

new iter
category 1
info depth 25 seldepth 47 multipv 1 score cp -177 lowerbound nodes 15488680 nps 2537048 tbhits 0 time 6105 pv b1b8
same iter
num_same_iter = 2
info depth 25 seldepth 47 multipv 1 score cp -183 upperbound nodes 17019363 nps 2537552 tbhits 0 time 6707 pv b1b8 c5d5
same iter
num_same_iter = 3
info depth 25 seldepth 47 multipv 1 score cp -192 upperbound nodes 18426562 nps 2530078 tbhits 0 time 7283 pv b1b8 c5d5
same iter
num_same_iter = 4
info depth 25 seldepth 47 multipv 1 score cp -197 nodes 20528916 nps 2531933 tbhits 0 time 8108 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2f1 e2a2 d5c5 c4a3 h3h4 e7d6 c5c8 a3b5 g4g5 d6e7 h4h5 a2h2 g5g6 e7f6 c8f8 f6g7 f8f5 a4a3 f5b5 a3a2 b5b7 g7h6 b7h7 h6g5

new iter
category 1
info depth 26 seldepth 47 multipv 1 score cp -191 lowerbound nodes 23970080 nps 2549737 tbhits 0 time 9401 pv b1b8
same iter
num_same_iter = 2
info depth 26 seldepth 47 multipv 1 score cp -197 upperbound nodes 24996127 nps 2538451 tbhits 0 time 9847 pv b1b8 c5d5
same iter
num_same_iter = 3
info depth 26 seldepth 47 multipv 1 score cp -191 lowerbound nodes 25097746 nps 2538459 tbhits 0 time 9887 pv b1b8
info nodes 25388310 time 10002
bestmove b1b8 ponder c5d5

Position summmary:
fen: 8/8/3k3r/2rN1R2/p1n3P1/P3p2P/5pK1/1R6 w - - 0 1

Category 1:
Fail high          = 3
1. fail high again = 1 ( 33.3%)
2. fail low        = 4 (133.3%)
3. end of iter     = 2 ( 66.7%)

Category 2:
Fail low           = 1
1. fail low again  = 1 (100.0%)
2. fail high       = 0 (  0.0%)
3. end of iter     = 1 (100.0%)

Done!!
press enter key to exit
It is not what I mean exactly because I thought about statistics about what happens immediately after fail high so fail high fail low fail high in the same iteration is not counted in fail high again.

In this example I have the following:
depth 23
fail low
fail low
end of iteration

depth 24
fail high
fail low
end of iteration

depth 25
fail high
fail low
fail low
end of iteration

depth 26
fail high
fail low
fail high
did not finish the iteration.

statistic is the following:
4 fail high(only 3 we have information about what happened later)
6 fail low


After fail high:
3 fail low at depths 24,25,26 (one we do not know at depth 26 because we did not stop at the end of the iteration)(100%)

No fail high or end of iteration.

After fail low:
1)2 fail low(depth 23,25)(2/6~33.333%)
2)3 end of iteration(depth 23,24,25) (3/6=50%)
3)1 fail high(depth 26) (1/6~16.667%)
Dann Corbit
Posts: 12870
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: probability for fail low after fail high

Post by Dann Corbit »

Try this version:
https://www.dropbox.com/s/2rkp4m7bj0k3s ... rc.7z?dl=0

It will still have fail high and fail low, but it does not go sewing machine in the output.
Ferdy
Posts: 4856
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: probability for fail low after fail high

Post by Ferdy »

I have a new version, I am not sure what to do with iteration that was not completed. We count fail highs and lows normally. Can you check again?

Code: Select all

Enter uci engine filename? sf6.exe
Enter epd filename? test.epd
Enter Hash size in MB? 128
Enter number of Threads? 1
Enter analysis time/pos in sec? 10

id name Stockfish 6 64 POPCNT

info depth 1 seldepth 1 multipv 1 score cp -75 nodes 100 nps 50000 tbhits 0 time 2 pv g4g5
info depth 2 seldepth 2 multipv 1 score cp -74 nodes 324 nps 108000 tbhits 0 time 3 pv g4g5 h6h3 g2h3 c5d5
info depth 3 seldepth 3 multipv 1 score cp -74 nodes 548 nps 182666 tbhits 0 time 3 pv g4g5 h6h3 g2h3
info depth 4 seldepth 4 multipv 1 score cp -74 nodes 1253 nps 313250 tbhits 0 time 4 pv g4g5 h6h3 g2h3 c5d5
info depth 5 seldepth 6 multipv 1 score cp -89 nodes 1978 nps 494500 tbhits 0 time 4 pv g4g5 h6h3 g2h3 c5d5 f5f6 d6e5
info depth 6 seldepth 7 multipv 1 score cp -28 nodes 6624 nps 946285 tbhits 0 time 7 pv b1b8 f2f1b g2f1 e3e2 f1e2 h6e6 e2d3
info depth 7 seldepth 9 multipv 1 score cp 0 nodes 12818 nps 1165272 tbhits 0 time 11 pv b1b8 h6e6 b8d8 d6c6 d8c8 c6d6 c8d8
info depth 8 seldepth 10 multipv 1 score cp -44 nodes 15613 nps 1201000 tbhits 0 time 13 pv b1b8 c5d5 b8d8 d6c6 d8d5 c4d6 d5c5 c6b6 g4g5 d6f5
info depth 9 seldepth 16 multipv 1 score cp 0 nodes 55759 nps 1359975 tbhits 0 time 41 pv b1b8 h6e6 b8d8 d6c6 d8c8 c6d6 c8d8
info depth 10 seldepth 16 multipv 1 score cp 0 nodes 68687 nps 1320903 tbhits 0 time 52 pv b1b8 h6e6 b8d8 d6c6 d8c8 c6d6 c8d8
info depth 11 seldepth 19 multipv 1 score cp -3 nodes 98309 nps 1445720 tbhits 0 time 68 pv b1b8 c5d5 b8d8 d6e7 f5d5 h6e6 d5d7 e7f6 d8f8 f6g5 f8g8 g5f4 g8f8 f4e4 g2f1 c4a3 f8d8
info depth 12 seldepth 24 multipv 1 score cp -120 nodes 215323 nps 1594985 tbhits 0 time 135 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5d6 e7d6 g4g5 c4a3 g5g6 a3c4 g6g7
info depth 13 seldepth 24 multipv 1 score cp -132 nodes 277816 nps 1643881 tbhits 0 time 169 pv b1b8 c5d5 b8d8 d6e7 f5d5 c4b6 d5e5 e7d8 e5e3 h6f6 g2f1 b6c4 e3d3 d8e7 g4g5 f6f8 h3h4 c4e5 d3d4
info depth 14 seldepth 25 multipv 1 score cp -143 nodes 377837 nps 1790696 tbhits 0 time 211 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5c5 c4a3 c5a5 d6d4 g4g5 a3c2 a5a7 e7f8 a7a6 d4h4
info depth 15 seldepth 25 multipv 1 score cp -152 nodes 528034 nps 1839839 tbhits 0 time 287 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5c5 c4a3 g4g5 d6d2 f2f3 a3c2 c5a5 a4a3 f3e4 d2h2 a5a7 e7f8 h3h4 h2h4 e4d3
info depth 16 seldepth 31 multipv 1 score cp -156 nodes 738046 nps 1835935 tbhits 0 time 402 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3f2 g2f2 e6d6 d5c5 c4a3 g4g5 d6d4 c5c7 e7f8 c7a7 d4b4 a7a6 f8f7 f2e2 b4h4 a6f6 f7g7 f6a6 a3c2
info depth 17 seldepth 39 multipv 1 score cp -98 nodes 1206585 nps 1833715 tbhits 0 time 658 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5h5 e3e2 h5h7 e7e8 h7h8 e8f7 d5d7 f7f6 h8f8 f6g5 f8g8 g5f4 g8f8 f4e3 f8f3 e3e4 g2f2 e2e1q f2e1 e4f3 e1d1 e6a6 d7d4

new iter
info depth 18 seldepth 47 multipv 1 score cp -167 nodes 1821988 nps 1751911 tbhits 0 time 1040 pv b1b8 c5d5 b8d8 d6e7 f5d5 c4b6 d5h5 h6f6 d8d1 e3e2 h5e5 f6e6 e5e6 e7e6 d1d6 e6d6 g2f2 b6c4 f2e2 c4a3 e2d3 d6c5 h3h4 a3c4 g4g5 c4e5 d3e4 e5g6

new iter
info depth 19 seldepth 47 multipv 1 score cp -156 nodes 2270994 nps 1728305 tbhits 0 time 1314 pv b1b8 c5d5 b8d8 d6e7 f5d5 c4b6 d5h5 h6f6 d8d1 e3e2 h5e5 f6e6 e5e6 e7e6 d1d6 e6d6 g2f2 b6c4 f2e2 c4a3 e2d3 d6c5 d3c3 a3c4 g4g5 c4e5 c3b2

new iter
info depth 20 seldepth 47 multipv 1 score cp -187 nodes 3768055 nps 1716653 tbhits 0 time 2195 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d6 c5a5 e3a3 g4g5 e7f7 a5a7 f7e6 h3h4 d6e4 g1f1 e6f5 a7a5 f5g4 g5g6

new iter
info depth 21 seldepth 47 multipv 1 score cp -188 upperbound nodes 5901670 nps 1888534 tbhits 0 time 3125 pv b1b8 c5d5
info depth 21 seldepth 47 multipv 1 score cp -186 nodes 6156471 nps 1903082 tbhits 0 time 3235 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d2 c5a5 e3a3 g1f2 e7e6 h3h4 d2e4 f2e2 a3h3 e2f1 a4a3 g4g5 h3f3 f1e1 f3h3 e1e2

new iter
info depth 22 seldepth 47 multipv 1 score cp -180 lowerbound nodes 7338336 nps 1875373 tbhits 0 time 3913 pv b1b8
info depth 22 seldepth 47 multipv 1 score cp -177 nodes 7865672 nps 1880839 tbhits 0 time 4182 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g3 e2e3 g3f4 e3a3 d5c5 c4b2 c5a5 a3h3 g4g5 h3h2 a5a7 e7e6 a7a6 e6d5 g5g6 h2g2 f4f5 g2g3 f5f6 a4a3 g6g7 b2c4 a6a8

new iter
info depth 23 seldepth 47 multipv 1 score cp -184 upperbound nodes 9685099 nps 1879506 tbhits 0 time 5153 pv b1b8 c5d5
info depth 23 seldepth 47 multipv 1 score cp -190 upperbound nodes 10666564 nps 1883553 tbhits 0 time 5663 pv b1b8 c5d5
info depth 23 seldepth 47 multipv 1 score cp -188 nodes 11571395 nps 1852905 tbhits 0 time 6245 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d6 c5a5 e3a3 g4g5 e7e6 g1g2 a3a2 g2f3 d6c4 a5a7 a4a3 h3h4 c4e5 f3e4 a2e2 e4f4 a3a2 h4h5

new iter
info depth 24 seldepth 47 multipv 1 score cp -182 lowerbound nodes 13108240 nps 1896172 tbhits 0 time 6913 pv b1b8
info depth 24 seldepth 47 multipv 1 score cp -188 upperbound nodes 13786660 nps 1910303 tbhits 0 time 7217 pv b1b8 c5d5
info depth 24 seldepth 47 multipv 1 score cp -183 nodes 14265931 nps 1922891 tbhits 0 time 7419 pv b1b8 c5d5 b8d8 d6e7 d8d5 h6e6 f5f2 e3e2 f2e2 e6e2 g2g1 e2e3 d5c5 c4d2 c5a5 e3a3 g1f2 e7d6 h3h4 d2e4 f2e2 a3h3 g4g5 h3h4 e2f3 e4c5 g5g6 h4h8 g6g7 h8g8 a5a7

new iter
info depth 25 seldepth 47 multipv 1 score cp -177 lowerbound nodes 15488680 nps 1952436 tbhits 0 time 7933 pv b1b8
info depth 25 seldepth 47 multipv 1 score cp -183 upperbound nodes 17019363 nps 1976467 tbhits 0 time 8611 pv b1b8 c5d5
info depth 25 seldepth 47 multipv 1 score cp -192 upperbound nodes 18426562 nps 1970333 tbhits 0 time 9352 pv b1b8 c5d5
info nodes 19591788 time 10002
bestmove b1b8 ponder c5d5
b1b8

Position summmary:
fen: 8/8/3k3r/2rN1R2/p1n3P1/P3p2P/5pK1/1R6 w - - 0 1

Fail high          = 3
Fail low           = 6

Category 1: After fail high
1. fail high       = 0 (  0.0%)
2. fail low        = 2 ( 66.7%)
3. end of iter     = 1 ( 33.3%)

Category 2: After fail low
1. fail low        = 2 ( 33.3%)
2. fail high       = 0 (  0.0%)
3. end of iter     = 3 ( 50.0%)

Done!!