-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Different eval parameters for smallnet and psqtOnly #5122
Different eval parameters for smallnet and psqtOnly #5122
Conversation
Passed STC: https://tests.stockfishchess.org/tests/view/65f4b0020ec64f0526c4a3bd LLR: 2.96 (-2.94,2.94) <0.00,2.00> Total: 168064 W: 43507 L: 42987 D: 81570 Ptnml(0-2): 662, 19871, 42445, 20393, 661 Passed LTC: https://tests.stockfishchess.org/tests/view/65f6be1a0ec64f0526c4c361 LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 162564 W: 41188 L: 40604 D: 80772 Ptnml(0-2): 120, 18112, 44216, 18732, 102 Bench: 2113576
clang-format 17 needs to be run on this PR. (execution 8339489068 / attempt 1) |
I suggest you make a function for // Blend optimism and eval with nnue complexity and material imbalance
optimism += optimism * (nnueComplexity + std::abs(simpleEval - nnue)) / 513;
nnue -= nnue * (nnueComplexity + std::abs(simpleEval - nnue)) / 32395;
npm = pos.non_pawn_material() / 64;
v = (nnue * (919 + npm + 11 * pos.count<PAWN>()) + optimism * (145 + npm)) / 1036;
// Damp down the evaluation linearly when shuffling
shuffling = pos.rule50_count();
v = v * (178 - shuffling) / 204; and call it with different parameters, instead of copying it 3 times. |
Yeah, probably make small lambda function instead of a free function to avoid passing the nnue and other variables in the function call. |
refactored using arrays, special thanks to @cj5716 for the suggestion. Edit: seems to fail the test for riscv64 |
reformat the code to use arrays. prevents code redundancy Bench: 2113576
da5a564
to
7293ab2
Compare
Bench: 2113576
Bench: 2113576
Bench: 2113576
Bench: 2113576
Bench: 1899570
Gives different eval scaling parameters for the three different types of evaluation (bignet, smallnet, psqtOnly). Passed STC: https://tests.stockfishchess.org/tests/view/65f4b0020ec64f0526c4a3bd LLR: 2.96 (-2.94,2.94) <0.00,2.00> Total: 168064 W: 43507 L: 42987 D: 81570 Ptnml(0-2): 662, 19871, 42445, 20393, 661 Passed LTC: https://tests.stockfishchess.org/tests/view/65f6be1a0ec64f0526c4c361 LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 162564 W: 41188 L: 40604 D: 80772 Ptnml(0-2): 120, 18112, 44216, 18732, 102 closes official-stockfish#5122 Bench: 2113576
Gives different eval scaling parameters for the three different nets (bignet, smallnet, psqtOnly smallnet).
Edit: Special thanks to maintainer @Disservin for making the code more easily readable by refactoring the code to use lambda functions.
Passed STC:
https://tests.stockfishchess.org/tests/view/65f4b0020ec64f0526c4a3bd
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 168064 W: 43507 L: 42987 D: 81570
Ptnml(0-2): 662, 19871, 42445, 20393, 661
Passed LTC:
https://tests.stockfishchess.org/tests/view/65f6be1a0ec64f0526c4c361
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 162564 W: 41188 L: 40604 D: 80772
Ptnml(0-2): 120, 18112, 44216, 18732, 102
Bench: 2113576