Skip to content

Commit 8f3ae68

Browse files
authored
Merge pull request official-stockfish#495 from IIvec/master
New master
2 parents 8fd8345 + 7b4c985 commit 8f3ae68

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

appveyor.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ os: Visual Studio 2015
1313
platform:
1414
- x86
1515
- x64
16-
- Any CPU
1716

1817
# build Configuration, i.e. Debug, Release, etc.
19-
configuration: Debug
18+
configuration:
19+
- Debug
20+
- Release
2021

2122
matrix:
2223
# The build fail immediately once one of the job fails
@@ -50,13 +51,16 @@ before_build:
5051
$b = git log HEAD | sls "\b[Bb]ench[ :]+[0-9]{7}" | select -first 1
5152
$bench = $b -match '\D+(\d+)' | % { $matches[1] }
5253
Write-Host "Reference bench:" $bench
54+
$g = "Visual Studio 14 2015"
55+
If (${env:PLATFORM} -eq 'x64') { $g = $g + ' Win64' }
56+
cmake -G "${g}" .
57+
Write-Host "Generated files for: " $g
5358
5459
build_script:
55-
- cmake -G "Visual Studio 14 2015 Win64" .
56-
- cmake --build .
60+
- cmake --build . --config %CONFIGURATION% -- /verbosity:minimal
5761

5862
before_test:
59-
- cd src/Debug
63+
- cd src/%CONFIGURATION%
6064
- ps: |
6165
# Verify bench number
6266
./stockfish bench 2> out.txt 1> null

src/position.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -993,10 +993,8 @@ bool Position::see_ge(Move m, Value threshold) const {
993993

994994
assert(is_ok(m));
995995

996-
// Castling moves are implemented as king capturing the rook so cannot be
997-
// handled correctly. Simply assume the SEE value is VALUE_ZERO that is always
998-
// correct unless in the rare case the rook ends up under attack.
999-
if (type_of(m) == CASTLING)
996+
// Only deal with normal moves, assume others pass a simple see
997+
if (type_of(m) != NORMAL)
1000998
return VALUE_ZERO >= threshold;
1001999

10021000
Square from = from_sq(m), to = to_sq(m);
@@ -1005,16 +1003,8 @@ bool Position::see_ge(Move m, Value threshold) const {
10051003
Value balance; // Values of the pieces taken by us minus opponent's ones
10061004
Bitboard occupied, stmAttackers;
10071005

1008-
if (type_of(m) == ENPASSANT)
1009-
{
1010-
occupied = SquareBB[to - pawn_push(~stm)]; // Remove the captured pawn
1011-
balance = PieceValue[MG][PAWN];
1012-
}
1013-
else
1014-
{
1015-
balance = PieceValue[MG][piece_on(to)];
1016-
occupied = 0;
1017-
}
1006+
balance = PieceValue[MG][piece_on(to)];
1007+
occupied = 0;
10181008

10191009
if (balance < threshold)
10201010
return false;

src/search.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,8 +924,7 @@ namespace {
924924
}
925925

926926
// Reduced depth of the next LMR search
927-
int mch = std::max(1, moveCount - (ss-1)->moveCount / 16);
928-
int lmrDepth = std::max(newDepth - reduction<PvNode>(improving, depth, mch), DEPTH_ZERO) / ONE_PLY;
927+
int lmrDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO) / ONE_PLY;
929928

930929
// Countermoves based pruning
931930
if ( lmrDepth < 3

0 commit comments

Comments
 (0)