Revert "Symmetric king safety"

Regression test of 40K games at 60 secs shows
this commit to be a 2-3 ELO regression.

So revert to original king safety.

bench: 8732553
This commit is contained in:
Marco Costalba
2014-05-26 21:39:48 +02:00
parent 495a0fa699
commit ad937d0b2d
5 changed files with 27 additions and 16 deletions

View File

@@ -42,6 +42,7 @@ namespace Search {
LimitsType Limits;
std::vector<RootMove> RootMoves;
Position RootPos;
Color RootColor;
Time::point SearchTime;
StateStackPtr SetupStates;
}
@@ -181,11 +182,12 @@ void Search::think() {
static PolyglotBook book; // Defined static to initialize the PRNG only once
TimeMgr.init(Limits, RootPos.game_ply(), RootPos.side_to_move());
RootColor = RootPos.side_to_move();
TimeMgr.init(Limits, RootPos.game_ply(), RootColor);
int cf = Options["Contempt Factor"] * PawnValueEg / 100; // From centipawns
DrawValue[ RootPos.side_to_move()] = VALUE_DRAW - Value(cf);
DrawValue[~RootPos.side_to_move()] = VALUE_DRAW + Value(cf);
DrawValue[ RootColor] = VALUE_DRAW - Value(cf);
DrawValue[~RootColor] = VALUE_DRAW + Value(cf);
if (RootMoves.empty())
{
@@ -214,8 +216,8 @@ void Search::think() {
log << "\nSearching: " << RootPos.fen()
<< "\ninfinite: " << Limits.infinite
<< " ponder: " << Limits.ponder
<< " time: " << Limits.time[RootPos.side_to_move()]
<< " increment: " << Limits.inc[RootPos.side_to_move()]
<< " time: " << Limits.time[RootColor]
<< " increment: " << Limits.inc[RootColor]
<< " moves to go: " << Limits.movestogo
<< "\n" << std::endl;
}