From: Fabian Fichter Date: Sat, 20 Oct 2018 14:17:44 +0000 (+0200) Subject: Avoid pawn hash collissions with shogi pawns X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=59fb6f6a9fe24d94a2f5dcec126bd76a4bef7fd7;p=fairystockfish.git Avoid pawn hash collissions with shogi pawns shogi ELO: 16.52 +-33.3 (95%) LOS: 83.5% Total: 400 W: 200 L: 181 D: 19 euroshogi ELO: 16.52 +-32.5 (95%) LOS: 84.1% Total: 400 W: 191 L: 172 D: 37 minishogi ELO: -13.90 +-26.2 (95%) LOS: 14.8% Total: 400 W: 110 L: 126 D: 164 No functional change for non-shogi variants. --- diff --git a/src/pawns.cpp b/src/pawns.cpp index d2d9a6b..924e9c6 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -184,7 +184,7 @@ Entry* probe(const Position& pos) { Key key = pos.pawn_key(); Entry* e = pos.this_thread()->pawnsTable[key]; - if (e->key == key) + if (e->key == key && !pos.pieces(SHOGI_PAWN)) return e; e->key = key;