1
0
Fork 0

simplified forward ranks.

This is a non-functional simplification. We change replaces an 'OR'
and a lookup (rank_bb(ksq)) with a bitwise ~.  This is fewer operations
and is probably faster.

STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 25441 W: 5689 L: 5575 D: 14177
http://tests.stockfishchess.org/tests/view/5b52d05a0ebc5902bdb8010e

LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 26904 W: 4664 L: 4553 D: 17687
http://tests.stockfishchess.org/tests/view/5b543df70ebc5902bdb8212d

No functional change.
pull/1688/merge
protonspring 2018-07-21 00:17:27 -06:00 committed by Stéphane Nicolet
parent 4bd24da161
commit af1ddfd83b
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ Value Entry::evaluate_shelter(const Position& pos, Square ksq) {
constexpr Direction Down = (Us == WHITE ? SOUTH : NORTH);
constexpr Bitboard BlockRanks = (Us == WHITE ? Rank1BB | Rank2BB : Rank8BB | Rank7BB);
Bitboard b = pos.pieces(PAWN) & (forward_ranks_bb(Us, ksq) | rank_bb(ksq));
Bitboard b = pos.pieces(PAWN) & ~forward_ranks_bb(Them, ksq);
Bitboard ourPawns = b & pos.pieces(Us);
Bitboard theirPawns = b & pos.pieces(Them);