Skip to content

Commit 9a1ec37

Browse files
authored
3.1.6: negative extensions (#260)
http://chess.grantnet.us/test/29439/ ELO | 3.99 +- 2.93 (95%) SPRT | 10.0+0.10s Threads=1 Hash=8MB LLR | 2.95 (-2.94, 2.94) [0.00, 3.00] GAMES | N: 28656 W: 7789 L: 7460 D: 13407 http://chess.grantnet.us/test/29442/ ELO | 3.47 +- 2.62 (95%) SPRT | 60.0+0.60s Threads=1 Hash=64MB LLR | 2.95 (-2.94, 2.94) [0.00, 3.00] GAMES | N: 33832 W: 8666 L: 8328 D: 16838 BENCH: 4444250
1 parent 2578718 commit 9a1ec37

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/search.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ EVAL Search::abSearch(EVAL alpha, EVAL beta, int depth, int ply, bool isNull, bo
406406
}
407407
}
408408

409-
int newDepth = depth - 1;
409+
int newDepth = depth - 1;
410+
int extension = 0;
410411

411412
//
412413
// singular extensions
@@ -417,9 +418,11 @@ EVAL Search::abSearch(EVAL alpha, EVAL beta, int depth, int ply, bool isNull, bo
417418
auto score = abSearch(betaCut - 1, betaCut, depth / 2, ply + 1, false, false, mv);
418419

419420
if (score < betaCut)
420-
++newDepth;
421+
extension = 1;
421422
else if (betaCut >= beta)
422423
return betaCut;
424+
else if (ttHit && ttScore >= beta)
425+
extension = -2; // negative extension
423426
}
424427

425428
if (quietMove) {
@@ -437,7 +440,7 @@ EVAL Search::abSearch(EVAL alpha, EVAL beta, int depth, int ply, bool isNull, bo
437440
// extensions
438441
//
439442

440-
newDepth += extensionRequired(m_position.InCheck(), onPV, history.cmhistory, history.fmhistory);
443+
newDepth += extensionRequired(m_position.InCheck(), onPV, history.cmhistory, history.fmhistory) + extension;
441444

442445
EVAL e;
443446
if (legalMoves == 1)

src/uci.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <iostream>
3131
#include <sstream>
3232

33-
const std::string VERSION = "3.1.5";
33+
const std::string VERSION = "3.1.6";
3434

3535
#if defined(ENV64BIT)
3636
#if defined(_BTYPE)

0 commit comments

Comments
 (0)