sroelants / simbelmyne

A somewhat UCI compliant chess engine that could probably beat you.
GNU General Public License v3.0
15 stars 1 forks source link

Don't copy conthist tables before passing them into `MovePicker::next` #256

Closed sroelants closed 2 months ago

sroelants commented 2 months ago

Not really a bugfix, but very much not what I was intending. Right now, we just copy the entire table and pass a reference into the move picker. What we really want is just a reference to the one, true, conthist table.

The main difference here, apart from performance (?), is that when the move picker actually uses the conthist table (inside score_quiets()), we'll have the most up to date history (the values will be different, because we'll have searched all of the tacticals and their entire subtrees)

Only did a regression test, but looks to gain quite nicely.

Elo   | 11.69 +- 7.72 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=16MB
LLR   | 3.01 (-2.94, 2.94) [-5.00, 0.00]
Games | N: 3776 W: 1176 L: 1049 D: 1551
Penta | [105, 408, 761, 483, 131]
https://chess.samroelants.com/test/158/

bench 7515987