Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔍 Tune search values (spsa) + define limits and steps in code #730

Merged
merged 10 commits into from
May 9, 2024

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented May 9, 2024

  • Add SPSAAttribute<T> to define in the code param limits and steps

  • Use it for all search tunable parameters in Configuration.EngineSettings

  • Add NMP_DepthIncrement and NMP_DepthDivisor instead of having them hardcoded

  • Fix see_badcapturereduction UCI handling

  • Add ob_spsa, ob_spsa_pretty and wf_spsa UCI commands to print spsa inputs

  • Add WF tuned values

    graph

40+0.4, [0,3]

Score of Lynx-spsa-ob-setup-wf-tuning-2915-win-x64 vs Lynx 2907 - main: 465 - 264 - 492  [0.582] 1221
...      Lynx-spsa-ob-setup-wf-tuning-2915-win-x64 playing White: 334 - 61 - 215  [0.724] 610
...      Lynx-spsa-ob-setup-wf-tuning-2915-win-x64 playing Black: 131 - 203 - 277  [0.441] 611
...      White vs Black: 537 - 192 - 492  [0.641] 1221
Elo difference: 57.7 +/- 15.1, LOS: 100.0 %, DrawRatio: 40.3 %
SPRT: llr 2.9 (100.2%), lbound -2.25, ubound 2.89 - H1 was accepted

Non reg of the last commit

Test  | 12768EFA7186FE81
Elo   | 1.29 +- 3.05 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | 2.89 (-2.25, 2.89) [-3.00, 1.00]
Games | 30602: +9450 -9336 =11816
Penta | [996, 3424, 6364, 3504, 1013]
https://openbench.lynx-chess.com/test/294/
Final state.json
{
   "t":127680,
   "spsa_params":{
      "a":1.0,
      "c":1.0,
      "A":205,
      "alpha":0.601,
      "gamma":0.102
   },
   "uci_params":[
      {
         "name":"LMR_MinDepth",
         "value":3.169790140437203,
         "min_value":1,
         "max_value":10,
         "step":1
      },
      {
         "name":"LMR_MinFullDepthSearchedMoves",
         "value":3.0699829145153457,
         "min_value":1,
         "max_value":10,
         "step":1
      },
      {
         "name":"LMR_Base",
         "value":85.04041902144512,
         "min_value":10,
         "max_value":200,
         "step":10
      },
      {
         "name":"LMR_Divisor",
         "value":311.92909201816406,
         "min_value":100,
         "max_value":500,
         "step":10
      },
      {
         "name":"NMP_MinDepth",
         "value":2.9240154227990063,
         "min_value":1,
         "max_value":10,
         "step":1
      },
      {
         "name":"NMP_BaseDepthReduction",
         "value":2.1548462469075966,
         "min_value":1,
         "max_value":5,
         "step":1
      },
      {
         "name":"NMP_DepthIncrement",
         "value":1.4371652535715362,
         "min_value":0,
         "max_value":20,
         "step":1
      },
      {
         "name":"NMP_DepthDivisor",
         "value":5.161886890131617,
         "min_value":1,
         "max_value":20,
         "step":1
      },
      {
         "name":"AspirationWindow_Delta",
         "value":12.271652248927143,
         "min_value":1,
         "max_value":100,
         "step":5
      },
      {
         "name":"AspirationWindow_MinDepth",
         "value":7.13661848273475,
         "min_value":1,
         "max_value":20,
         "step":1
      },
      {
         "name":"RFP_MaxDepth",
         "value":6.215409308542844,
         "min_value":1,
         "max_value":20,
         "step":1
      },
      {
         "name":"RFP_DepthScalingFactor",
         "value":107.30487482680617,
         "min_value":1,
         "max_value":300,
         "step":5
      },
      {
         "name":"Razoring_MaxDepth",
         "value":1.8292854104271135,
         "min_value":1,
         "max_value":10,
         "step":1
      },
      {
         "name":"Razoring_Depth1Bonus",
         "value":83.77576659864671,
         "min_value":1,
         "max_value":300,
         "step":10
      },
      {
         "name":"Razoring_NotDepth1Bonus",
         "value":134.6406040762632,
         "min_value":1,
         "max_value":300,
         "step":10
      },
      {
         "name":"IIR_MinDepth",
         "value":3.0404906532851825,
         "min_value":1,
         "max_value":10,
         "step":1
      },
      {
         "name":"LMP_MaxDepth",
         "value":5.571621108222434,
         "min_value":1,
         "max_value":10,
         "step":1
      },
      {
         "name":"LMP_BaseMovesToTry",
         "value":0.2203536646341653,
         "min_value":0,
         "max_value":10,
         "step":1
      },
      {
         "name":"LMP_MovesDepthMultiplier",
         "value":4.220206809731811,
         "min_value":0,
         "max_value":50,
         "step":1
      },
      {
         "name":"SEE_BadCaptureReduction",
         "value":2.0559429303265633,
         "min_value":0,
         "max_value":3,
         "step":1
      }
   ]
}

@eduherminio eduherminio marked this pull request as ready for review May 9, 2024 21:36
@eduherminio eduherminio merged commit b4e88ae into main May 9, 2024
27 checks passed
@eduherminio eduherminio deleted the spsa/ob-setup-wf-tuning branch May 9, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant