Skip to content

Commit 8247a55

Browse files
authored
Merge pull request official-stockfish#567 from IIvec/master
New master
2 parents fd9105b + 7dd1f4a commit 8247a55

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

src/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ ifeq ($(COMP),clang)
205205
CXX=clang++
206206
CXXFLAGS += -pedantic -Wextra -Wshadow
207207
ifneq ($(KERNEL),Darwin)
208+
ifneq ($(KERNEL),OpenBSD)
208209
LDFLAGS += -latomic
210+
endif
209211
endif
210212

211213
ifeq ($(ARCH),armv7)

src/material.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ namespace {
5353
{ 101, 100, -37, 141, 268, 0 } // Queen
5454
};
5555

56-
// PawnSet[pawn count] contains a bonus/malus indexed by number of pawns
57-
const int PawnSet[] = {
58-
24, -32, 107, -51, 117, -9, -126, -21, 31
59-
};
60-
6156
// QueenMinorsImbalance[opp_minor_count] is applied when only one side has a queen.
6257
// It contains a bonus/malus for the side with the queen.
6358
const int QueenMinorsImbalance[13] = {
@@ -100,9 +95,9 @@ namespace {
10095

10196
const Color Them = (Us == WHITE ? BLACK : WHITE);
10297

103-
int bonus = PawnSet[pieceCount[Us][PAWN]];
98+
int bonus = 0;
10499

105-
// Second-degree polynomial material imbalance by Tord Romstad
100+
// Second-degree polynomial material imbalance, by Tord Romstad
106101
for (int pt1 = NO_PIECE_TYPE; pt1 <= QUEEN; ++pt1)
107102
{
108103
if (!pieceCount[Us][pt1])

src/movepick.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Value th, const CapturePiece
123123

124124
/// score() assigns a numerical value to each move in a list, used for sorting.
125125
/// Captures are ordered by Most Valuable Victim (MVV), preferring captures
126-
/// near our home rank. Quiets are ordered using the histories.
126+
/// with a good history. Quiets are ordered using the histories.
127127
template<GenType Type>
128128
void MovePicker::score() {
129129

@@ -179,12 +179,7 @@ Move MovePicker::next_move(bool skipQuiets) {
179179
move = pick_best(cur++, endMoves);
180180
if (move != ttMove)
181181
{
182-
if (pos.see_ge(move))
183-
return move;
184-
185-
if ( type_of(pos.piece_on(to_sq(move))) == KNIGHT
186-
&& type_of(pos.moved_piece(move)) == BISHOP
187-
&& (cur-1)->value > 1090)
182+
if (pos.see_ge(move, Value(-55 * (cur-1)->value / 1024)))
188183
return move;
189184

190185
// Losing capture, move it to the beginning of the array

0 commit comments

Comments
 (0)