libmcts
A Monte Carlo Tree Search Library
max_value_selector.hpp
1 #ifndef MAX_VALUE_SELECTOR_H
2 #define MAX_VALUE_SELECTOR_H
3 
4 #include "max_function_selector.hpp"
5 
6 namespace mcts {
7 
8 // ----------------------------------------------------------------------
13 // ----------------------------------------------------------------------
14 template <typename Context, typename Config>
15 class MaxValueSelector : public MaxFunctionSelector<Context, Config> {
16  typedef typename INode<Context, Config>::node_t node_t;
17 
18 public:
19  virtual double evaluate(node_t *node) const { return node->ev(); }
20 };
21 }
22 
23 #endif
selector selects the child of a node that maximises a given metric.
basic interface for a node in the tree. Every node has to implement this functions.
Definition: inode.hpp:18
selects the child which maximises ev
virtual double evaluate(node_t *node) const
this function has to be implemented in derived classes that specializes the metric to be used....
virtual double ev() const =0
gets the current expected value.