diff options
Diffstat (limited to 'src/chess.h')
| -rwxr-xr-x | src/chess.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/chess.h b/src/chess.h index 6b09840..aababc0 100755 --- a/src/chess.h +++ b/src/chess.h @@ -614,6 +614,10 @@ ATTACK_BITV; #define ROOK_XRAY_BIT 0x20000000UL #define QUEEN_BIT 0x00000010UL #define QUEEN_XRAY_BIT 0x10000000UL +// King never x-rays (it can't move through a blocker), so there's no +// KING_XRAY_BIT to go with this -- matches struct _ATTACK_BITV's +// .small.uKing bit position (byte 0, bit 3). +#define KING_BIT 0x00000008UL #define INVALID_PIECE_INDEX (17) #define IS_VALID_PIECE_INDEX(x) ((x) < INVALID_PIECE_INDEX) @@ -770,6 +774,25 @@ typedef struct _POSITION BITBOARD bbQueenAttacks[2]; BITBOARD bbQueenXrayAttacks[2]; + // King's turn to convert (board_representation/EVAL.md section 9, + // 2026-09-05) -- the last piece type contributing to the old + // bvAttacks/ATTACK_BITV mechanism. Just g_KingAttacksBB[c] + // (generate.c's precomputed table, already used by move + // generation), no mobility computation involved and no x-ray + // (a king can't move through a blocker). Same Eval()-scoped/ + // cleared-per-call lifetime as every other bbXAttacks accumulator + // above -- this also reproduces, for free, an existing + // order-dependent asymmetry _EvalKing's mailbox version already + // had: kings are evaluated black-then-white (Eval()'s fixed + // order), so white's king-safety computation can see black's + // already-written attack bits but not vice versa. Once this + // lands, nothing writes bvAttacks/ATTACK_BITV any more -- see + // EVAL.md section 9 for the planned follow-up that deletes the + // whole mechanism and simplifies the transitional + // _IsSquareAttackedByX/_IsSquareXrayedByX helpers into plain + // bitboard reads. + BITBOARD bbKingAttacks[2]; + ULONG uWhiteSqBishopCount[2]; // num bishops on white squares SCORE iMaterialBalance[2]; // material balance |
