Skip to main content

Crate simple_mcts

Crate simple_mcts 

Source

Macros§

impl_resettable_buffer
Implements ResettableBuffer for standard collections.

Structs§

Action
Represents an index corresponding to a specific legal move or action.
Engine
The core Engine handling the Monte Carlo Tree Search algorithm.
MctsAction
A structure bundling a game action with its targeted engine ID.
MctsBatch
The Batch Manager for MCTS Engines.
MctsConfig
Configuration for the MCTS batch manager.
MctsId
A unique, strongly-typed identifier representing a specific Engine instance within the MctsBatch manager.
MctsNodeId
A strictly typed identifier for an instantiated node within the MCTS tree.
MctsScore
A structure bundling the final score array with its targeted engine ID.
MctsSelectionResult
Represents the output of a selection phase for a specific engine.
MctsStateEvaluation
A structure bundling an MCTS evaluation with its targeted engine ID.

Enums§

MctsEngineError
Errors that can occur during the execution of the MCTS engine.
MctsError
Errors that can occur when interacting with the MctsBatch manager.
SelectionResult
Represents the outcome of a tree selection phase.
StateEvaluation
Represents the evaluation of a game state, usually provided by a heuristic function or a neural network (e.g., in AlphaZero/MuZero architectures).

Traits§

ResettableBuffer
A buffer used to store the sequence of actions traversed during the selection phase.
ScoreTransformer
Transforms a score during the backpropagation phase.
SelectionFunction
Evaluates a child node during the tree selection phase.

Functions§

negate_score
Inverts the evaluation score during the backpropagation phase.
puct
Calculates the Predictor + Upper Confidence bound applied to Trees (PUCT) score.
visits_to_probabilities
Converts a raw array of visit counts into a normalized probability distribution.
visits_to_probabilities_with_temperature
Converts visit counts into a probability distribution using a temperature parameter.

Type Aliases§

ActionCollection
IdCollection
ResultCollection
ScoreCollection
StateEvaluationCollection