]> git.sesse.net Git - stockfish/commit
Simplify casting extension
author31m059 <37052095+31m059@users.noreply.github.com>
Sat, 24 Nov 2018 06:55:09 +0000 (01:55 -0500)
committerStéphane Nicolet <cassio@free.fr>
Tue, 27 Nov 2018 07:53:14 +0000 (08:53 +0100)
commit7b6fa353a3858b092e1a43ef69b3035cb5d3b5c0
tree22480a9de2adfaa6d066dc0059c27e8607669386
parentde7182f4eee33029a7b79f6b097db06357669127
Simplify casting extension

On November 16th, before the removal of the depth condition, I tried
revising castling extensions to only handle castling moves, rather than
moves that change castling rights generally. It appeared to be a slight
Elo gain at STC but insufficient to pass [0, 4] (+0.5 Elo), but what I
overlooked was that it made pos.can_castle(us) irrelevant and should
have been a simplification. Recent discussion with @Chess13234 and
Michael Chaly (@Vizvezdenec) inspired me to take a second look, and
the simplification continues to pass when rebased on the current master.

This replaces two conditions with one, because type_of(move) == CASTLING
implies pos.can_castle(Us), allowing us to remove the latter condition.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 110948 W: 24209 L: 24263 D: 62476
http://tests.stockfishchess.org/tests/view/5bf8f65c0ebc5902bced3a63

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 88283 W: 14681 L: 14668 D: 58934
http://tests.stockfishchess.org/tests/view/5bf994a60ebc5902bced4349

Bench: 3939338
src/search.cpp