Retire pawn storm evaluation

More then 100 lines of almost useless evaluations. Prefer
code semplification to a very small and dubious advantage.

After 7457 games on russian cluster:
Mod - Orig: 1285 - 1334 - 4838  ELO -2 (+- 3.2)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Joona Kiiski
2010-09-06 10:53:10 +03:00
committed by Marco Costalba
parent 5b5b496a6d
commit fa2478a81f
3 changed files with 7 additions and 112 deletions

View File

@@ -336,26 +336,11 @@ Value do_evaluate(const Position& pos, Value margins[]) {
Phase phase = mi->game_phase();
// Middle-game specific evaluation terms
if (phase > PHASE_ENDGAME)
// Evaluate space for both sides, only in middle-game.
if (phase > PHASE_ENDGAME && mi->space_weight() > 0)
{
// Evaluate pawn storms in positions with opposite castling
if ( square_file(pos.king_square(WHITE)) >= FILE_E
&& square_file(pos.king_square(BLACK)) <= FILE_D)
bonus += make_score(ei.pi->queenside_storm_value(WHITE) - ei.pi->kingside_storm_value(BLACK), 0);
else if ( square_file(pos.king_square(WHITE)) <= FILE_D
&& square_file(pos.king_square(BLACK)) >= FILE_E)
bonus += make_score(ei.pi->kingside_storm_value(WHITE) - ei.pi->queenside_storm_value(BLACK), 0);
// Evaluate space for both sides
if (mi->space_weight() > 0)
{
int s = evaluate_space<WHITE, HasPopCnt>(pos, ei) - evaluate_space<BLACK, HasPopCnt>(pos, ei);
bonus += apply_weight(make_score(s * mi->space_weight(), 0), Weights[Space]);
}
int s = evaluate_space<WHITE, HasPopCnt>(pos, ei) - evaluate_space<BLACK, HasPopCnt>(pos, ei);
bonus += apply_weight(make_score(s * mi->space_weight(), 0), Weights[Space]);
}
// If we don't already have an unusual scale factor, check for opposite