Skip to main content

MonteCarlo

Classes

Constants

From: A Survey of Monte Carlo Tree Search Methods The value Cp = 1/√2 was shown by Kocsis and Szepesvari [120] to satisfy the Hoeffding ineqality with rewards in the range [0, 1]

Functions

MonteCarloTreeSearch

Kind: global class
Author: Alex Goldring
Copyright: Company Named Limited (c) 2025

monteCarloTreeSearch.rootState : S

Kind: instance property of MonteCarloTreeSearch

monteCarloTreeSearch.root : StateNode | null

Kind: instance property of MonteCarloTreeSearch

monteCarloTreeSearch.computeValidMoves : function

Kind: instance property of MonteCarloTreeSearch

monteCarloTreeSearch.computeTerminalFlag : function

Kind: instance property of MonteCarloTreeSearch

monteCarloTreeSearch.maxExplorationDepth : number

Depth to which plays will be explored

Kind: instance property of MonteCarloTreeSearch

monteCarloTreeSearch.random : function

Kind: instance property of MonteCarloTreeSearch

monteCarloTreeSearch.initialize(rootState, computeValidMoves, computeTerminalFlag, cloneState, heuristic)

Kind: instance method of MonteCarloTreeSearch

ParamTypeDescription
rootStateS
computeValidMovesfunction
computeTerminalFlagfunction
cloneStatefunction
heuristicfunctionEstimation function for evaluation of intermediate stated, guides exploration

monteCarloTreeSearch.selectRandom(node, state) ⇒ StateNode

Kind: instance method of MonteCarloTreeSearch

ParamType
nodeStateNode
stateS

monteCarloTreeSearch.playout() ⇒ S

Perform a playout from the root node

Kind: instance method of MonteCarloTreeSearch
Returns: S - final state of the playout

C_ks : number

From: A Survey of Monte Carlo Tree Search Methods The value Cp = 1/√2 was shown by Kocsis and Szepesvari [120] to satisfy the Hoeffding ineqality with rewards in the range [0, 1]

Kind: global constant

computeNodeSelectionScore(parent, child) ⇒ number

Kind: global function

ParamType
parentStateNode
childStateNode

materializedEdgeTarget(state, source, edge, computeTerminalFlag, heuristic)

Kind: global function

ParamType
stateS
sourceStateNode
edgeMoveEdge
computeTerminalFlagfunction
heuristicfunction