jhonnold / berserk

UCI Chess Engine written in C
GNU General Public License v3.0
200 stars 32 forks source link

Update move legality logic in Berserk #427

Closed jhonnold closed 1 year ago

jhonnold commented 1 year ago

Bench: 5093215

This is a speed up of 2-3%. Save on IsLegal checks by doing them as the move is returned from NextMove rather than all at generation time. This way cutoffs save, IsLegal calls.

No LTC was run as this is a speedup.

STC One

ELO   | 2.25 +- 2.24 (95%)
SPRT  | 10.0+0.10s Threads=1 Hash=8MB
LLR   | 1.92 (-2.94, 2.94) [0.00, 3.00]
GAMES | N: 43472 W: 10435 L: 10154 D: 22883

STC Two

ELO   | 4.86 +- 3.97 (95%)
SPRT  | 10.0+0.10s Threads=1 Hash=8MB
LLR   | 2.95 (-2.94, 2.94) [-2.50, 0.50]
GAMES | N: 13936 W: 3398 L: 3203 D: 7335

SMP STC Sanity Check

ELO   | 4.86 +- 6.44 (95%)
CONF  | 5.0+0.05s Threads=8 Hash=64MB
GAMES | N: 5000 W: 1156 L: 1086 D: 2758