This commit is contained in:
narawat lamaiin
2024-05-05 23:55:54 +07:00
parent 4e35601e2a
commit a7fdbcede9

View File

@@ -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 #
# ------------------------------------------------------------------------------------------------ #