Skip to content

Commit 30ab6db

Browse files
Modify the static null move pruning, increasing depth and using eval progression.
20s+0.2 Hash=16 Score of tucanoNEW vs tucanoOLD: 1168 - 1088 - 2651 [0.508] 4907 Elo difference: 5.7 +/- 6.6, LOS: 95.4 %, DrawRatio: 54.0 % SPRT: llr 2.95 (100.0%), lbound -2.94, ubound 2.94 - H1 was accepted 60s+0.6 Hash=64 Score of tucanoNEW vs tucanoOLD: 1811 - 1750 - 4332 [0.504] 7893 Elo difference: 2.7 +/- 5.1, LOS: 84.7 %, DrawRatio: 54.9 % SPRT: llr 2.29 (77.7%), lbound -2.94, ubound 2.94 Score of tucanoNEW vs tucanoOLD: 1342 - 1263 - 3142 [0.507] 5747 Elo difference: 4.8 +/- 6.0, LOS: 93.9 %, DrawRatio: 54.7 % SPRT: llr 2.95 (100.2%), lbound -2.94, ubound 2.94 - H1 was accepted
1 parent 812fe83 commit 30ab6db

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#define ENGINE "Tucano"
2222
#define AUTHOR "Alcides Schulz"
23-
#define VERSION "12.12"
23+
#define VERSION "12.13"
2424

2525
void develop_workbench(void);
2626
double bench(int depth, int print);

src/search.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717

1818
#include "globals.h"
1919

20-
#define STAT_NULL_DEPTH 4
21-
static int STAT_NULL_MARGIN[STAT_NULL_DEPTH] = { 0, 80, 160, 320 };
22-
2320
#define RAZOR_DEPTH 6
2421
static int RAZOR_MARGIN[RAZOR_DEPTH] = { 0, 250, 500, 750, 1000, 1250 };
2522

@@ -150,9 +147,12 @@ int search(GAME *game, UINT incheck, int alpha, int beta, int depth, MOVE exclud
150147
}
151148

152149
// Static null move: eval score + margin is higher that current beta, so it can skip the search.
153-
if (depth < STAT_NULL_DEPTH && eval_score - STAT_NULL_MARGIN[depth] >= beta && !is_losing_score(beta)) {
150+
if (depth <= 6 && eval_score >= beta && !is_losing_score(beta)) {
154151
if (trans_move == MOVE_NONE || move_is_capture(trans_move)) {
155-
return eval_score - STAT_NULL_MARGIN[depth];
152+
int stat_null_margin = 100 * depth - improving * 80 - opponent_worsening * 30 + (ply > 0 ? game->eval_hist[ply - 1] / 350 : 0);
153+
if (eval_score - stat_null_margin >= beta) {
154+
return eval_score - stat_null_margin;
155+
}
156156
}
157157
}
158158

0 commit comments

Comments
 (0)