com.phasmidsoftware.gambit.game.MCTSNode
See theMCTSNode companion object
A node in the MCTS search tree.
Mutable: visits and wins are updated in-place during backpropagation. Children are added during expansion. untriedMoves shrinks as children are expanded.
No parent reference -- backpropagation uses an explicit path stack accumulated during selection, avoiding circular references and the GC/equality issues that back-references cause in tree structures.
Type parameters
- M
-
the move type.
- Pl
-
the player identity type.
- S
-
the state type.
Value parameters
- children
-
expanded child nodes.
- move
-
the move that led to this state (None for root).
- movedBy
-
the player who made
move(None for root). - state
-
the game state at this node.
- untriedMoves
-
moves not yet expanded into children.
- visits
-
number of times this node has been visited.
- wins
-
cumulative score from simulations through this node, from the perspective of
movedBy.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article