From 45bbd92e78354331bcb85c40d02184172d61adf5 Mon Sep 17 00:00:00 2001 From: tonaerospace Date: Wed, 1 May 2024 21:04:59 +0700 Subject: [PATCH] update --- src/mcts.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mcts.jl b/src/mcts.jl index 220a019..cfdd446 100644 --- a/src/mcts.jl +++ b/src/mcts.jl @@ -204,7 +204,10 @@ end contain Thought, Action, Observation # Return - - `newstate::AbstractDict` + - (newStatekey, ) + - `newStatekey::String` + key for newstate + - `newstate::Dict{Symbol, Any}` next game state # Example @@ -233,7 +236,7 @@ julia> thoughtDict = Dict( # Signature """ function MCTStransition(a::T1, state::T2, - thoughtDict::T3)::AbstractDict where {T1<:agent, T2<:AbstractDict, T3<:AbstractDict} + thoughtDict::T3)::Tuple{String, Dict{Symbol, Any}} where {T1<:agent, T2<:AbstractDict, T3<:AbstractDict} latestThoughtKey, _ = GeneralUtils.findHighestIndexKey(thoughtDict, "Thought") latestActionKey, latestActionIndice = GeneralUtils.findHighestIndexKey(thoughtDict, "Action") _action = thoughtDict[latestActionKey]