Struct alcibiades::QsearchParams [] [src]

pub struct QsearchParams<'a, T: MoveGenerator + 'a> {
    pub position: &'a mut T,
    pub depth: Depth,
    pub lower_bound: Value,
    pub upper_bound: Value,
    pub static_eval: Value,
}

Parameters describing a quiescence search.

Important note: lower_bound and upper_bound fields together give the interval within which an as precise as possible evaluation is required. If during the search is determined that the exact evaluation is outside of this interval, the search may return a value that is closer to the the interval bounds than the exact evaluation, but always staying on the correct side of the interval (i.e. "fail-soft" semantics).

Fields

A mutable reference to the root position for the search.

Important note: The search routine may use this reference to do and undo moves, but when the search is finished, all played moves must be taken back so that the board is restored to its original state.

The requested search depth.

This is the depth at which the main search stops and the quiescence search takes on. It should be between DEPTH_MIN and 0. The quiescence search implementation may decide to perform less thorough analysis when depth is smaller than zero.

The lower bound for the search.

Should be no lesser than VALUE_MIN.

The upper bound for the search.

Should be greater than lower_bound, but no greater than VALUE_MAX.

Position's static evaluation, or VALUE_UNKNOWN.

Saves the re-calculation if position's static evaluation is already available.