From e655d2cbe7ed47661ffd1a49e1c95aa49a076598 Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Thu, 20 Jun 2024 18:11:24 +0700 Subject: [PATCH] update --- src/interface.jl | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index e142230..ea69ca2 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -12,25 +12,25 @@ using ..type, ..mcts """ Search the best action to take for a given state and task # Arguments - - `a::agent` - one of Yiem's agents - `initial state` initial state - - `decisionMaker::Function` - decide what action to take - - `evaluator::Function` - assess the value of the state - - `reflector::Function` - generate lesson from trajectory and reward - - `isterminal::Function` - determine whether a given state is a terminal state - - `n::Integer` - how many times action will be sampled from decisionMaker - - `w::Float64` - exploration weight. Value is usually between 1 to 2. - Value 1.0 makes MCTS balance between exploration and exploitation like 50%-50% - Value 2.0 makes MCTS aggressively search the tree - + - `transition::Function` + a function that define how the state transitions + - `transitionargs::NamedTuple` + arguments for transition function + +# Keyword Arguments + - `totalsample::Integer` + a number of child state MCTS sample at each node during expansion phase + - `maxdepth::Integer` + a number of levels MCTS goes during simulation phase + - `maxiterations::Integer` + a number of iteration MCTS goes thru expansion -> simulation -> backpropagation cycle + - `explorationweight::Number` + exploration weight controls how much MCTS should explore new state instead of exploit + a known state. 1.0 balance between exploration and exploitation like 50%-50%. 2.0 makes MCTS + aggressively explore new state. + # Return - `plan::Vector{Dict}` best plan @@ -41,7 +41,7 @@ julia> ``` # TODO - [] update docstring + [x] update docstring [] return best action # Signature