This commit is contained in:
2024-05-01 21:04:59 +07:00
parent fba99ab695
commit 45bbd92e78

View File

@@ -204,7 +204,10 @@ end
contain Thought, Action, Observation contain Thought, Action, Observation
# Return # Return
- `newstate::AbstractDict` - (newStatekey, )
- `newStatekey::String`
key for newstate
- `newstate::Dict{Symbol, Any}`
next game state next game state
# Example # Example
@@ -233,7 +236,7 @@ julia> thoughtDict = Dict(
# Signature # Signature
""" """
function MCTStransition(a::T1, state::T2, 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") latestThoughtKey, _ = GeneralUtils.findHighestIndexKey(thoughtDict, "Thought")
latestActionKey, latestActionIndice = GeneralUtils.findHighestIndexKey(thoughtDict, "Action") latestActionKey, latestActionIndice = GeneralUtils.findHighestIndexKey(thoughtDict, "Action")
_action = thoughtDict[latestActionKey] _action = thoughtDict[latestActionKey]