Skip to content

Commit

Permalink
Retire asymmThreshold
Browse files Browse the repository at this point in the history
Verified with 40K games at long TC does not regress:
ELO: 1.74 +-1.9 (95%) LOS: 96.2%
Total: 39624 W: 6402 L: 6203 D: 27019

bench: 7762310
  • Loading branch information
mcostalba committed Dec 30, 2013
1 parent 59a9bc9 commit f774266
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
11 changes: 1 addition & 10 deletions src/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ int Position::see_sign(Move m) const {
return see(m);
}

int Position::see(Move m, int asymmThreshold) const {
int Position::see(Move m) const {

Square from, to;
Bitboard occupied, attackers, stmAttackers;
Expand Down Expand Up @@ -1096,15 +1096,6 @@ int Position::see(Move m, int asymmThreshold) const {

} while (stmAttackers);

// If we are doing asymmetric SEE evaluation and the same side does the first
// and the last capture, it loses a tempo and gain must be at least worth
// 'asymmThreshold', otherwise we replace the score with a very low value,
// before negamaxing.
if (asymmThreshold)
for (int i = 0; i < slIndex; i += 2)
if (swapList[i] < asymmThreshold)
swapList[i] = - QueenValueMg * 16;

// Having built the swap list, we negamax through it to find the best
// achievable score from the point of view of the side to move.
while (--slIndex)
Expand Down
2 changes: 1 addition & 1 deletion src/position.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class Position {
void undo_null_move();

// Static exchange evaluation
int see(Move m, int asymmThreshold = 0) const;
int see(Move m) const;
int see_sign(Move m) const;

// Accessing hash keys
Expand Down
5 changes: 1 addition & 4 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1220,10 +1220,7 @@ namespace {
continue;
}

// Prune moves with negative or equal SEE and also moves with positive
// SEE where capturing piece loses a tempo and SEE < beta - futilityBase.
if ( futilityBase < beta
&& pos.see(move, beta - futilityBase) <= 0)
if (futilityBase < beta && pos.see(move) <= 0)
{
bestValue = std::max(bestValue, futilityBase);
continue;
Expand Down

0 comments on commit f774266

Please sign in to comment.