mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Sync with master
bench: 8253813
This commit is contained in:
commit
8d16111ffd
2 changed files with 8 additions and 7 deletions
|
@ -61,11 +61,11 @@ namespace {
|
||||||
// KingAttackWeights array.
|
// KingAttackWeights array.
|
||||||
int kingAttackersWeight[COLOR_NB];
|
int kingAttackersWeight[COLOR_NB];
|
||||||
|
|
||||||
// kingAdjacentZoneAttacksCount[color] is the number of attacks to squares
|
// kingAdjacentZoneAttacksCount[color] is the number of attacks by the given
|
||||||
// directly adjacent to the king of the given color. Pieces which attack
|
// color to squares directly adjacent to the enemy king. Pieces which attack
|
||||||
// more than one square are counted multiple times. For instance, if black's
|
// more than one square are counted multiple times. For instance, if there is
|
||||||
// king is on g8 and there's a white knight on g5, this knight adds
|
// a white knight on g5 and black's king is on g8, this white knight adds 2
|
||||||
// 2 to kingAdjacentZoneAttacksCount[BLACK].
|
// to kingAdjacentZoneAttacksCount[WHITE].
|
||||||
int kingAdjacentZoneAttacksCount[COLOR_NB];
|
int kingAdjacentZoneAttacksCount[COLOR_NB];
|
||||||
|
|
||||||
Bitboard pinnedPieces[COLOR_NB];
|
Bitboard pinnedPieces[COLOR_NB];
|
||||||
|
|
|
@ -227,7 +227,8 @@ void init()
|
||||||
for (Rank r = RANK_2; r < RANK_8; ++r)
|
for (Rank r = RANK_2; r < RANK_8; ++r)
|
||||||
{
|
{
|
||||||
int bonus = Seed[r] + (phalanx ? (Seed[r + 1] - Seed[r]) / 2 : 0);
|
int bonus = Seed[r] + (phalanx ? (Seed[r + 1] - Seed[r]) / 2 : 0);
|
||||||
Connected[opposed][phalanx][r] = make_score(bonus / 2, bonus >> opposed);
|
bonus >>= opposed;
|
||||||
|
Connected[opposed][phalanx][r] = make_score( 3 * bonus / 2, bonus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue