mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Revert dynamic contempt
On a final fixed game number test it failed to prove better than standard version. STC 15+0.05 ELO: -0.86 +-1.7 (95%) LOS: 15.8% Total: 57578 W: 10070 L: 10213 D: 37295 bench: 8802105
This commit is contained in:
@@ -45,7 +45,6 @@ namespace Search {
|
|||||||
Color RootColor;
|
Color RootColor;
|
||||||
Time::point SearchTime;
|
Time::point SearchTime;
|
||||||
StateStackPtr SetupStates;
|
StateStackPtr SetupStates;
|
||||||
Value Contempt[2]; // [bestValue > VALUE_DRAW]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
@@ -186,9 +185,9 @@ void Search::think() {
|
|||||||
RootColor = RootPos.side_to_move();
|
RootColor = RootPos.side_to_move();
|
||||||
TimeMgr.init(Limits, RootPos.game_ply(), RootColor);
|
TimeMgr.init(Limits, RootPos.game_ply(), RootColor);
|
||||||
|
|
||||||
DrawValue[0] = DrawValue[1] = VALUE_DRAW;
|
int cf = Options["Contempt Factor"] * PawnValueEg / 100; // From centipawns
|
||||||
Contempt[0] = Options["Contempt Factor"] * PawnValueEg / 100; // From centipawns
|
DrawValue[ RootColor] = VALUE_DRAW - Value(cf);
|
||||||
Contempt[1] = (Options["Contempt Factor"] + 12) * PawnValueEg / 100;
|
DrawValue[~RootColor] = VALUE_DRAW + Value(cf);
|
||||||
|
|
||||||
if (RootMoves.empty())
|
if (RootMoves.empty())
|
||||||
{
|
{
|
||||||
@@ -340,9 +339,6 @@ namespace {
|
|||||||
{
|
{
|
||||||
bestValue = search<Root>(pos, ss, alpha, beta, depth * ONE_PLY, false);
|
bestValue = search<Root>(pos, ss, alpha, beta, depth * ONE_PLY, false);
|
||||||
|
|
||||||
DrawValue[ RootColor] = VALUE_DRAW - Contempt[bestValue > VALUE_DRAW];
|
|
||||||
DrawValue[~RootColor] = VALUE_DRAW + Contempt[bestValue > VALUE_DRAW];
|
|
||||||
|
|
||||||
// Bring the best move to the front. It is critical that sorting
|
// Bring the best move to the front. It is critical that sorting
|
||||||
// is done with a stable algorithm because all the values but the
|
// is done with a stable algorithm because all the values but the
|
||||||
// first and eventually the new best one are set to -VALUE_INFINITE
|
// first and eventually the new best one are set to -VALUE_INFINITE
|
||||||
|
|||||||
Reference in New Issue
Block a user