update
This commit is contained in:
@@ -47,7 +47,7 @@ julia>
|
||||
# Signature
|
||||
"""
|
||||
function runMCTS(
|
||||
workDict::Dict{Symbol, Any},
|
||||
workDict::T1,
|
||||
initialState,
|
||||
decisionMaker::Function,
|
||||
evaluator::Function,
|
||||
@@ -58,7 +58,7 @@ function runMCTS(
|
||||
maxDepth::Integer=3,
|
||||
maxiterations::Integer=10,
|
||||
explorationweight::Number=1.0,
|
||||
)
|
||||
) where {T1<:AbstractDict}
|
||||
|
||||
root = MCTSNode("root", initialState, 0, 0, 0, 0, false, nothing, Dict{String, MCTSNode}())
|
||||
|
||||
@@ -74,7 +74,8 @@ function runMCTS(
|
||||
# do nothing then go directly to backpropagation
|
||||
backpropagate(leafNode, node.reward)
|
||||
else
|
||||
expand(workDict, node, decisionMaker, evaluator, reflector; totalsample=totalsample)
|
||||
expand(workDict, node, decisionMaker, evaluator, reflector, transition;
|
||||
totalsample=totalsample)
|
||||
leafNode = selectChildNode(node)
|
||||
simTrajectoryReward, terminalstate = simulate(workDict, leafNode, decisionMaker, evaluator,
|
||||
reflector; maxDepth=maxDepth, totalsample=totalsample)
|
||||
|
||||
Reference in New Issue
Block a user