Skip to content
Permalink
Browse files

tveack.

bench 3763515
  • Loading branch information...
Vizvezdenec committed Jun 13, 2019
1 parent 3acba58 commit 22607b019d2ba6121cf2d692207705cc5a24ee21
Showing with 5 additions and 10 deletions.
  1. +4 −9 src/evaluate.cpp
  2. +1 −1 src/search.cpp
@@ -171,7 +171,7 @@ namespace {
template<Color Us> Score king() const;
template<Color Us> Score threats() const;
template<Color Us> Score passed() const;
template<Color Us> Score space();
template<Color Us> Score space() const;
ScaleFactor scale_factor(Value eg) const;
Score initiative(Value eg) const;

@@ -210,7 +210,6 @@ namespace {
// a white knight on g5 and black's king is on g8, this white knight adds 2
// to kingAttacksCount[WHITE].
int kingAttacksCount[COLOR_NB];
int spaceWeight[COLOR_NB];
};


@@ -240,7 +239,6 @@ namespace {
attackedBy[Us][PAWN] = pe->pawn_attacks(Us);
attackedBy[Us][ALL_PIECES] = attackedBy[Us][KING] | attackedBy[Us][PAWN];
attackedBy2[Us] = dblAttackByPawn | (attackedBy[Us][KING] & attackedBy[Us][PAWN]);
spaceWeight[Us] = 0;

// Init our king safety tables
kingRing[Us] = attackedBy[Us][KING];
@@ -468,7 +466,6 @@ namespace {
- 873 * !pos.count<QUEEN>(Them)
- 6 * mg_value(score) / 8
+ mg_value(mobility[Them] - mobility[Us])
- (spaceWeight[Us] - spaceWeight[Them]) / 16
+ 5 * kingFlankAttacks * kingFlankAttacks / 16
- 7;

@@ -687,7 +684,7 @@ namespace {
// improve play on game opening.

template<Tracing T> template<Color Us>
Score Evaluation<T>::space() {
Score Evaluation<T>::space() const {

if (pos.non_pawn_material() < SpaceThreshold)
return SCORE_ZERO;
@@ -711,7 +708,6 @@ namespace {
int bonus = popcount(safe) + popcount(behind & safe);
int weight = pos.count<ALL_PIECES>(Us) - 1;
Score score = make_score(bonus * weight * weight / 16, 0);
spaceWeight[Us] = bonus * weight * weight / 16;

if (T)
Trace::add(SPACE, Us, score);
@@ -820,11 +816,10 @@ namespace {

score += mobility[WHITE] - mobility[BLACK];

score += space< WHITE>() - space< BLACK>();

score += king< WHITE>() - king< BLACK>()
+ threats<WHITE>() - threats<BLACK>()
+ passed< WHITE>() - passed< BLACK>();
+ passed< WHITE>() - passed< BLACK>()
+ space< WHITE>() - space< BLACK>();

score += initiative(eg_value(score));

@@ -953,7 +953,7 @@ namespace {
moveCountPruning = moveCount >= futility_move_count(improving, depth / ONE_PLY);

if ( !captureOrPromotion
&& !givesCheck
&& (!givesCheck || pos.non_pawn_material(us) > QueenValueMg)
&& (!pos.advanced_pawn_push(move) || pos.non_pawn_material(~us) > BishopValueMg))
{
// Move count based pruning (~30 Elo)

0 comments on commit 22607b0

Please sign in to comment.
You can’t perform that action at this time.