use dict string key

This commit is contained in:
2026-06-25 05:28:28 +07:00
parent 25f539581e
commit 26dc2d7e60
3 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -64,10 +64,10 @@ function runMCTS(
saveSimulatedNode::Bool=false,
multithread=false,
)::NamedTuple{(:root, :bestNextState, :bestTerminalState, :highValueStateList),
Tuple{MCTSNode,T,T,Vector{Dict{Symbol,Any}}}} where {T<:Any}
Tuple{MCTSNode,T,T,Vector{Dict{String,Any}}}} where {T<:Any}
root = MCTSNode("root", initialstate, 0, 0, 0, 0, false, nothing, Dict{String,MCTSNode}(),
Dict{Symbol,Any}())
Dict{String,Any}())
# storage for holding all high reward terminal nodes
highValueState = Channel{Any}(100)
@@ -125,7 +125,7 @@ function runMCTS(
bestTerminalState = selectBestTrajectoryNode(root)
# take all high value state from highValueState channel and put it in a list
highValueStateList = Vector{Dict{Symbol, Any}}()
highValueStateList = Vector{Dict{String, Any}}()
while !isempty(highValueState)
push!(highValueStateList, take!(highValueState))
end