Skip to content

File tree

5 files changed

+36
-38
lines changed

5 files changed

+36
-38
lines changed

src/Makefile

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

2626
### Executable name
27-
### McCain bench nodes ----> 5757357 > based on commits up to 6/19/2019
28-
### stockfish bench nodes -> 3961247* > based on commits up to 6/19/2019
29-
### * bench agrees with PR #2197 not ye committed which is the shuffling extension fix
30-
### made on 6/19/2019 by Vondele
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
29+
3130
#### Always leave the three lines below as is (any subsequent defines will override)
3231
DATE=$(shell date +"%m%d%y")
3332
DATE2=$(shell date +"%m%d")
3433
FEATURE1=
3534

3635
### Release versions , enter yes and release version below foor releases
37-
RELEASE = yes
38-
RELVERSION = X4
36+
RELEASE = no
37+
RELVERSION =
38+
### playimg at reduced strength on hardware
39+
ifeq ($(RELEASE),yes)
40+
CXXFLAGS += -DRelease
41+
endif
3942

4043
### TEST versions, enter yes and labels below to build named test exe's
4144
TEST = no
@@ -45,14 +48,17 @@ ifeq ($(TEST),yes)
4548
CXXFLAGS += -DTest
4649
endif
4750

48-
49-
5051
### Uncomment the line below for McCain, comment out for Stockfish
5152
VERSION=maverick
5253

5354
### Uncomment for use with Raspberry Pi - a slower NPS UCI option setting used in Play
5455
### by Elo and personalities
5556
### RASPBERRY=Pi
57+
### to reduce NPS setting using "setoption" command, to enable more similiar play when
58+
### playimg at reduced strength on hardware
59+
ifeq ($(RASPBERRY),Pi)
60+
CXXFLAGS += -DPi
61+
endif
5662

5763
### Features include : Cerebellum book functionality, play by Elo (UCI limit strength), keyboard shortcuts and a few other items. Comment out to eliminate
5864
FEATURE1=add_features
@@ -66,12 +72,6 @@ ifeq ($(FEATURE1),add_features)
6672
SUFFIX1 =
6773
endif
6874

69-
### to reduce NPS setting using "setoption" command, to enable more similiar play when
70-
### playimg at reduced strength on hardware
71-
ifeq ($(RASPBERRY),Pi)
72-
CXXFLAGS += -DPi
73-
endif
74-
7575
ifeq ($(VERSION),maverick)
7676
CXXFLAGS += -DMaverick
7777
ifeq ($(RELEASE),no)

src/evaluate.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,8 @@ constexpr Score WeakQueen = S( 10, 2); // Gunther Dementz weak queen m
738738
// If the pawn is free to advance, then increase the bonus
739739
if (pos.empty(blockSq))
740740
{
741-
// If there is a rook or queen attacking/defending the pawn from behind,
742-
// consider all the squaresToQueen. Otherwise consider only the squares
743-
// in the pawn's path attacked or occupied by the enemy.
744-
defendedSquares = unsafeSquares = squaresToQueen = forward_file_bb(Us, s);
741+
defendedSquares = squaresToQueen = forward_file_bb(Us, s);
742+
unsafeSquares = passed_pawn_span(Us, s);
745743

746744
bb = forward_file_bb(Them, s) & pos.pieces(ROOK, QUEEN);
747745

@@ -751,9 +749,13 @@ constexpr Score WeakQueen = S( 10, 2); // Gunther Dementz weak queen m
751749
if (!(pos.pieces(Them) & bb))
752750
unsafeSquares &= attackedBy[Them][ALL_PIECES] | pos.pieces(Them);
753751

754-
// If there aren't any enemy attacks, assign a big bonus. Otherwise
755-
// assign a smaller bonus if the block square isn't attacked.
756-
int k = !unsafeSquares ? 20 : !(unsafeSquares & blockSq) ? 9 : 0;
752+
// If there are no enemy attacks on passed pawn span, assign a big bonus.
753+
// Otherwise assign a smaller bonus if the path to queen is not attacked
754+
// and even smaller bonus if it is attacked but block square is not.
755+
int k = !unsafeSquares ? 35 :
756+
!(unsafeSquares & squaresToQueen) ? 20 :
757+
!(unsafeSquares & blockSq) ? 9 :
758+
0 ;
757759

758760
// Assign a larger bonus if the block square is defended.
759761
if (defendedSquares & blockSq)

src/misc.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ namespace {
6262
#define Stockfish
6363
#endif
6464

65-
#if(defined Maverick && defined Add_Features)
65+
#if(defined Maverick && defined Add_Features && defined Release)
6666
const string Version = "X4";
67+
#else
68+
const string Version = "";
6769
#endif
6870

6971
#if(defined Stockfish && defined Add_Features)
@@ -173,7 +175,7 @@ const string engine_info(bool to_uci) {
173175

174176

175177
/// Debug functions used mainly to collect run-time statistics
176-
static int64_t hits[2], means[2];
178+
static std::atomic<int64_t> hits[2], means[2];
177179

178180
void dbg_hit_on(bool b) { ++hits[0]; if (b) ++hits[1]; }
179181
void dbg_hit_on(bool c, bool b) { if (c) dbg_hit_on(b); }

src/search.cpp

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,15 +1211,11 @@ namespace {
12111211
// Multi-cut pruning
12121212
// Our ttMove is assumed to fail high, and now we failed high also on a reduced
12131213
// search without the ttMove. So we assume this expected Cut-node is not singular,
1214-
// that is multiple moves fail high, and we can prune the whole subtree by returning
1215-
// the hard beta bound.
1216-
#ifdef Maverick // Change multi-cut pruning condition #2192 by miguel-l
1217-
else if (eval >= beta && singularBeta > beta)
1218-
return beta;
1219-
#else
1220-
else if (cutNode && singularBeta > beta)
1221-
return beta;
1222-
#endif
1214+
// that multiple moves fail high, and we can prune the whole subtree by returning
1215+
// a soft bound.
1216+
else if ( eval >= beta
1217+
&& singularBeta >= beta)
1218+
return singularBeta;
12231219
}
12241220

12251221
// Check extension (~2 Elo)
@@ -2156,12 +2152,10 @@ void Tablebases::rank_root_moves(Position& pos, Search::RootMoves& rootMoves) {
21562152
if (dtz_available || rootMoves[0].tbScore <= VALUE_DRAW)
21572153
Cardinality = 0;
21582154
}
2159-
// Partial revert of "Assorted trivial cleanups 5/2019" #2198 by Syzygy
21602155
else
21612156
{
2162-
// Clean up "if root_probe()" and "root_probe_wdl()" failures
2163-
// resulting from the user using incomplete or corrupt tablebase files
2157+
// Clean up if root_probe() and root_probe_wdl() have failed
21642158
for (auto& m : rootMoves)
2165-
m.tbRank = 0;
2166-
}
2159+
m.tbRank = 0;
2160+
}
21672161
}

src/thread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Thread {
6262
Material::Table materialTable;
6363

6464
#ifdef Maverick
65-
size_t pvIdx, multiPV, pvLast, shuffleExts; // Improve multiPV mode by joergoster && #2197 by Vondele
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

0 commit comments

Comments
 (0)