This commit is contained in:
2025-03-11 00:13:25 +07:00
parent b1d655acff
commit 097484675c
2 changed files with 62 additions and 54 deletions

View File

@@ -85,10 +85,11 @@ function runMCTS(
# do nothing then go directly to backpropagation. It means the end of this iteration
backpropagate(node, node.reward)
else
println(111)
_ = expand(node, transition, transitionargs;
horizontalSample=horizontalSampleExpansionPhase)
println(555)
println(666)
@sync for (leafNodeKey, leafNode) in node.children
@spawn simulateThenBackpropagate(leafNode, transition, transitionargs;
@@ -96,6 +97,14 @@ function runMCTS(
horizontalSampleSimulationPhase=horizontalSampleSimulationPhase,
saveSimulatedNode=saveSimulatedNode)
end
#CHANGE for testing
# for (leafNodeKey, leafNode) in node.children
# simulateThenBackpropagate(leafNode, transition, transitionargs;
# maxSimulationDepth=maxSimulationDepth,
# horizontalSampleSimulationPhase=horizontalSampleSimulationPhase,
# saveSimulatedNode=saveSimulatedNode)
# end
end
# stop if the early stop condition is met