From e5581072848375b37a578aeeec996317ea1b5f64 Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Tue, 30 Apr 2024 17:39:45 +0700 Subject: [PATCH] update --- src/llmfunction.jl | 2 +- src/mcts.jl | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/llmfunction.jl b/src/llmfunction.jl index a4c705e..4542bac 100644 --- a/src/llmfunction.jl +++ b/src/llmfunction.jl @@ -94,7 +94,7 @@ function virtualWineCustomerChatbox(a::T1, input::T2)::String where {T1<:agent, :text=> prompt, ) ) - + @show outgoingMsg result = GeneralUtils.sendReceiveMqttMsg(outgoingMsg) response = result[:response][:text] diff --git a/src/mcts.jl b/src/mcts.jl index c8d3511..c3edf1d 100644 --- a/src/mcts.jl +++ b/src/mcts.jl @@ -131,8 +131,10 @@ function expand(a::T1, node::MCTSNode, state::T2, decisionMaker::Function, state @show thoughtDict newstate = MCTStransition(a, node.state, thoughtDict) #[] Implement your transition function - if newstate ∉ keys(node.children) - statetype = typeof(state) + if newstate ∉ keys(node.children) # BUG should be "key of the newstate" here not newstate + statetype = typeof(state) + + # BUG should be node.children[key of newstate] here not newstate. may be a uuid node.children[newstate] = MCTSNode(newstate, 0, 0.0, Dict{statetype, MCTSNode}()) end end