bmc4 and Stéphane Nicolet
5089061659
Change definition of between_bb()
...
We remark that in current master, most of our use cases for between_bb() can be
optimized if the second parameter of the function is added to the segment. So we
change the definition of between_bb(s1, s2) such that it excludes s1 but includes s2.
We also use a precomputed array for between_bb() for another small speed gain
(see https://tests.stockfishchess.org/tests/view/604d09f72433018de7a389fb ).
Passed STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 18736 W: 1746 L: 1607 D: 15383
Ptnml(0-2): 61, 1226, 6644, 1387, 50
https://tests.stockfishchess.org/tests/view/60428c84ddcba5f0627bb6e4
Yellow LTC:
LTC:
LLR: -3.00 (-2.94,2.94) {0.25,1.25}
Total: 39144 W: 1431 L: 1413 D: 36300
Ptnml(0-2): 13, 1176, 17184, 1178, 21
https://tests.stockfishchess.org/tests/view/605128702433018de7a38ca1
Closes https://github.com/official-stockfish/Stockfish/pull/3397
---------
Verified for correctness by running perft on the following position:
./stockfish
position fen 4rrk1/1p1nq3/p7/2p1P1pp/3P2bp/3Q1Bn1/PPPB4/1K2R1NR w - - 40 21
go perft 6
Nodes searched: 6136386434
--------
No functional change
2021-03-18 00:21:41 +01:00
bmc4 and Stéphane Nicolet
830f597134
Simplify move generation (2/2)
...
STC:
LLR: 2.97 (-2.94,2.94) {-1.25,0.25}
Total: 39352 W: 3551 L: 3493 D: 32308
Ptnml(0-2): 143, 2695, 13928, 2781, 129
https://tests.stockfishchess.org/tests/view/6050007a2433018de7a38bbb
LTC:
LLR: 2.96 (-2.94,2.94) {-0.75,0.25}
Total: 44944 W: 1629 L: 1596 D: 41719
Ptnml(0-2): 22, 1319, 19762, 1342, 27
https://tests.stockfishchess.org/tests/view/60500e892433018de7a38bc4
Closes https://github.com/official-stockfish/Stockfish/pull/3399
No functional change
2021-03-16 22:34:23 +01:00
bmc4 and Stéphane Nicolet
4b509559fb
Simplify move generation (1/2)
...
STC:
LLR: 2.95 (-2.94,2.94) {-1.25,0.25}
Total: 29792 W: 2611 L: 2545 D: 24636
Ptnml(0-2): 94, 1982, 10659, 2086, 75
https://tests.stockfishchess.org/tests/view/604fe5b62433018de7a38ba8
LTC:
LLR: 2.92 (-2.94,2.94) {-0.75,0.25}
Total: 22040 W: 826 L: 777 D: 20437
Ptnml(0-2): 8, 646, 9664, 693, 9
https://tests.stockfishchess.org/tests/view/604fec892433018de7a38bac
Closes https://github.com/official-stockfish/Stockfish/pull/3399
No functional change
2021-03-16 22:32:53 +01:00
bmc4 and Stéphane Nicolet
939395729c
Introduce least_significant_square_bb()
...
Introducing least_significant_square_bb(). It is a function that returns a value equal
to square_bb(lsb(bb)), but it uses fewer instruction. It should speed up more on older
processors like armv7-a Clang.
Passed STC:
LLR: 2.93 (-2.94,2.94) {-0.25,1.25}
Total: 213200 W: 19171 L: 18753 D: 175276
Ptnml(0-2): 680, 14513, 75831, 14861, 715
https://tests.stockfishchess.org/tests/view/604bc7632433018de7a38982
Closes https://github.com/official-stockfish/Stockfish/pull/3391
No functional change
2021-03-16 20:54:52 +01:00
bmc4 and Joost VandeVondele
b74274628c
Use Bitboard over Square in movegen
...
It uses pos.checkers() on target when movegen is the type of EVASION.
It simplify the code. And it's also expected a slightly speed up,
because Bitboard is more direct when doing bitwise.
Passed STC:
LLR: 2.93 (-2.94,2.94) {-1.25,0.25}
Total: 28176 W: 2506 L: 2437 D: 23233
Ptnml(0-2): 80, 1904, 10063, 1949, 92
https://tests.stockfishchess.org/tests/view/60421d18ddcba5f0627bb6a9
Passed LTC:
LLR: 2.93 (-2.94,2.94) {-0.75,0.25}
Total: 9704 W: 402 L: 341 D: 8961
Ptnml(0-2): 3, 279, 4230, 334, 6
https://tests.stockfishchess.org/tests/view/60422823ddcba5f0627bb6ae
closes https://github.com/official-stockfish/Stockfish/pull/3383
No functional change
2021-03-07 21:16:38 +01:00
bmc4 and Joost VandeVondele
29ed22de8c
Search Parameters Tuning
...
A simple tuning on search.cpp.
based SPSA test:
https://tests.stockfishchess.org/tests/view/601f2a787f517a561bc493cd
passed STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 117840 W: 10796 L: 10508 D: 96536
Ptnml(0-2): 422, 8381, 41041, 8639, 437
https://tests.stockfishchess.org/tests/view/602144c37f517a561bc494ae
passed LTC:
LLR: 2.96 (-2.94,2.94) {0.25,1.25}
Total: 25024 W: 972 L: 847 D: 23205
Ptnml(0-2): 7, 767, 10847, 876, 15
https://tests.stockfishchess.org/tests/view/602156877f517a561bc494be
closes https://github.com/official-stockfish/Stockfish/pull/3340
Bench: 3974098
2021-02-08 21:42:03 +01:00
bmc4 and Joost VandeVondele
9f8058bd26
Simplify En Passant
...
simplifies the handling of en passant during search, needs a little more care in initialization.
Passed STC:
LLR: 2.95 (-2.94,2.94) {-1.25,0.25}
Total: 72608 W: 6569 L: 6559 D: 59480
Ptnml(0-2): 233, 5117, 25629, 5057, 268
https://tests.stockfishchess.org/tests/view/600f1363735dd7f0f0352ce7
Passed LTC:
LLR: 2.92 (-2.94,2.94) {-0.75,0.25}
Total: 24328 W: 913 L: 864 D: 22551
Ptnml(0-2): 10, 731, 10633, 780, 10
https://tests.stockfishchess.org/tests/view/600f2e93735dd7f0f0352cf6
closes https://github.com/official-stockfish/Stockfish/pull/3330
No functional change.
2021-02-08 21:35:59 +01:00
bmc4 and Stéphane Nicolet
6617ad6e03
Tune ordering of moves at internal nodes
...
We change the relative weights of the function used to order
quiet moves in our MovePicker class.
Passed STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 32184 W: 2936 L: 2773 D: 26475
Ptnml(0-2): 115, 2196, 11328, 2317, 136
https://tests.stockfishchess.org/tests/view/60161ee1735dd7f0f03530f8
Passed LTC:
LLR: 2.93 (-2.94,2.94) {0.25,1.25}
Total: 33088 W: 1292 L: 1149 D: 30647
Ptnml(0-2): 14, 1030, 14318, 1163, 19
https://tests.stockfishchess.org/tests/view/60163146735dd7f0f03530ff
The new weight were chosen after the following SPSA session:
https://tests.stockfishchess.org/tests/view/60136857735dd7f0f0352f6c
Closes https://github.com/official-stockfish/Stockfish/pull/3331
Bench: 4398803
2021-01-31 16:00:06 +01:00
bmc4 and Joost VandeVondele
dd96095214
Simplify Chess 960 castling
...
a little cleanup, and small speedup (about 0.3%) for Chess 960.
Verified with perft on a large set of chess960 positions.
Closes https://github.com/official-stockfish/Stockfish/pull/3317
No functional change
2021-01-31 10:07:02 +01:00
bmc4 and Joost VandeVondele
0db374777e
Speed Up Perft Search
...
It speeds up generate<LEGAL>, and thus perft, roughly by 2-3%.
closes https://github.com/official-stockfish/Stockfish/pull/3312
No functional change
2021-01-31 10:04:41 +01:00
bmc4 and Joost VandeVondele
befbcffb4e
Clean Up Castling in gives_check
...
There is no need to add rto or kto on the Bitboard which represents the pieces.
STC:
LLR: 2.93 (-2.94,2.94) {-1.25,0.25}
Total: 57064 W: 5096 L: 5067 D: 46901
Ptnml(0-2): 202, 3862, 20355, 3931, 182
https://tests.stockfishchess.org/tests/view/6005ea2c6019e097de3efa55
LTC:
LLR: 2.92 (-2.94,2.94) {-0.75,0.25}
Total: 30088 W: 1094 L: 1052 D: 27942
Ptnml(0-2): 10, 882, 13217, 926, 9
https://tests.stockfishchess.org/tests/view/6006115a6019e097de3efa6e
closes https://github.com/official-stockfish/Stockfish/pull/3311
No functional change.
2021-01-31 10:02:10 +01:00
bmc4 and Joost VandeVondele
7d0a16e06d
Avoid more expensive legality check
...
speedup of the code, enough to pass STC, failed LTC.
Passed STC:
LLR: 2.93 (-2.94,2.94) {-0.25,1.25}
Total: 68928 W: 6334 L: 6122 D: 56472
Ptnml(0-2): 233, 4701, 24369, 4943, 218
https://tests.stockfishchess.org/tests/view/6002747f6019e097de3ef8dc
Failed LTC:
LLR: -2.96 (-2.94,2.94) {0.25,1.25}
Total: 44560 W: 1702 L: 1675 D: 41183
Ptnml(0-2): 25, 1383, 19438, 1408, 26
https://tests.stockfishchess.org/tests/view/6002a4836019e097de3ef8e3
About 1% speedup:
Result of 50 runs
==================
base (...kfish.master) = 2237500 +/- 7428
test (...ckfish.patch) = 2267003 +/- 7017
diff = +29503 +/- 4774
speedup = +0.0132
P(speedup > 0) = 1.0000
closes https://github.com/official-stockfish/Stockfish/pull/3304
No functional change.
2021-01-31 10:00:17 +01:00
bmc4 and Joost VandeVondele
4d30438400
Remove Condition from Generate_Move Loop
...
it seems it's faster to handle blockers_for_king(~Us) outside loops
Passed STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 22184 W: 2063 L: 1919 D: 18202
Ptnml(0-2): 63, 1485, 7855, 1623, 66
https://tests.stockfishchess.org/tests/view/5ffbee2f6019e097de3ef18d
closes https://github.com/official-stockfish/Stockfish/pull/3299
No functional change
2021-01-11 18:41:47 +01:00