Skip to content

Commit a403bf4

Browse files

File tree

7 files changed

+20
-18
lines changed

7 files changed

+20
-18
lines changed

src/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
### ==========================================================================
2626

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

3131
#### Always leave the three lines below as is (any subsequent defines will override)
3232
DATE=$(shell date +"%m%d%y")

src/evaluate.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ constexpr Score MobilityBonus[][32] = {
158158
#ifdef Sullivan
159159
// Combo #1867 Jonathan D
160160
// Assorted bonuses and penalties
161+
constexpr Score AttacksOnSpaceArea = S( 4, 0);
161162
constexpr Score BishopPawns = S( 3, 7);
162163
constexpr Score CorneredBishop = S( 50, 50);
163164
constexpr Score FlankAttacks = S( 7, 0);
@@ -180,6 +181,7 @@ constexpr Score TrappedRook = S( 96, 4);
180181
constexpr Score WeakQueen = S( 10, 2);// Gunther Dementz weak queen mod
181182
#else
182183
// Assorted bonuses and penalties
184+
constexpr Score AttacksOnSpaceArea = S( 4, 0);
183185
constexpr Score BishopPawns = S( 3, 7);
184186
constexpr Score CorneredBishop = S( 50, 50);
185187
constexpr Score FlankAttacks = S( 8, 0);
@@ -823,6 +825,8 @@ constexpr Score WeakQueen = S( 10, 2);// Gunther Dementz weak queen mo
823825
int weight = pos.count<ALL_PIECES>(Us) - 1;
824826
Score score = make_score(bonus * weight * weight / 16, 0);
825827

828+
score -= AttacksOnSpaceArea * popcount(attackedBy[Them][ALL_PIECES] & behind & safe);
829+
826830
if (T)
827831
Trace::add(SPACE, Us, score);
828832

src/movepick.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Move MovePicker::next_move(bool skipQuiets) {
208208
score<QUIETS>();
209209
partial_insertion_sort(cur, endMoves, -4000 * depth / ONE_PLY);
210210
}
211-
211+
212212
++stage;
213213
/* fallthrough */
214214

src/pawns.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ namespace {
3636
constexpr Score Doubled = S(11, 56);
3737
constexpr Score Isolated = S( 5, 15);
3838
constexpr Score WeakUnopposed = S( 13, 27);
39+
constexpr Score Attacked2Unsupported = S( 0, 20);
3940

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

8485
e->passedPawns[Us] = e->pawnAttacksSpan[Us] = 0;
85-
e->kingSquares[Us] = SQ_NONE;
86-
e->pawnAttacks[Us] = pawn_attacks_bb<Us>(ourPawns);
86+
e->kingSquares[Us] = SQ_NONE;
87+
e->pawnAttacks[Us] = pawn_attacks_bb<Us>(ourPawns);
88+
89+
// Unsupported enemy pawns attacked twice by us
90+
score += Attacked2Unsupported * popcount( theirPawns
91+
& pawn_double_attacks_bb<Us>(ourPawns)
92+
& ~pawn_attacks_bb<Them>(theirPawns));
8793

8894
// Loop through all pawns of the current color and score each pawn
8995
while ((s = *pl++) != SQ_NONE)

src/search.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -540,11 +540,7 @@ ss->pv = pv;
540540
#endif
541541

542542
beta = VALUE_INFINITE;
543-
#ifdef Sullivan //Improve multiPV mode #2163 by Joerg Oster
544543
multiPV = Options["MultiPV"];
545-
#else
546-
size_t multiPV = Options["MultiPV"];
547-
#endif
548544
Skill skill(Options["Skill Level"]);
549545

550546
#ifdef Sullivan //zugzwangMates by Gunther Dementz
@@ -1429,14 +1425,12 @@ namespace {
14291425
sync_cout << "info depth " << depth / ONE_PLY
14301426
<< " currmove " << UCI::move(move, pos.is_chess960())
14311427
<< " currmovenumber " << moveCount + thisThread->pvIdx << sync_endl;
1432-
#ifdef Sullivan // Improve multiPV mode #2163 by Joerg Oster
1428+
14331429
// In MultiPV mode also skip moves which will be searched later as PV moves
1434-
// this section updated by mstembera
1435-
if ( rootNode
1436-
&& std::find(thisThread->rootMoves.begin() + thisThread->pvIdx, thisThread->rootMoves.begin() + thisThread->pvLast, move)
1437-
== thisThread->rootMoves.begin() + thisThread->pvLast)
1430+
if (rootNode && std::count(thisThread->rootMoves.begin() + thisThread->pvIdx + 1,
1431+
thisThread->rootMoves.begin() + thisThread->multiPV, move))
14381432
continue;
1439-
#endif
1433+
14401434
if (PvNode)
14411435
(ss+1)->pv = nullptr;
14421436

src/thread.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@ class Thread {
6363
Pawns::Table pawnsTable;
6464
Material::Table materialTable;
6565

66+
size_t pvIdx, multiPV, pvLast, shuffleExts;
6667
#ifdef Sullivan
67-
size_t pvIdx, multiPV, pvLast, shuffleExts; // Improve multiPV mode by joergoster
6868
int selDepth, nmpMinPly, zugzwangMates; // Gunther Demetz zugzwangSolver
6969
int64_t visits, allScores; // Moez Jellouli -> Save_probcut #e05dc73
7070
#else
71-
size_t pvIdx, pvLast, shuffleExts;
7271
int selDepth, nmpMinPly;
7372
#endif
7473

src/types.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ inline T& operator--(T& d) { return d = T(int(d) - 1); }
312312

313313
#define ENABLE_FULL_OPERATORS_ON(T) \
314314
ENABLE_BASE_OPERATORS_ON(T) \
315-
ENABLE_INCR_OPERATORS_ON(T) \
316315
constexpr T operator*(int i, T d) { return T(i * int(d)); } \
317316
constexpr T operator*(T d, int i) { return T(int(d) * i); } \
318317
constexpr T operator/(T d, int i) { return T(int(d) / i); } \

0 commit comments

Comments
 (0)