Introduce scale factor in pawn evaluation

The idea is to reduce the score if we have many
pawns opposing an enemy pawn so that the draw
possibility increases.

Just introduced the logic, but no functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2010-04-18 10:25:59 +01:00
parent c23cd4d90a
commit 6b7efa0cd1
5 changed files with 33 additions and 6 deletions

View File

@@ -304,7 +304,7 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) {
{
if ( pos.non_pawn_material(c) == pos.non_pawn_material(opposite_color(c))
|| pos.non_pawn_material(c) < RookValueMidgame)
mi->factor[c] = 0;
mi->factor[c] = SCALE_FACTOR_ZERO;
else
{
switch (pos.piece_count(c, BISHOP)) {