pub struct BeamSearchResult {
pub best_leaf: Option<BeamLeaf>,
pub terminal_leaves: Vec<BeamLeaf>,
pub reached_terminal: bool,
pub max_depth_reached: u32,
pub stats: BeamStats,
pub root_player: u8,
pub frontier_leaves: Vec<BeamLeaf>,
}Expand description
Result of a beam search run.
Fields§
§best_leaf: Option<BeamLeaf>Best leaf for the ROOT player to move.
terminal_leaves: Vec<BeamLeaf>All terminals discovered, best first (root-player perspective).
reached_terminal: bool§max_depth_reached: u32§stats: BeamStats§root_player: u8Player to move at the root.
frontier_leaves: Vec<BeamLeaf>Non-terminal leaves still live at max_depth_reached; empty once
the search fully resolves (reached_terminal is true).
Implementations§
Source§impl BeamSearchResult
impl BeamSearchResult
Sourcepub fn ranked_root_moves(&self, top_k: Option<usize>) -> Vec<RankedRootMove>
pub fn ranked_root_moves(&self, top_k: Option<usize>) -> Vec<RankedRootMove>
Aggregate every collected leaf by its first move from the root.
Groups terminal_leaves and frontier_leaves by the first move of
each leaf’s principal variation and summarizes each group’s value
from the root player’s perspective. See RankedRootMove for the
caveat: these are beam-sampled statistics, not proven minimax values.
Trait Implementations§
Source§impl Clone for BeamSearchResult
impl Clone for BeamSearchResult
Source§fn clone(&self) -> BeamSearchResult
fn clone(&self) -> BeamSearchResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BeamSearchResult
impl Debug for BeamSearchResult
Source§impl PartialEq for BeamSearchResult
impl PartialEq for BeamSearchResult
impl StructuralPartialEq for BeamSearchResult
Auto Trait Implementations§
impl Freeze for BeamSearchResult
impl RefUnwindSafe for BeamSearchResult
impl Send for BeamSearchResult
impl Sync for BeamSearchResult
impl Unpin for BeamSearchResult
impl UnsafeUnpin for BeamSearchResult
impl UnwindSafe for BeamSearchResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more