Replace piece bitboards to piece_type ones #23

Open
opened 2024-07-21 09:50:00 +02:00 by bruno · 0 comments
Owner

Instead of having 7 bitboards per color, use 7 bitboards + 2 per color.

For example, instead of:

bitboard_t bb[2][PT_NB];

We could have:

bitboard_t bb[PT_NB];
bitboard_t bb_col[2];

Issue: currently, bb[0] is for all pieces in the color. This one would be lost, except if indexes are shifted.

The point of doing so is everything could be flipped after each move (bitboards, board), so that move_gen, eval, etc... would be simplified (monochrome).

Instead of having 7 bitboards per color, use 7 bitboards + 2 per color. For example, instead of: ``` C bitboard_t bb[2][PT_NB]; ``` We could have: ``` C bitboard_t bb[PT_NB]; bitboard_t bb_col[2]; ``` Issue: currently, `bb[0]` is for all pieces in the color. This one would be lost, except if indexes are shifted. The point of doing so is everything could be flipped after each move (bitboards, board), so that move_gen, eval, etc... would be simplified (monochrome).
bruno added the
question
label 2024-07-21 09:50:00 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bruno/brchess#23
No description provided.