Skip to content

Commit 241d35e

Browse files
Use quiesce in the prob-cut before the normal search.
10s+0.1 Hash=8 Score of tucanoNEW vs tucanoOLD: 719 - 639 - 1599 [0.514] 2957 Elo difference: 9.4 +/- 8.5, LOS: 98.5 %, DrawRatio: 54.1 % SPRT: llr 2.95 (100.2%), lbound -2.94, ubound 2.94 - H1 was accepted 60s+0.6 Hash=64 Score of tucanoNEW vs tucanoOLD: 686 - 609 - 1636 [0.513] 2931 Elo difference: 9.1 +/- 8.3, LOS: 98.4 %, DrawRatio: 55.8 % SPRT: llr 2.95 (100.3%), lbound -2.94, ubound 2.94 - H1 was accepted
1 parent ebc5252 commit 241d35e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
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.08"
23+
#define VERSION "12.09"
2424

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

src/search.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ int search(GAME *game, UINT incheck, int alpha, int beta, int depth, MOVE exclud
162162
}
163163
}
164164

165-
// Prob-Cut: after a capture a low depth with reduced beta indicates it is safe to ignore this node
165+
// Prob-Cut: after a capture a low depth search with reduced beta indicates it is safe to ignore this node
166166
if (depth >= 5 && !is_mate_score(beta)) {
167167
int pc_beta = beta + 100;
168168
if (!tt_record.data || score_from_tt(tt_record.info.score, ply) >= pc_beta || tt_record.info.depth < depth - 3) {
@@ -179,7 +179,13 @@ int search(GAME *game, UINT incheck, int alpha, int beta, int depth, MOVE exclud
179179
}
180180
make_move(&game->board, pc_move);
181181
int pc_incheck = is_incheck(&game->board, side_on_move(&game->board));
182-
int pc_score = -search(game, pc_incheck, -pc_beta, -pc_beta + 1, depth - 4, MOVE_NONE);
182+
int pc_score = 0;
183+
if (depth > 10) {
184+
pc_score = -quiesce(game, pc_incheck, -pc_beta, -pc_beta - 1, 0);
185+
}
186+
if (depth <= 10 || pc_score >= pc_beta) {
187+
pc_score = -search(game, pc_incheck, -pc_beta, -pc_beta + 1, depth - 4, MOVE_NONE);
188+
}
183189
undo_move(&game->board);
184190
if (game->search.abort) return 0;
185191
if (pc_score >= pc_beta) {
@@ -197,6 +203,7 @@ int search(GAME *game, UINT incheck, int alpha, int beta, int depth, MOVE exclud
197203
}
198204
}
199205

206+
// Depth reduction for recaptures that are not promissing.
200207
if (move_is_capture(get_last_move_made(&game->board))) {
201208
if (!improving && depth > 3 && depth <= 10 && eval_score + MAX(200, get_best_capture(&game->board)) < alpha) {
202209
depth--;

0 commit comments

Comments
 (0)