Scheduler
tabularActionValues.h
Go to the documentation of this file.
1 
10 #ifndef TABULAR_ACTION_VALUES_H
11 #define TABULAR_ACTION_VALUES_H
12 
13 #include "actionValuesFunction.h"
14 
15 #include <string>
16 #include <vector>
17 
18 #include <mdp/context.h>
19 
20 namespace Mdp
21 {
22 
24 {
25 public:
26  TabularActionValues(std::shared_ptr<Context> context);
27  std::vector<std::vector<double>> randomly(size_t S, size_t A, time_t seed, double lowerBound, double upperBound);
28  std::vector<std::vector<double>> uniformly(size_t S, size_t A, double initialActionValues);
29  std::vector<std::vector<double>> fromFile(size_t S, size_t A, std::string filename);
30  double getValue(state_t state, action_t action) override;
31  std::vector<double> getValues(state_t state) override;
32  void updateValue(state_t state, action_t action, double value);
33  size_t size();
34 protected:
35  void init(std::shared_ptr<Context> context);
36  std::vector<std::vector<double>> actionValues;
37 };
38 
39 }
40 #endif
const size_t A
const size_t S
std::vector< std::vector< double > > fromFile(size_t S, size_t A, std::string filename)
void init(std::shared_ptr< Context > context)
void updateValue(state_t state, action_t action, double value)
double getValue(state_t state, action_t action) override
std::vector< std::vector< double > > randomly(size_t S, size_t A, time_t seed, double lowerBound, double upperBound)
string filename
Definition: aging.py:5
size_t action_t
Definition: action_impl.h:18
std::vector< std::vector< double > > uniformly(size_t S, size_t A, double initialActionValues)
Definition: action.h:18
std::vector< double > getValues(state_t state) override
std::vector< std::vector< double > > actionValues
size_t state_t
Definition: state.h:19
TabularActionValues(std::shared_ptr< Context > context)