Skip to content

Commit fadb9ec

Browse files
Do not prune passed pawn moves
10s+0.1 Score of tucanoNEW vs tucanoOLD: 1369 - 1289 - 3122 [0.507] 5780 Elo difference: 4.8 +/- 6.1, LOS: 94.0 %, DrawRatio: 54.0 % SPRT: llr 2.94 (100.0%), lbound -2.94, ubound 2.94 - H1 was accepted 60s+0.6 Score of tucanoNEW vs tucanoOLD: 768 - 688 - 1708 [0.513] 3164 Elo difference: 8.8 +/- 8.2, LOS: 98.2 %, DrawRatio: 54.0 % SPRT: llr 2.94 (100.0%), lbound -2.94, ubound 2.94 - H1 was accepted
1 parent 008b0aa commit fadb9ec

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
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.04"
23+
#define VERSION "12.05"
2424

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

src/search.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ int search(GAME *game, UINT incheck, int alpha, int beta, int depth, MOVE exclud
203203
depth--;
204204
}
205205

206-
//TODO test best_score = eval_score
207206
// Loop through move list
208207
MOVE_LIST ml;
209208
MOVE best_move = MOVE_NONE;
@@ -234,7 +233,7 @@ int search(GAME *game, UINT incheck, int alpha, int beta, int depth, MOVE exclud
234233
if (gives_check && (depth < 4 || see_move(&game->board, move) >= 0)) {
235234
extensions = 1;
236235
}
237-
236+
238237
// Singular move extension/cutoff/reduction
239238
if (!root_node && depth >= 8 && !extensions && !singular_move_search) {
240239
if (tt_record.data && move == trans_move && tt_record.info.flag != TT_UPPER) {
@@ -266,14 +265,14 @@ int search(GAME *game, UINT incheck, int alpha, int beta, int depth, MOVE exclud
266265
}
267266

268267
// Pruning or depth reductions
269-
if ( !extensions && move_count > 1) {
268+
if (!extensions && move_count > 1) {
270269
if (!is_killer_move(&game->move_order, turn, ply, move)) {
271270
if (!is_counter_move(&game->move_order, flip_color(turn), get_last_move_made(&game->board), move)) {
272271
int move_has_bad_history = get_has_bad_history(&game->move_order, turn, move);
272+
int free_passer = is_free_passer(&game->board, turn, move);
273273
// Move count pruning: prune moves based on move count.
274-
if (!root_node && !pv_node && move_has_bad_history && depth < 8 && !incheck && move_is_quiet(move)) {
275-
int pruning_threshold = 4 + depth * 2;
276-
if (!improving) pruning_threshold = pruning_threshold - 3;
274+
if (!root_node && !pv_node && move_has_bad_history && depth < 8 && !incheck && move_is_quiet(move) && !free_passer) {
275+
int pruning_threshold = 4 + depth * 2 + (improving ? 0 : -3);
277276
if (move_count > pruning_threshold) {
278277
continue;
279278
}

0 commit comments

Comments
 (0)