]> git.sesse.net Git - stockfish/commit
A better contempt implementation for Stockfish (#1325)
authorStéphane Nicolet <cassio@free.fr>
Tue, 5 Dec 2017 06:25:42 +0000 (07:25 +0100)
committerMarco Costalba <mcostalba@users.noreply.github.com>
Tue, 5 Dec 2017 06:25:42 +0000 (07:25 +0100)
commitbe382bb0cf5927dc10ff9be882f6980a78d1484a
treef8de46e9f5274d3a1004a37454ae4a516fec1226
parentd19348221395a5939603bbd1364fda60e4ffd2ee
A better contempt implementation for Stockfish (#1325)

* A better contempt implementation for Stockfish

The round 2 of TCEC season 10 demonstrated the benefit of having a nice contempt implementation: it gives the strongest programs in the tournament the ability to slow down the game when they feel the position is slightly worse, prefering to stay in a complicated (even if slightly risky) middle game rather than simplifying by force into a drawn endgame.

The current contempt implementation of Stockfish is inadequate, and this patch is an attempt to provide a better one.

Passed STC non-regression test against master:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 83360 W: 15089 L: 15075 D: 53196
http://tests.stockfishchess.org/tests/view/5a1bf2de0ebc590ccbb8b370

This contempt implementation is showing promising results in certains situations. For instance, it obtained a nice +30 Elo gain when playing with contempt=40 against Stockfish 7, compared to current master:

• master against SF 7 (20000 games at LTC): +121.2 Elo
• this patch with contempt=40 (20000 games at LTC): +154.11 Elo

This was the result of real cooperative work from the Stockfish team, with key ideas coming from Stefan Geschwentner (locutus2) and Chris Cain (ceebo) while most of the community helped with feedback and computer time.

In this commit the bench is unchanged by default, but you can test at home with the new contempt in the UCI options. The style of play will change a lot when using contempt different of zero (I repeat: not done in this version by default, however)!

The Stockfish team is still deliberating over the best default contempt value in self-play and the best contempt modeling strategy, to help users choosing a contempt value when playing against much weaker programs. These informations will be given in future commits when available :-)

Bench: 5051254

* Remove the prefetch

No functional change.
src/evaluate.cpp
src/evaluate.h
src/search.cpp