mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
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.
This commit is contained in:
parent
4bd24da161
commit
af1ddfd83b
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue