use dict string key
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user