libmcts
A Monte Carlo Tree Search Library
ibackpropagation_strategy.hpp
1 #ifndef IBACKPROPAGATION_STRATEGY_H
2 #define IBACKPROPAGATION_STRATEGY_H
3 
4 namespace mcts {
5 
6 // ----------------------------------------------------------------------
12 // ----------------------------------------------------------------------
14 public:
15  // ----------------------------------------------------------------------
19  // ----------------------------------------------------------------------
20  virtual void on_backpropagate(const double &value) = 0;
21 
22  // ----------------------------------------------------------------------
26  // ----------------------------------------------------------------------
27  virtual double ev() const = 0;
28 
29  // ----------------------------------------------------------------------
33  // ----------------------------------------------------------------------
34  virtual double std_deviation() const = 0;
35 
36  // ----------------------------------------------------------------------
40  // ----------------------------------------------------------------------
41  virtual double variance() const = 0;
42 
43  // ----------------------------------------------------------------------
47  // ----------------------------------------------------------------------
48  virtual int nb_samples() const = 0;
49 
50  // ----------------------------------------------------------------------
55  // ----------------------------------------------------------------------
56  virtual IBackpropagationStrategy *create() = 0;
57 
58  virtual ~IBackpropagationStrategy() {}
59 };
60 }
61 
62 #endif
virtual double ev() const =0
gets the current expected value
virtual IBackpropagationStrategy * create()=0
creates a new object of the same type and with the same constructor as the current object.
virtual double std_deviation() const =0
gets the current standard deviation
virtual void on_backpropagate(const double &value)=0
saves an value according to some metric.
A backpropagation strategy is used in each node. when a terminal node is simulated,...
virtual double variance() const =0
gets the current variance
virtual int nb_samples() const =0
gets the number of samples that are saved in the strat.