From a52298970a3114f417f0e814c503d0d829d8ad98 Mon Sep 17 00:00:00 2001 From: Andrey Sofronov Date: Sun, 13 Dec 2009 18:27:47 +0200 Subject: [PATCH] * Removed buggy kbpk draw code * Display PV if mate found even if depth <= 5 --- evaluate.c | 39 +-------------------------------------- iterate.c | 2 +- 2 files changed, 2 insertions(+), 39 deletions(-) diff --git a/evaluate.c b/evaluate.c index bd96dc7..75721e2 100644 --- a/evaluate.c +++ b/evaluate.c @@ -961,44 +961,7 @@ evaluate_mate(int side) static int evaluate_draw_pattern() { - int file, square; - - /* KBPK routine */ - if (!material_pieces[BLACK] && bpc <= 1 && material_pawns[WHITE] && \ - material_pieces[WHITE] == piece_value[BISHOP] && wbc == 1 && \ - ((PAWNS(WHITE) & file_bit[0]) == PAWNS(WHITE) || (PAWNS(WHITE) & \ - file_bit[7]) == PAWNS(WHITE))) { - - square = bit_scan(PAWNS(WHITE)); - file = _FILE(square); - - if (file == 0 || file == 7) { - /* rook pawn */ - if (file == 0 && (WHITESQUARES & BISHOPS(WHITE))) - return FALSE; - if (file == 7 && (BLACKSQUARES & BISHOPS(WHITE))) - return FALSE; - if (distance[brd.kings[BLACK]][file == 0? A8 : H8] <= 1) - return TRUE; - } - } else if (!material_pieces[WHITE] && wpc <= 1 && \ - material_pieces[BLACK] == piece_value[BISHOP] && bbc == 1 && \ - ((PAWNS(BLACK) & file_bit[0]) == PAWNS(BLACK) || (PAWNS(BLACK) & \ - file_bit[7]) == PAWNS(BLACK))) { - square = bit_scan(PAWNS(BLACK)); - file = _FILE(square); - - if (file == 0 || file == 7) { - /* rook pawn */ - if (file == 0 && (BLACKSQUARES & BISHOPS(BLACK))) - return FALSE; - if (file == 7 && (WHITESQUARES & BISHOPS(BLACK))) - return FALSE; - if (distance[brd.kings[WHITE]][file == 0? A1 : H1] <= 1) - return TRUE; - } - } - + /* TODO: add real draw code */ return FALSE; } diff --git a/iterate.c b/iterate.c index 4aa8cb5..6f68729 100644 --- a/iterate.c +++ b/iterate.c @@ -98,7 +98,7 @@ iterate(void) counters.searched_nodes, score >= 0? "+" : "-", \ abs(score) / (float)100, get_time() - start_time, pv_string); else if (engine_xboard && get_engine_value(&e.post_mode) && \ - i_depth > 5) + ((i_depth > 5) || SCORE_IS_MATE(score))) fprintf(stdout, "%3d %7d %5u %10llu %s", i_depth, score, \ get_time() - start_time, counters.searched_nodes, pv_string); -- 2.11.4.GIT