Skip to content

Commit

Permalink
🐛 Ensure no search depth 0 happens after a 'ponder hit' (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Oct 24, 2023
1 parent a691643 commit 6e3fd29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Lynx/Search/IDDFS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ public sealed partial class Engine
_killerMoves[1, d] = _previousKillerMoves[1, d + 2];
}

depth = lastSearchResult.Depth + 1; // Already reduced by 2
// depth Already reduced by 2 in SearchResult constructor
depth = lastSearchResult.Depth + 1;
depth = Math.Clamp(depth, 1, Configuration.EngineSettings.MaxDepth - 1);
}
else
{
Expand Down

2 comments on commit 6e3fd29

@eduherminio
Copy link
Member Author

@eduherminio eduherminio commented on 6e3fd29 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress check

40+0.4, Hash 256, no draw agreements or resignations, 8moves_v3.epd:

Score of Lynx 1806 - main vs Lynx 0.18.0: 285 - 51 - 202  [0.717] 538
...      Lynx 1806 - main playing White: 148 - 21 - 101  [0.735] 270
...      Lynx 1806 - main playing Black: 137 - 30 - 101  [0.700] 268
...      White vs Black: 178 - 158 - 202  [0.519] 538
Elo difference: 161.9 +/- 23.9, LOS: 100.0 %, DrawRatio: 37.5 %
SPRT: llr 0 (0.0%), lbound -inf, ubound inf

@eduherminio
Copy link
Member Author

@eduherminio eduherminio commented on 6e3fd29 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calibration games

40+0.4, Hash 256, no draw agreements or resignations, 8moves_v3.epd:

MinimalChess 0.5: ~65%

Score of Lynx 1806 - main vs MinimalChess 0.5: 51 - 21 - 34  [0.642] 106
...      Lynx 1806 - main playing White: 20 - 14 - 20  [0.556] 54
...      Lynx 1806 - main playing Black: 31 - 7 - 14  [0.731] 52
...      White vs Black: 27 - 45 - 34  [0.415] 106
Elo difference: 101.1 +/- 56.2, LOS: 100.0 %, DrawRatio: 32.1 %

MInimalChess 0.6: ~40%

Score of Lynx 1806 - main vs MinimalChess 0.6: 173 - 303 - 170  [0.399] 646
...      Lynx 1806 - main playing White: 97 - 150 - 76  [0.418] 323
...      Lynx 1806 - main playing Black: 76 - 153 - 94  [0.381] 323
...      White vs Black: 250 - 226 - 170  [0.519] 646
Elo difference: -70.9 +/- 23.3, LOS: 0.0 %, DrawRatio: 26.3 %

Pedantic 0.1: ~65%

Score of Lynx 1807 ponder vs Pedantic 0.1: 57 - 25 - 18  [0.660] 100
...      Lynx 1807 ponder playing White: 26 - 17 - 7  [0.590] 50
...      Lynx 1807 ponder playing Black: 31 - 8 - 11  [0.730] 50
...      White vs Black: 34 - 48 - 18  [0.430] 100
Elo difference: 115.2 +/- 65.2, LOS: 100.0 %, DrawRatio: 18.0 %
SPRT: llr 0 (0.0%), lbound -inf, ubound inf

Pedantic 0.2: ~40%

Score of Lynx 1807 ponder vs Pedantic 0.2: 43 - 76 - 35  [0.393] 154
...      Lynx 1807 ponder playing White: 20 - 36 - 21  [0.396] 77
...      Lynx 1807 ponder playing Black: 23 - 40 - 14  [0.390] 77
...      White vs Black: 60 - 59 - 35  [0.503] 154
Elo difference: -75.6 +/- 49.3, LOS: 0.1 %, DrawRatio: 22.7 %
SPRT: llr 0 (0.0%), lbound -inf, ubound inf

Zahak 3.0: ~55%

Score of Lynx 1807 - ponder vs Zahak 3.0: 52 - 38 - 40  [0.554] 130
...      Lynx 1807 - ponder playing White: 24 - 18 - 23  [0.546] 65
...      Lynx 1807 - ponder playing Black: 28 - 20 - 17  [0.562] 65
...      White vs Black: 44 - 46 - 40  [0.492] 130
Elo difference: 37.6 +/- 50.1, LOS: 93.0 %, DrawRatio: 30.8 %

Admete 1.3.1: ~65%

Score of Lynx 1807 - ponder vs Admete 1.3.1: 14 - 6 - 8  [0.643] 28
...      Lynx 1807 - ponder playing White: 9 - 1 - 4  [0.786] 14
...      Lynx 1807 - ponder playing Black: 5 - 5 - 4  [0.500] 14
...      White vs Black: 14 - 6 - 8  [0.643] 28
Elo difference: 102.1 +/- 116.5, LOS: 96.3 %, DrawRatio: 28.6 %

Admete 1.4.0: ~47.5%

Score of Lynx 1807 ponder vs Admete 1.4.0: 36 - 41 - 23  [0.475] 100
...      Lynx 1807 ponder playing White: 19 - 18 - 14  [0.510] 51
...      Lynx 1807 ponder playing Black: 17 - 23 - 9  [0.439] 49
...      White vs Black: 42 - 35 - 23  [0.535] 100
Elo difference: -17.4 +/- 60.3, LOS: 28.4 %, DrawRatio: 23.0 %
SPRT: llr 0 (0.0%), lbound -inf, ubound inf

Princhess 0.9.0: ~57.5%

Finished game 99 (Lynx 1807 - ponder vs Princhess 0.9.0): 1-0 {White mates}
Score of Lynx 1807 - ponder vs Princhess 0.9.0: 49 - 34 - 17  [0.575] 100
...      Lynx 1807 - ponder playing White: 25 - 17 - 8  [0.580] 50
...      Lynx 1807 - ponder playing Black: 24 - 17 - 9  [0.570] 50
...      White vs Black: 42 - 41 - 17  [0.505] 100
Elo difference: 52.5 +/- 63.2, LOS: 95.0 %, DrawRatio: 17.0 %

Please sign in to comment.