Skip to content

Commit 8ece8a6

Browse files

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/Makefile

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

2626
### Executable name
27-
### McCain bench nodes ----> 5472976 > based on commits up to 6/22/2019
28-
### stockfish bench nodes -> 3398333 > based on commits up to 6/22/2019
27+
### McCain bench nodes ----> 5263810 > based on commits up to 6/27/2019
28+
### stockfish bench nodes -> 3633546 > based on commits up to 6/27/2019
2929

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

src/evaluate.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ constexpr Score MobilityBonus[][32] = {
149149
#ifdef Maverick
150150
// Combo #1867 Jonathan D - others as noted
151151
// Assorted bonuses and penalties
152+
constexpr Score AttacksOnSpaceArea = S( 4, 0);
152153
constexpr Score BishopPawns = S( 3, 7);
153154
constexpr Score CorneredBishop = S( 50, 50);
154155
constexpr Score FlankAttacks = S( 8, -2); //Fauzi
@@ -171,6 +172,7 @@ constexpr Score TrappedRook = S( 96, 4);
171172
constexpr Score WeakQueen = S( 10, 2); // Gunther Dementz weak queen mod
172173
#else
173174
// Assorted bonuses and penalties
175+
constexpr Score AttacksOnSpaceArea = S( 4, 0);
174176
constexpr Score BishopPawns = S( 3, 7);
175177
constexpr Score CorneredBishop = S( 50, 50);
176178
constexpr Score FlankAttacks = S( 8, 0);
@@ -814,6 +816,8 @@ constexpr Score WeakQueen = S( 10, 2); // Gunther Dementz weak queen m
814816
int weight = pos.count<ALL_PIECES>(Us) - 1;
815817
Score score = make_score(bonus * weight * weight / 16, 0);
816818

819+
score -= AttacksOnSpaceArea * popcount(attackedBy[Them][ALL_PIECES] & behind & safe);
820+
817821
if (T)
818822
Trace::add(SPACE, Us, score);
819823

src/misc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace {
6464

6565
#if(defined Maverick && defined Add_Features && defined Release)
6666
const string Version = "X4";
67-
#else
67+
#elseif(defined Maverick && defined Add_Features)
6868
const string Version = "";
6969
#endif
7070

src/movepick.cpp

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

src/pawns.cpp

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

4243
// Connected pawn bonus
4344
constexpr int Connected[RANK_NB] = { 0, 7, 8, 12, 29, 48, 86 };
@@ -81,8 +82,13 @@ namespace {
8182
Bitboard theirPawns = pos.pieces(Them, PAWN);
8283

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

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

src/search.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,7 @@ ss->pv = pv;
434434
#endif
435435

436436
beta = VALUE_INFINITE;
437-
#ifdef Maverick //Improve multiPV mode #2163 by Joerg Oster
438437
multiPV = Options["MultiPV"];
439-
#else
440-
size_t multiPV = Options["MultiPV"];
441-
#endif
442438
Skill skill(Options["Skill Level"]);
443439

444440
#ifdef Maverick //zugzwangMates by Gunther Dement
@@ -1158,14 +1154,10 @@ namespace {
11581154
sync_cout << "info depth " << depth / ONE_PLY
11591155
<< " currmove " << UCI::move(move, pos.is_chess960())
11601156
<< " currmovenumber " << moveCount + thisThread->pvIdx << sync_endl;
1161-
#ifdef Maverick // Improve multiPV mode #2163 by Joerg Oster
11621157
// In MultiPV mode also skip moves which will be searched later as PV moves
1163-
// this section updated by mstembera
1164-
if ( rootNode
1165-
&& std::find(thisThread->rootMoves.begin() + thisThread->pvIdx, thisThread->rootMoves.begin() + thisThread->pvLast, move)
1166-
== thisThread->rootMoves.begin() + thisThread->pvLast)
1158+
if (rootNode && std::count(thisThread->rootMoves.begin() + thisThread->pvIdx + 1,
1159+
thisThread->rootMoves.begin() + thisThread->multiPV, move))
11671160
continue;
1168-
#endif
11691161
if (PvNode)
11701162
(ss+1)->pv = nullptr;
11711163

src/thread.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,12 @@ class Thread {
6060

6161
Pawns::Table pawnsTable;
6262
Material::Table materialTable;
63+
size_t pvIdx, multiPV, pvLast, shuffleExts;
6364

6465
#ifdef Maverick
65-
size_t pvIdx, multiPV, pvLast, shuffleExts; // Improve multiPV mode by joergoster
6666
int selDepth, nmpMinPly, zugzwangMates; // Gunther Demetz zugzwangSolver
6767
int64_t visits, allScores; // Moez Jellouli -> Save_probcut #e05dc73
6868
#else
69-
size_t pvIdx, pvLast, shuffleExts;
7069
int selDepth, nmpMinPly;
7170
#endif
7271

src/types.h

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

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

0 commit comments

Comments
 (0)