mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Retire quietsSearched[]
Use MovePicker moves[] to access already tried quiet moves. A bit of care shall be taken to avoid calling stage_moves() when we are still at ttMove stage, because moves are yet to be generated. Actually our staging move generation makes this code a bit more tricky than what I'd like, but removing an ausiliary redundant array like quietsSearched[] is a good thing. Idea by DiscoCheck bench: 9355734
This commit is contained in:
@@ -140,6 +140,15 @@ MovePicker::MovePicker(const Position& p, Move ttm, const HistoryStats& h, Piece
|
||||
}
|
||||
|
||||
|
||||
/// stage_moves() returns a pointer to the beginning of moves array. It
|
||||
/// is used to access already tried quiet moves when updating history.
|
||||
|
||||
const ExtMove* MovePicker::stage_moves() const {
|
||||
assert(stage == KILLERS_S1 || stage == QUIETS_1_S1 || stage == QUIETS_2_S1);
|
||||
return stage == KILLERS_S1 ? killers : moves;
|
||||
}
|
||||
|
||||
|
||||
/// score() assign a numerical move ordering score to each move in a move list.
|
||||
/// The moves with highest scores will be picked first.
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user