libmcts
A Monte Carlo Tree Search Library
Public Types | Public Member Functions | List of all members
mcts::RootNode< Context, Config, WrapNode > Class Template Reference

special node that is the root of each tree. Its merely a wrapper that wrapps around a inner node. More...

#include <root_node.hpp>

Inheritance diagram for mcts::RootNode< Context, Config, WrapNode >:

Public Types

typedef RootNode< Context, Config, WrapNode > root_node_t
 

Public Member Functions

 RootNode (const Context &context, Config *config)
 constructs a new object and passes all parameters to the wrapped node. More...
 
virtual node_tparent () const
 disabled in root node, to end backpropagating actions. More...
 
virtual void backpropagate (const double &value)
 consume value and do noting more. More...
 

Detailed Description

template<typename Context, typename Config, typename WrapNode>
class mcts::RootNode< Context, Config, WrapNode >

special node that is the root of each tree. Its merely a wrapper that wrapps around a inner node.

Template Parameters
Context@README
Config@README
WrapNodenode to derive from. ( has to be derived from inner node )

Definition at line 18 of file root_node.hpp.

Constructor & Destructor Documentation

◆ RootNode()

template<typename Context, typename Config, typename WrapNode>
mcts::RootNode< Context, Config, WrapNode >::RootNode ( const Context &  context,
Config *  config 
)
inline

constructs a new object and passes all parameters to the wrapped node.

Parameters
contextdescribing a state
configpointer to config object.

Definition at line 31 of file root_node.hpp.

32  : WrapNode(context, config, NULL) {}

Member Function Documentation

◆ backpropagate()

template<typename Context, typename Config, typename WrapNode>
virtual void mcts::RootNode< Context, Config, WrapNode >::backpropagate ( const double &  value)
inlinevirtual

consume value and do noting more.

Parameters
valueto consume

Definition at line 46 of file root_node.hpp.

46  {
47  WrapNode::backprop_strat_->on_backpropagate(value);
48  }

◆ parent()

template<typename Context, typename Config, typename WrapNode>
virtual node_t* mcts::RootNode< Context, Config, WrapNode >::parent ( ) const
inlinevirtual

disabled in root node, to end backpropagating actions.

Returns
nullptr

Definition at line 39 of file root_node.hpp.

39 { return NULL; }

The documentation for this class was generated from the following file: