OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NeuroEvolutionAgent.h
Go to the documentation of this file.
1 #ifndef NEURO_EVOLUTION_AGENT_H_
2 #define NEURO_EVOLUTION_AGENT_H_
3 
4 #include <OpenANN/rl/Agent.h>
5 #include <OpenANN/OpenANN>
8 #include <vector>
9 #include <list>
10 
11 using namespace OpenANN;
12 
13 class NeuroEvolutionAgent : public Agent, public Optimizable
14 {
16  int h;
18  bool b;
20  const std::string a;
22  bool compress;
24  int m;
26  bool fullyObservable;
28  bool alphaBetaFilter;
30  bool doubleExponentialSmoothing;
32  bool gruauFitness;
33 
34  Environment* environment;
35  int inputSize;
36  Net policy;
37  IPOPCMAES opt;
38  Eigen::VectorXd lastState;
39  bool firstStep;
40  std::vector<DoubleExponentialSmoothing> des;
41  std::list<Eigen::VectorXd> inputBuffer;
42 public:
43  NeuroEvolutionAgent(int h, bool b, const std::string& a,
44  bool compress = false, int m = 0,
45  bool fullyObservable = true,
46  bool alphaBetaFilter = false,
47  bool doubleExponentialSmoothing = false);
49  virtual void abandoneIn(Environment& environment);
50  virtual void chooseAction();
51  virtual void chooseOptimalAction();
52 
53  virtual const Eigen::VectorXd& currentParameters();
54  virtual unsigned int dimension();
55  virtual double error();
56  virtual Eigen::VectorXd gradient();
57  virtual void initialize();
58  virtual bool providesGradient();
59  virtual bool providesInitialization();
60  virtual void setParameters(const Eigen::VectorXd& parameters);
61  void setSigma0(double sigma0);
62 };
63 
64 #endif // NEURO_EVOLUTION_AGENT_H_