update
This commit is contained in:
@@ -47,12 +47,9 @@ julia>
|
||||
# Signature
|
||||
"""
|
||||
function runMCTS(
|
||||
config::T1,
|
||||
initialState,
|
||||
decisionMaker::Function,
|
||||
evaluator::Function,
|
||||
reflector::Function,
|
||||
transition::Function,
|
||||
args...,
|
||||
;
|
||||
totalsample::Integer=3,
|
||||
maxDepth::Integer=3,
|
||||
@@ -74,11 +71,11 @@ function runMCTS(
|
||||
# do nothing then go directly to backpropagation
|
||||
backpropagate(leafNode, node.reward)
|
||||
else
|
||||
expand(config, node, decisionMaker, evaluator, reflector, transition;
|
||||
expand(node, transition, args...;
|
||||
totalsample=totalsample)
|
||||
leafNode = selectChildNode(node)
|
||||
simTrajectoryReward, terminalstate = simulate(config, leafNode, decisionMaker, evaluator,
|
||||
reflector, transition; maxDepth=maxDepth, totalsample=totalsample)
|
||||
simTrajectoryReward, terminalstate = simulate(leafNode, transition, args...;
|
||||
maxDepth=maxDepth, totalsample=totalsample)
|
||||
if terminalstate !== nothing #XXX not sure why I need this
|
||||
terminalstate[:totalTrajectoryReward] = simTrajectoryReward
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user