Trait alcibiades::HashTableEntry [] [src]

pub trait HashTableEntry: Copy + Send {
    fn new(value: Value,
           bound: BoundType,
           depth: Depth,
           move_digest: MoveDigest)
           -> Self; fn with_static_eval(value: Value,
                        bound: BoundType,
                        depth: Depth,
                        move_digest: MoveDigest,
                        static_eval: Value)
                        -> Self; fn value(&self) -> Value; fn bound(&self) -> BoundType; fn depth(&self) -> Depth; fn move_digest(&self) -> MoveDigest; fn static_eval(&self) -> Value; fn set_move_digest(&mut self, move_digest: MoveDigest); 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 depth of search. Must be between DEPTH_MIN and DEPTH_MAX.

  • move_digest -- Best or refutation move digest, or MoveDigest::invalid() if no move is available.

Creates a new instance.

The only difference between this function and new is that this function requires one additional parameter:

  • static_eval -- Position's static evaluation, or VALUE_UNKNOWN.

Important note: static_eval will be ignored if there is no field allotted for it in the underlying memory structure.

Returns the value assigned to the position.

Returns the accuracy of the assigned value.

Returns the search depth for the assigned value.

Returns best or refutation move digest, or MoveDigest::invalid() if no move is available.

Returns position's static evaluation, or VALUE_UNKNOWN.

Sets a new best or refutation move digest.

Transposition tables may use this method when they overwrite an old record for the same position, and want to keep the move from the old record.

Provided Methods

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