Trait alcibiades::TtableEntry [] [src]

pub trait TtableEntry: Copy + Send + 'static {
    fn new(value: Value, bound: BoundType, depth: Depth) -> Self;
    fn value(&self) -> Value;
    fn bound(&self) -> BoundType;
    fn depth(&self) -> Depth;
    fn set_move_digest(self, move_digest: MoveDigest) -> Self;
    fn move_digest(&self) -> MoveDigest;

    fn set_static_eval(self, static_eval: Value) -> Self { ... }
    fn static_eval(&self) -> Value { ... }
    fn importance(&self) -> i16 { ... }
}

A trait for transposition table entries.

Required Methods

Creates a new instance.

  • value -- The value assigned to the position. Must be between VALUE_MIN and VALUE_MAX.

  • bound -- The accuracy of the assigned value.

  • depth -- The search depth for the assigned value. Must be between DEPTH_MIN and DEPTH_MAX.

Returns the value assigned to the position.

Returns the accuracy of the assigned value.

Returns the search depth for the assigned value.

Consumes the instance and returns a new instance with updated best/refutation move digest.

Returns the best/refutation move digest assigned to the position, or MoveDigest::invalid() if no move is available.

Provided Methods

Consumes the instance and returns a new instance with updated static evaluation.

Important note: This method will do nothing if the underlying memory structure has no field allotted for static evaluation.

Returns the static evaluation assigned to the position, or VALUE_UNKNOWN.

Returns the relative importance of the entry.

Transposition tables may use this method to improve their record replacement strategy. Normally, when possible, entries with lower importance will be replaced before entries with higher importance. Therefore this method should try to return higher values for entries that are move likely to save CPU work in the future. For example, positions analyzed to a higher depth are probably more "important" than those analyzed to a lower depth.

Implementors