Function inanis::engine::search::assign_capture_scores
source · fn assign_capture_scores(
context: &SearchContext,
moves: &[MaybeUninit<Move>; 218],
move_scores: &mut [MaybeUninit<i16>; 218],
start_index: usize,
moves_count: usize,
tt_move: Move
)
Expand description
Assigns capture scores for moves
by filling move_scores
array with moves_count
length (starting from start_index
), based on current context
.
If transposition table move is available, it’s passed as tt_move
too. Moves are prioritized as follows (from most important to the less ones):
- for transposition table move, assign MOVE_ORDERING_HASH_MOVE
- for every positive capture, assign SEE score + MOVE_ORDERING_WINNING_CAPTURES_OFFSET
- for every negative capture, assign SEE score + MOVE_ORDERING_LOSING_CAPTURES_OFFSET