libmcts
A Monte Carlo Tree Search Library
min_sample_selector.hpp
1 #ifndef MIN_SAMPLE_SELECTOR_H
2 #define MIN_SAMPLE_SELECTOR_H
3 
4 #include "min_function_selector.hpp"
5 
6 namespace mcts {
7 
8 // ----------------------------------------------------------------------
13 // ----------------------------------------------------------------------
14 template <typename Context, typename Config>
15 class MinSampleSelector : public MinFunctionSelector<Context, Config> {
16  typedef typename INode<Context, Config>::node_t node_t;
17 
18 public:
20 
21  virtual double evaluate(node_t *node) const { return node->nb_samples(); }
22 };
23 }
24 
25 #endif
selects the child with the lowest number of samples.
virtual double evaluate(node_t *node) const
this function has to be implemented in derived classes that specializes the metric to be used....
basic interface for a node in the tree. Every node has to implement this functions.
Definition: inode.hpp:18
virtual int nb_samples() const =0
number of times a selection strategy selected the current node.
selects a node that minimises a given metric