mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Revert previous patch
Improvement is easily in error bar and there is some added complexity making future changes more difficult. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
26a8b84417
commit
5c3aeae566
1 changed files with 2 additions and 8 deletions
|
@ -183,7 +183,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns,
|
||||||
Square s;
|
Square s;
|
||||||
File f;
|
File f;
|
||||||
Rank r;
|
Rank r;
|
||||||
int bonus, backwardWeight;
|
int bonus;
|
||||||
bool passed, isolated, doubled, opposed, chain, backward, candidate;
|
bool passed, isolated, doubled, opposed, chain, backward, candidate;
|
||||||
Score value = make_score(0, 0);
|
Score value = make_score(0, 0);
|
||||||
const Square* ptr = pos.piece_list_begin(Us, PAWN);
|
const Square* ptr = pos.piece_list_begin(Us, PAWN);
|
||||||
|
@ -227,7 +227,6 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns,
|
||||||
// Test for backward pawn
|
// Test for backward pawn
|
||||||
//
|
//
|
||||||
backward = false;
|
backward = false;
|
||||||
backwardWeight = 6;
|
|
||||||
|
|
||||||
// If the pawn is passed, isolated, or member of a pawn chain
|
// If the pawn is passed, isolated, or member of a pawn chain
|
||||||
// it cannot be backward. If can capture an enemy pawn or if
|
// it cannot be backward. If can capture an enemy pawn or if
|
||||||
|
@ -246,12 +245,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns,
|
||||||
// Note that we are sure to find something because pawn is not passed
|
// Note that we are sure to find something because pawn is not passed
|
||||||
// nor isolated, so loop is potentially infinite, but it isn't.
|
// nor isolated, so loop is potentially infinite, but it isn't.
|
||||||
while (!(b & (ourPawns | theirPawns)))
|
while (!(b & (ourPawns | theirPawns)))
|
||||||
{
|
|
||||||
Us == WHITE ? b <<= 8 : b >>= 8;
|
Us == WHITE ? b <<= 8 : b >>= 8;
|
||||||
backwardWeight--;
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(backwardWeight > 0);
|
|
||||||
|
|
||||||
// The friendly pawn needs to be at least two ranks closer than the enemy
|
// The friendly pawn needs to be at least two ranks closer than the enemy
|
||||||
// pawn in order to help the potentially backward pawn advance.
|
// pawn in order to help the potentially backward pawn advance.
|
||||||
|
@ -288,7 +282,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns,
|
||||||
|
|
||||||
if (backward)
|
if (backward)
|
||||||
{
|
{
|
||||||
value -= backwardWeight * BackwardPawnPenalty[f] / 4;
|
value -= BackwardPawnPenalty[f];
|
||||||
if (!opposed)
|
if (!opposed)
|
||||||
value -= BackwardPawnPenalty[f] / 2;
|
value -= BackwardPawnPenalty[f] / 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue