pub enum MctsAction {
Selection {
R: NodeId,
RP: Vec<NodeId>,
},
Expansion {
L: NodeId,
},
Simulation {
C: NodeId,
AC: Vec<NodeId>,
},
Backpropagation {
C: NodeId,
result: GameOutcome,
},
EverythingIsCalculated,
}
Expand description
Represents the four main stages of the MCTS algorithm.
This enum is used to manage the state of the search process.
Variants§
Selection
Selection: Start from the root R
and select successive child nodes until a leaf node L
is reached.
Fields
Expansion
Expansion: Create one or more child nodes from the selected leaf node L
.
Simulation
Simulation: Run a random playout from a newly created child node C
.
Fields
Backpropagation
Backpropagation: Update the statistics of the nodes on the path from C
to the root R
.
Fields
§
result: GameOutcome
The result of the simulation.
EverythingIsCalculated
Represents a state where the entire tree has been explored and the outcome is certain.
Implementations§
Trait Implementations§
Source§impl Clone for MctsAction
impl Clone for MctsAction
Source§fn clone(&self) -> MctsAction
fn clone(&self) -> MctsAction
Returns a duplicate of the value. Read more
1.0.0 · 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 MctsAction
impl Debug for MctsAction
Source§impl PartialEq for MctsAction
impl PartialEq for MctsAction
impl StructuralPartialEq for MctsAction
Auto Trait Implementations§
impl Freeze for MctsAction
impl RefUnwindSafe for MctsAction
impl Send for MctsAction
impl Sync for MctsAction
impl Unpin for MctsAction
impl UnwindSafe for MctsAction
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