This commit is contained in:
narawat lamaiin
2024-06-29 20:14:12 +07:00
parent b27684073d
commit 9e39d54c4b

View File

@@ -54,7 +54,7 @@ function runMCTS(
maxdepth::Integer=3, maxdepth::Integer=3,
maxiterations::Integer=10, maxiterations::Integer=10,
explorationweight::Number=1.0, explorationweight::Number=1.0,
)::Tuple )::NamedTuple
root = MCTSNode("root", initialstate, 0, 0, 0, 0, false, nothing, Dict{String, MCTSNode}()) root = MCTSNode("root", initialstate, 0, 0, 0, 0, false, nothing, Dict{String, MCTSNode}())
@@ -91,7 +91,7 @@ function runMCTS(
bestNextState = selectBestNextState(root) bestNextState = selectBestNextState(root)
besttrajectory = selectBestTrajectory(root) besttrajectory = selectBestTrajectory(root)
return (bestNextState.state, besttrajectory.state) return (bestNextState=bestNextState.state, bestFinalState=besttrajectory.state)
end end