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

🔍 Adjust spsa steps for depth limits + retune #764

Merged
merged 6 commits into from
May 24, 2024
Merged

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented May 22, 2024

  • Allow int spsa attribute steps to be double
  • Print step % vs the (Max-Min) value
  • Adjust some steps to be close to 5% (1/20), mostly for min/max depths

WF tuning at 20+0.2:

Test  | spsa/adjust-steps
Elo   | 5.00 +- 3.65 (95%)
SPRT  | 40.0+0.40s Threads=1 Hash=128MB
LLR   | 2.90 (-2.25, 2.89) [0.00, 3.00]
Games | 20294: +6082 -5790 =8422
Penta | [567, 2355, 4067, 2535, 623]
https://openbench.lynx-chess.com/test/340/

graph

state.json
{
   "t":42688,
   "spsa_params":{
      "a":1.0,
      "c":1.0,
      "A":200,
      "alpha":0.601,
      "gamma":0.102
   },
   "uci_params":[
      {
         "name":"LMR_MinDepth",
         "value":2.8268156204660606,
         "min_value":2,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"LMR_MinFullDepthSearchedMoves",
         "value":3.4717255564639977,
         "min_value":1,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"LMR_Base",
         "value":83.44917883999626,
         "min_value":10,
         "max_value":200,
         "step":10
      },
      {
         "name":"LMR_Divisor",
         "value":343.1047005660493,
         "min_value":100,
         "max_value":500,
         "step":10
      },
      {
         "name":"NMP_MinDepth",
         "value":1.7342703693219679,
         "min_value":1,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"NMP_BaseDepthReduction",
         "value":1.9775965097422588,
         "min_value":1,
         "max_value":5,
         "step":0.5
      },
      {
         "name":"NMP_DepthIncrement",
         "value":0.7976591652874657,
         "min_value":0,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"NMP_DepthDivisor",
         "value":4.368186754525798,
         "min_value":1,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"AspirationWindow_Delta",
         "value":13.240476681114458,
         "min_value":1,
         "max_value":100,
         "step":5
      },
      {
         "name":"AspirationWindow_MinDepth",
         "value":8.428905280664129,
         "min_value":1,
         "max_value":20,
         "step":1
      },
      {
         "name":"RFP_MaxDepth",
         "value":6.484363480556873,
         "min_value":1,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"RFP_DepthScalingFactor",
         "value":96.78397324622169,
         "min_value":1,
         "max_value":300,
         "step":15
      },
      {
         "name":"Razoring_MaxDepth",
         "value":1.0878335322850632,
         "min_value":1,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"Razoring_Depth1Bonus",
         "value":127.23415510165499,
         "min_value":1,
         "max_value":300,
         "step":15
      },
      {
         "name":"Razoring_NotDepth1Bonus",
         "value":149.17422507178492,
         "min_value":1,
         "max_value":300,
         "step":15
      },
      {
         "name":"IIR_MinDepth",
         "value":3.6107460285886255,
         "min_value":1,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"LMP_MaxDepth",
         "value":5.6313222219579515,
         "min_value":1,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"LMP_BaseMovesToTry",
         "value":0.13646984012136912,
         "min_value":0,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"LMP_MovesDepthMultiplier",
         "value":3.292520372798406,
         "min_value":0,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"SEE_BadCaptureReduction",
         "value":1.4042014937097036,
         "min_value":0,
         "max_value":6,
         "step":0.5
      },
      {
         "name":"FP_MaxDepth",
         "value":5.077205301370297,
         "min_value":1,
         "max_value":10,
         "step":0.5
      },
      {
         "name":"FP_DepthScalingFactor",
         "value":61.95922161529346,
         "min_value":1,
         "max_value":200,
         "step":10
      },
      {
         "name":"FP_Margin",
         "value":170.1490387241193,
         "min_value":0,
         "max_value":500,
         "step":25
      }
   ]
}

@eduherminio eduherminio marked this pull request as ready for review May 24, 2024 09:27
@eduherminio eduherminio enabled auto-merge (squash) May 24, 2024 09:28
@eduherminio eduherminio merged commit 2bf27de into main May 24, 2024
27 checks passed
@eduherminio eduherminio deleted the spsa/adjust-steps branch May 24, 2024 09:30
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