Skip to content

History_second_order #6223

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

Conversation

AliceRoselia
Copy link
Contributor

Passed STC:
LLR: 2.97 (-2.94,2.94) <0.00,2.00>
Total: 72864 W: 19060 L: 18690 D: 35114
Ptnml(0-2): 208, 8420, 18832, 8738, 234
https://tests.stockfishchess.org/tests/view/6897e839f8a258623dda6e73

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 52890 W: 13807 L: 13456 D: 25627
Ptnml(0-2): 29, 5643, 14752, 5990, 31
https://tests.stockfishchess.org/tests/live_elo/6897c5eaf8a258623dda6dfb

However, this patch involves quite a large tune.
The untuned version passed STC:
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 38176 W: 10103 L: 9785 D: 18288
Ptnml(0-2): 121, 4371, 9803, 4655, 138
https://tests.stockfishchess.org/tests/view/6896da31f8a258623dda69d8
The untuned version failed LTC:
LLR: -2.94 (-2.94,2.94) <0.50,2.50>
Total: 97284 W: 24948 L: 24991 D: 47345
Ptnml(0-2): 54, 10576, 27418, 10547, 47
https://tests.stockfishchess.org/tests/live_elo/6896dfc7f8a258623dda69e1

Currently, removing the second-order history while maintaining the tuned value seems to be about neutral at LTC. The VLTC could either pass or fail. This suggests a very complex relationship.

bench: 3068005

What do you think? If it were me, I would merge the patch and wait for the VVLTC tune before attempting to simplify away this second-order history.

bench: 3068005
Copy link

clang-format 20 needs to be run on this PR.
If you do not have clang-format installed, the maintainer will run it when merging.
For the exact version please see https://packages.ubuntu.com/plucky/clang-format-20.

(execution 16859129105 / attempt 1)

@vondele
Copy link
Member

vondele commented Aug 10, 2025

CI:


Error: 

Test Suite: TestSyzygy
    Running test_syzygy_setup... 
    ✓ test_syzygy_setup (1092.34ms)
    Running test_syzygy_bench... 
    ✗ test_syzygy_bench (1883.26ms)
    File "/home/runner/work/Stockfish/Stockfish/tests/testing.py", line 221, in __run_test_method
      test_instance.afterEach()
    File "/home/runner/work/Stockfish/Stockfish/src/../tests/instrumented.py", line 425, in afterEach
      assert postfix_check(self.stockfish.get_output()) == True
    ⎯⎯⎯⎯⎯OUTPUT⎯⎯⎯⎯⎯
    history.h:89:112: runtime error: signed integer overflow: 1430416 * 2603 cannot be represented in type 'int'
    history.h:89:112: runtime error: signed integer overflow: 784996 * -2873 cannot be represented in type 'int'
    history.h:89:112: runtime error: signed integer overflow: 1106704 * -2114 cannot be represented in type 'int'
    info depth 3 seldepth 4 multipv 1 score cp 40 nodes 159 nps 53000 hashfull 0 tbhits 0 time 3 pv e2e4
    history.h:89:112: runtime error: signed integer overflow: 1085764 * -2195 cannot be represented in type 'int'
    info depth 4 seldepth 6 multipv 1 score cp 37 nodes 577 nps 57700 hashfull 0 tbhits 0 time 10 pv e2e4 e7e5 g1f3 b8c6
    info depth 5 seldepth 6 multipv 1 score cp 37 nodes 690 nps 57500 hashfull 0 tbhits 0 time 12 pv e2e4 c7c5 b1c3 b8c6
    info depth 6 seldepth 9 multipv 1 score cp 35 nodes 1369 nps 65190 hashfull 0 tbhits 0 time 21 pv e2e4 c7c5 b1c3 b8c6
    ```

@AliceRoselia
Copy link
Contributor Author

CI:


Error: 

Test Suite: TestSyzygy
    Running test_syzygy_setup... 
    ✓ test_syzygy_setup (1092.34ms)
    Running test_syzygy_bench... 
    ✗ test_syzygy_bench (1883.26ms)
    File "/home/runner/work/Stockfish/Stockfish/tests/testing.py", line 221, in __run_test_method
      test_instance.afterEach()
    File "/home/runner/work/Stockfish/Stockfish/src/../tests/instrumented.py", line 425, in afterEach
      assert postfix_check(self.stockfish.get_output()) == True
    ⎯⎯⎯⎯⎯OUTPUT⎯⎯⎯⎯⎯
    history.h:89:112: runtime error: signed integer overflow: 1430416 * 2603 cannot be represented in type 'int'
    history.h:89:112: runtime error: signed integer overflow: 784996 * -2873 cannot be represented in type 'int'
    history.h:89:112: runtime error: signed integer overflow: 1106704 * -2114 cannot be represented in type 'int'
    info depth 3 seldepth 4 multipv 1 score cp 40 nodes 159 nps 53000 hashfull 0 tbhits 0 time 3 pv e2e4
    history.h:89:112: runtime error: signed integer overflow: 1085764 * -2195 cannot be represented in type 'int'
    info depth 4 seldepth 6 multipv 1 score cp 37 nodes 577 nps 57700 hashfull 0 tbhits 0 time 10 pv e2e4 e7e5 g1f3 b8c6
    info depth 5 seldepth 6 multipv 1 score cp 37 nodes 690 nps 57500 hashfull 0 tbhits 0 time 12 pv e2e4 c7c5 b1c3 b8c6
    info depth 6 seldepth 9 multipv 1 score cp 35 nodes 1369 nps 65190 hashfull 0 tbhits 0 time 21 pv e2e4 c7c5 b1c3 b8c6
    ```

How on earth did it even pass fishtest? It had the undefined behavior all along?

My bad. Let's close this PR. I'm going to test the fixed version.

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.

2 participants