fn assign_quiet_scores(
context: &SearchContext,
state: &mut MoveGenState,
start_index: usize
)
Expand description
Assigns quiet 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 MOVEORD_HASH_MOVE
- for every promotion (excluding these with capture), assign MOVEORD_QUEEN_PROMOTION, MOVEORD_ROOK_PROMOTION, MOVEORD_BISHOP_PROMOTION or MOVEORD_KNIGHT_PROMOTION
- for every move found in killer table, assign MOVEORD_KILLER_MOVE_1 or MOVEORD_KILLER_MOVE_2
- for every countermove, assign MOVEORD_COUNTERMOVE
- for every castling, assign MOVEORD_CASTLING
- for every quiet move which didn’t fit in other categories, assign score from history table