MonteCarlo
Classes
Constants
- 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]
Functions
MonteCarloTreeSearch
Kind: global class
Author: Alex Goldring
Copyright: Company Named Limited (c) 2025
- MonteCarloTreeSearch
- .rootState :
S - .root :
StateNode|null - .computeValidMoves :
function - .computeTerminalFlag :
function - .maxExplorationDepth :
number - .random :
function - .initialize(rootState, computeValidMoves, computeTerminalFlag, cloneState, heuristic)
- .selectRandom(node, state) ⇒
StateNode - .playout() ⇒
S
- .rootState :
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
| Param | Type | Description |
|---|---|---|
| rootState | S | |
| computeValidMoves | function | |
| computeTerminalFlag | function | |
| cloneState | function | |
| heuristic | function | Estimation function for evaluation of intermediate stated, guides exploration |
monteCarloTreeSearch.selectRandom(node, state) ⇒ StateNode
Kind: instance method of MonteCarloTreeSearch
| Param | Type |
|---|---|
| node | StateNode |
| state | S |
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
| Param | Type |
|---|---|
| parent | StateNode |
| child | StateNode |
materializedEdgeTarget(state, source, edge, computeTerminalFlag, heuristic)
Kind: global function
| Param | Type |
|---|---|
| state | S |
| source | StateNode |
| edge | MoveEdge |
| computeTerminalFlag | function |
| heuristic | function |