From a7fdbcede94708b8b84b699297a0303536abe16a Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Sun, 5 May 2024 23:55:54 +0700 Subject: [PATCH] update --- src/mcts.jl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/mcts.jl b/src/mcts.jl index fc71341..0c9b2e9 100644 --- a/src/mcts.jl +++ b/src/mcts.jl @@ -379,6 +379,29 @@ function selectChildNode(node::MCTSNode)::MCTSNode end +""" Determine wheter a given node is a root node + +# Arguments + - `node::MCTSNode` + node of a search tree + +# Return + - `isrootnode::Bool` + true if the given node is root node, false otherwise + +# Example +```jldoctest +julia> +``` + +# TODO + [] update docs + [TESTING] implement the function + +# Signature +""" +isroot(node::MCTSNode)::Bool = node.nodekey == "root" ? true : false + # ------------------------------------------------------------------------------------------------ # # Create a complete example using the defined MCTS functions # # ------------------------------------------------------------------------------------------------ #