Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelB7 committed Jun 27, 2019
2 parents 507fc1d + d889bb4 commit a403bf4
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/Makefile
Expand Up @@ -25,8 +25,8 @@
### ==========================================================================

### Executable name
### Honey bench nodes -----> 4976520 > based on commits up to 6/22/2019
### stockfish bench nodes -> 3398333 > based on commits up to 6/22/2019
### Honey bench nodes -----> 5112219 > based on commits up to 6/27/2019
### stockfish bench nodes -> 3633546 > based on commits up to 6/27/2019

#### Always leave the three lines below as is (any subsequent defines will override)
DATE=$(shell date +"%m%d%y")
Expand Down
4 changes: 4 additions & 0 deletions src/evaluate.cpp
Expand Up @@ -158,6 +158,7 @@ constexpr Score MobilityBonus[][32] = {
#ifdef Sullivan
// Combo #1867 Jonathan D
// Assorted bonuses and penalties
constexpr Score AttacksOnSpaceArea = S( 4, 0);
constexpr Score BishopPawns = S( 3, 7);
constexpr Score CorneredBishop = S( 50, 50);
constexpr Score FlankAttacks = S( 7, 0);
Expand All @@ -180,6 +181,7 @@ constexpr Score TrappedRook = S( 96, 4);
constexpr Score WeakQueen = S( 10, 2);// Gunther Dementz weak queen mod
#else
// Assorted bonuses and penalties
constexpr Score AttacksOnSpaceArea = S( 4, 0);
constexpr Score BishopPawns = S( 3, 7);
constexpr Score CorneredBishop = S( 50, 50);
constexpr Score FlankAttacks = S( 8, 0);
Expand Down Expand Up @@ -823,6 +825,8 @@ constexpr Score WeakQueen = S( 10, 2);// Gunther Dementz weak queen mo
int weight = pos.count<ALL_PIECES>(Us) - 1;
Score score = make_score(bonus * weight * weight / 16, 0);

score -= AttacksOnSpaceArea * popcount(attackedBy[Them][ALL_PIECES] & behind & safe);

if (T)
Trace::add(SPACE, Us, score);

Expand Down
2 changes: 1 addition & 1 deletion src/movepick.cpp
Expand Up @@ -208,7 +208,7 @@ Move MovePicker::next_move(bool skipQuiets) {
score<QUIETS>();
partial_insertion_sort(cur, endMoves, -4000 * depth / ONE_PLY);
}

++stage;
/* fallthrough */

Expand Down
10 changes: 8 additions & 2 deletions src/pawns.cpp
Expand Up @@ -36,6 +36,7 @@ namespace {
constexpr Score Doubled = S(11, 56);
constexpr Score Isolated = S( 5, 15);
constexpr Score WeakUnopposed = S( 13, 27);
constexpr Score Attacked2Unsupported = S( 0, 20);

// Connected pawn bonus
#ifdef Sullivan
Expand Down Expand Up @@ -82,8 +83,13 @@ namespace {
Bitboard theirPawns = pos.pieces(Them, PAWN);

e->passedPawns[Us] = e->pawnAttacksSpan[Us] = 0;
e->kingSquares[Us] = SQ_NONE;
e->pawnAttacks[Us] = pawn_attacks_bb<Us>(ourPawns);
e->kingSquares[Us] = SQ_NONE;
e->pawnAttacks[Us] = pawn_attacks_bb<Us>(ourPawns);

// Unsupported enemy pawns attacked twice by us
score += Attacked2Unsupported * popcount( theirPawns
& pawn_double_attacks_bb<Us>(ourPawns)
& ~pawn_attacks_bb<Them>(theirPawns));

// Loop through all pawns of the current color and score each pawn
while ((s = *pl++) != SQ_NONE)
Expand Down
14 changes: 4 additions & 10 deletions src/search.cpp
Expand Up @@ -540,11 +540,7 @@ ss->pv = pv;
#endif

beta = VALUE_INFINITE;
#ifdef Sullivan //Improve multiPV mode #2163 by Joerg Oster
multiPV = Options["MultiPV"];
#else
size_t multiPV = Options["MultiPV"];
#endif
Skill skill(Options["Skill Level"]);

#ifdef Sullivan //zugzwangMates by Gunther Dementz
Expand Down Expand Up @@ -1429,14 +1425,12 @@ namespace {
sync_cout << "info depth " << depth / ONE_PLY
<< " currmove " << UCI::move(move, pos.is_chess960())
<< " currmovenumber " << moveCount + thisThread->pvIdx << sync_endl;
#ifdef Sullivan // Improve multiPV mode #2163 by Joerg Oster

// In MultiPV mode also skip moves which will be searched later as PV moves
// this section updated by mstembera
if ( rootNode
&& std::find(thisThread->rootMoves.begin() + thisThread->pvIdx, thisThread->rootMoves.begin() + thisThread->pvLast, move)
== thisThread->rootMoves.begin() + thisThread->pvLast)
if (rootNode && std::count(thisThread->rootMoves.begin() + thisThread->pvIdx + 1,
thisThread->rootMoves.begin() + thisThread->multiPV, move))
continue;
#endif

if (PvNode)
(ss+1)->pv = nullptr;

Expand Down
3 changes: 1 addition & 2 deletions src/thread.h
Expand Up @@ -63,12 +63,11 @@ class Thread {
Pawns::Table pawnsTable;
Material::Table materialTable;

size_t pvIdx, multiPV, pvLast, shuffleExts;
#ifdef Sullivan
size_t pvIdx, multiPV, pvLast, shuffleExts; // Improve multiPV mode by joergoster
int selDepth, nmpMinPly, zugzwangMates; // Gunther Demetz zugzwangSolver
int64_t visits, allScores; // Moez Jellouli -> Save_probcut #e05dc73
#else
size_t pvIdx, pvLast, shuffleExts;
int selDepth, nmpMinPly;
#endif

Expand Down
1 change: 0 additions & 1 deletion src/types.h
Expand Up @@ -312,7 +312,6 @@ inline T& operator--(T& d) { return d = T(int(d) - 1); }

#define ENABLE_FULL_OPERATORS_ON(T) \
ENABLE_BASE_OPERATORS_ON(T) \
ENABLE_INCR_OPERATORS_ON(T) \
constexpr T operator*(int i, T d) { return T(i * int(d)); } \
constexpr T operator*(T d, int i) { return T(int(d) * i); } \
constexpr T operator/(T d, int i) { return T(int(d) / i); } \
Expand Down

0 comments on commit a403bf4

Please sign in to comment.