|
libmcts
A Monte Carlo Tree Search Library
|
implements most methods of the inode interface. some methods have to be implemented problem dependend. Inner nodes are all nonterminal nodes. More...
#include <inner_node.hpp>
Public Member Functions | |
| InnerNode (const Context &context, Config *config, node_t *parent, IBackpropagationStrategy *backprop_strat) | |
| virtual void | expand ()=0 |
| expand the current context and add all possible derived contexts as children. | |
| virtual node_t * | select_child ()=0 |
| selects a childnode according to a configurable metric More... | |
| virtual void | accept (visitor_t *visitor) |
| accepts a visitor according to the visitor pattern. More... | |
| virtual const vector< node_t * > | children () const |
| get the children of the current node More... | |
| virtual void | add_child (node_t *child) |
| insert a new node as a child of the current one. More... | |
| virtual Config * | config () const |
| gets the config object More... | |
| virtual const Context | context () const |
| gets the context associated with the current node More... | |
| virtual node_t * | parent () const |
| gets the parent of the current node More... | |
| virtual node_t * | select_recusively () |
| recursively selects nodes with a given simulation strategy until an terminal node is reached. More... | |
| virtual double | simulate () const |
| applies a simulation strategy to a terminal node. More... | |
| virtual double | ev () const |
| gets the current expected value. More... | |
| virtual double | std_dev () const |
| gets the standard deviation. More... | |
| virtual double | variance () const |
| gets the variance. More... | |
| virtual int | nb_samples () const |
| number of times a selection strategy selected the current node. More... | |
| virtual void | backpropagate (const double &value) |
| applies a backpropagation strategy to traverse the simulated result back up in the tree. More... | |
Public Member Functions inherited from mcts::INode< Context, Config > | |
| virtual unsigned | count_recursive () const |
| recursively counts number of childen beneth this nodes. counts in the current node. More... | |
Public Attributes | |
| IBackpropagationStrategy * | backprop_strat_ |
| strategy that is used for propagating values back in the tree. | |
Additional Inherited Members | |
Public Types inherited from mcts::INode< Context, Config > | |
| typedef INode< Context, Config > | node_t |
implements most methods of the inode interface. some methods have to be implemented problem dependend. Inner nodes are all nonterminal nodes.
| Context | @README |
| Config | @README |
Definition at line 19 of file inner_node.hpp.
|
inlinevirtual |
accepts a visitor according to the visitor pattern.
| visitor | object |
Implements mcts::INode< Context, Config >.
Definition at line 44 of file inner_node.hpp.
|
inlinevirtual |
insert a new node as a child of the current one.
| child | pointer to a node |
Implements mcts::INode< Context, Config >.
Definition at line 48 of file inner_node.hpp.
|
inlinevirtual |
applies a backpropagation strategy to traverse the simulated result back up in the tree.
| value |
Implements mcts::INode< Context, Config >.
Definition at line 76 of file inner_node.hpp.
|
inlinevirtual |
get the children of the current node
Implements mcts::INode< Context, Config >.
Definition at line 46 of file inner_node.hpp.
|
inlinevirtual |
gets the config object
Implements mcts::INode< Context, Config >.
Definition at line 50 of file inner_node.hpp.
|
inlinevirtual |
gets the context associated with the current node
Implements mcts::INode< Context, Config >.
Definition at line 52 of file inner_node.hpp.
|
inlinevirtual |
gets the current expected value.
Implements mcts::INode< Context, Config >.
Definition at line 68 of file inner_node.hpp.
|
inlinevirtual |
number of times a selection strategy selected the current node.
Implements mcts::INode< Context, Config >.
Definition at line 74 of file inner_node.hpp.
|
inlinevirtual |
gets the parent of the current node
Implements mcts::INode< Context, Config >.
Definition at line 54 of file inner_node.hpp.
|
pure virtual |
selects a childnode according to a configurable metric
Implements mcts::INode< Context, Config >.
Referenced by mcts::InnerNode< Context, Config >::select_recusively().
|
inlinevirtual |
recursively selects nodes with a given simulation strategy until an terminal node is reached.
Implements mcts::INode< Context, Config >.
Definition at line 56 of file inner_node.hpp.
|
inlinevirtual |
applies a simulation strategy to a terminal node.
Implements mcts::INode< Context, Config >.
Definition at line 64 of file inner_node.hpp.
|
inlinevirtual |
gets the standard deviation.
Implements mcts::INode< Context, Config >.
Definition at line 70 of file inner_node.hpp.
|
inlinevirtual |
gets the variance.
Implements mcts::INode< Context, Config >.
Definition at line 72 of file inner_node.hpp.
1.8.15