From: Fabian Fichter Date: Tue, 1 Jan 2019 15:43:30 +0000 (+0100) Subject: Further reduce king danger divisor for shogi variants X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d85a1561235949ace8419ca3ab36dde38ef45abd;p=fairystockfish.git Further reduce king danger divisor for shogi variants shogi LLR: 2.99 (-2.94,2.94) [0.00,10.00] Total: 1018 W: 544 L: 430 D: 44 minishogi LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 470 W: 281 L: 175 D: 14 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index a066059..b1d65b3 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -453,7 +453,7 @@ namespace { if (pos.count_in_hand(Us, pt)) { Bitboard b = pos.drop_region(Us, pt) & ~pos.pieces() & (~attackedBy2[Them] | attackedBy[Us][ALL_PIECES]); - if (b & kingRing[Them]) + if ((b & kingRing[Them]) && pt != SHOGI_PAWN) { kingAttackersCount[Us] += pos.count_in_hand(Us, pt); kingAttackersWeight[Us] += KingAttackWeights[std::min(pt, QUEEN)] * pos.count_in_hand(Us, pt); @@ -580,7 +580,7 @@ namespace { // For drop games, king danger is independent of game phase if (pos.captures_to_hand()) - score = make_score(mg_value(score), mg_value(score)) / (1 + 2 * !pos.shogi_doubled_pawn()); + score = make_score(mg_value(score), mg_value(score)) / (1 + !pos.shogi_doubled_pawn()); if (T) Trace::add(KING, Us, score);