Skip to content

Commit

Permalink
Added a form of Late Move Pruning (Move Count Pruning)
Browse files Browse the repository at this point in the history
-------------------------------------------------------------------------------

LateMovePruning10 @ 30.0+0.3 with 128MB Hash
Base            Alpha   Beta    Games   Test Elo  Base Elo  Status
QuietHistory2   0.05    0.10    14000   2727.24   2716.08   PASSED

MATCHUPS FOR CANDIDATE
Opponent        Wins    Draws   Losses  Games   Score   ELO      +      -
Floyd0.9        460     118     172     750     69.20%  2730.62  27.82  26.20
Laser1.0        279     214     307     800     48.25%  2714.83  24.07  24.19
Sloppy0.2.2     483     162     155     800     70.50%  2768.35  27.30  25.65
WyldChess1.4    438     174     138     750     70.00%  2757.19  28.07  26.36
DiscoCheck4.03  207     208     335     750     41.47%  2652.12  24.97  25.60
RedQueen1.1.98  262     194     294     750     47.87%  2657.17  24.85  25.01
Ethereal8.15    365     287      98     750     67.80%  2743.35  27.41  25.95
Tucano3.0       430     166     104     700     73.29%  2794.31  30.34  28.05

MATCHUPS FOR BASE
Opponent        Wins    Draws   Losses  Games   Score   ELO      +      -
Floyd0.9        434     121     195     750     65.93%  2704.71  26.93  25.66
Laser1.0        267     212     321     800     46.62%  2703.51  24.06  24.28
Sloppy0.2.2     464     174     162     800     68.88%  2754.98  26.81  25.33
WyldChess1.4    645     289     216     1150    68.65%  2746.18  22.19  21.18
DiscoCheck4.03  228     197     325     750     43.53%  2666.81  24.89  25.36
RedQueen1.1.98  466     328     606     1400    45.00%  2637.14  18.21  18.41
Ethereal8.15    365     311     124     800     65.06%  2722.02  25.86  24.75
Tucano3.0       909     377     214     1500    73.17%  2793.26  20.40  19.35

-------------------------------------------------------------------------------

LateMovePruning10 @ 5.0+0.05 with 128MB Hash
Base            Alpha   Beta    Games   Test Elo  Base Elo  Status
QuietHistory2   0.05    0.10    18000   2738.19   2729.73   PASSED

MATCHUPS FOR CANDIDATE
Opponent        Wins    Draws   Losses  Games   Score   ELO      +      -
Floyd0.9        801     111     188     1100    77.86%  2808.49  25.80  23.82
Laser1.0        399     254     397     1050    50.10%  2727.66  21.04  21.04
Sloppy0.2.2     629     179     242     1050    68.43%  2751.38  23.20  22.11
WyldChess1.4    697     197     206     1100    72.32%  2776.82  23.68  22.32
DiscoCheck4.03  287     245     518     1050    39.00%  2634.29  21.28  21.87
RedQueen1.1.98  416     224     360     1000    52.80%  2691.48  21.67  21.52
Ethereal8.15    491     359     200     1050    63.86%  2712.87  22.29  21.52
Tucano3.0       635     214     151     1000    74.20%  2802.51  25.53  23.83

MATCHUPS FOR BASE
Opponent        Wins    Draws   Losses  Games   Score   ELO      +      -
Floyd0.9        785     125     190     1100    77.05%  2800.35  25.42  23.55
Laser1.0        387     241     472     1100    46.14%  2700.10  20.52  20.71
Sloppy0.2.2     615     186     249     1050    67.43%  2743.40  22.97  21.96
WyldChess1.4    639     206     205     1050    70.67%  2762.74  23.77  22.49
DiscoCheck4.03  288     225     537     1050    38.14%  2628.01  21.34  21.99
RedQueen1.1.98  762     371     667     1800    52.64%  2690.35  16.12  16.05
Ethereal8.15    494     390     216     1100    62.64%  2703.75  21.58  20.92
Tucano3.0       881     261     208     1350    74.93%  2809.16  22.09  20.77
  • Loading branch information
AndyGrant committed Jul 13, 2017
1 parent 0374e40 commit 8cd0115
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 7 deletions.
Binary file removed dist/Ethereal8.20.zip
Binary file not shown.
Binary file added dist/Ethereal8.22.zip
Binary file not shown.
25 changes: 19 additions & 6 deletions src/search.c
Expand Up @@ -251,10 +251,11 @@ int rootSearch(PVariation * pv, Board * board, MoveList * moveList, int alpha,
int alphaBetaSearch(PVariation * pv, Board * board, int alpha, int beta,
int depth, int height, int nodeType){

int i, value, inCheck, isQuiet, hist, R;
int i, value, inCheck, isQuiet, R;
int min, max, entryValue, entryType, oldAlpha = alpha;
int quiets = 0, played = 0, avoidedQS = 0, tableIsTactical = 0;
int best = -MATE, eval = -MATE, optimal = -MATE;
int hist = 0; // Fix bogus GCC warning

uint16_t currentMove, killer1, killer2, quietsTried[MAX_MOVES];
uint16_t tableMove = NONE_MOVE, bestMove = NONE_MOVE;
Expand Down Expand Up @@ -405,9 +406,23 @@ int alphaBetaSearch(PVariation * pv, Board * board, int alpha, int beta,

while ((currentMove = selectNextMove(&movePicker, board)) != NONE_MOVE){

// Save this to the quiets list if it is quiet
isQuiet = !moveIsTactical(board, currentMove);
if (isQuiet) quietsTried[quiets++] = currentMove;
// If this move is quiet we will save it to a list of attemped
// quiets, and we will need a history score for pruning decisions
if ((isQuiet = !moveIsTactical(board, currentMove))){
quietsTried[quiets++] = currentMove;
hist = getHistoryScore(History, currentMove, board->turn, 128);
}

// Late Move Pruning
if (USE_LATE_MOVE_PRUNING
&& nodeType != PVNODE
&& played >= 1
&& !inCheck
&& isQuiet
&& depth < 6
&& quiets > LateMovePruningCounts[depth]
&& hist < 32)
continue;

// Use futility pruning
if (USE_FUTILITY_PRUNING
Expand Down Expand Up @@ -436,8 +451,6 @@ int alphaBetaSearch(PVariation * pv, Board * board, int alpha, int beta,
&& !inCheck
&& isQuiet
&& isNotInCheck(board, board->turn)){

hist = getHistoryScore(History, currentMove, !board->turn, 128);

R = 2;
R += (played - 4) / 8;
Expand Down
3 changes: 3 additions & 0 deletions src/search.h
Expand Up @@ -44,11 +44,14 @@ int moveIsTactical(Board * board, uint16_t move);

int moveWasTactical(Undo * undo, uint16_t move);

static const int LateMovePruningCounts[6] = {0, 6, 11, 15, 20, 25};

#define USE_STATIC_NULL_PRUNING (1)
#define USE_FUTILITY_PRUNING (1)
#define USE_NULL_MOVE_PRUNING (1)
#define USE_LATE_MOVE_REDUCTIONS (1)
#define USE_INTERNAL_ITERATIVE_DEEPENING (1)
#define USE_TRANSPOSITION_TABLE (1)
#define USE_LATE_MOVE_PRUNING (1)

#endif
2 changes: 1 addition & 1 deletion src/uci.c
Expand Up @@ -82,7 +82,7 @@ int main(){
http://wbec-ridderkerk.nl/html/UCIProtocol.html */

if (stringEquals(str, "uci")){
printf("id name Ethereal 8.21\n");
printf("id name Ethereal 8.22\n");
printf("id author Andrew Grant\n");
printf("option name Hash type spin default 16 min 1 max 2048\n");
printf("uciok\n");
Expand Down

0 comments on commit 8cd0115

Please sign in to comment.