NTRT Simulator  v1.1
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
AnnealAdapter.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012, United States Government, as represented by the
3  * Administrator of the National Aeronautics and Space Administration.
4  * All rights reserved.
5  *
6  * The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed
7  * under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * http://www.apache.org/licenses/LICENSE-2.0.
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15  * either express or implied. See the License for the specific language
16  * governing permissions and limitations under the License.
17 */
18 
19 #ifndef ANNEALADAPTER_H_
20 #define ANNEALADAPTER_H_
21 
31 #include <vector>
34 
36 {
37 public:
38  AnnealAdapter();
39  ~AnnealAdapter();
45  void initialize(AnnealEvolution *evo,bool isLearning,configuration config);
46  std::vector<std::vector<double> > step(double deltaTimeSeconds, std::vector<double> state);
47  void endEpisode(std::vector<double> state);
48 
49 private:
50  int numberOfActions;
51  int numberOfStates;
52  int numberOfControllers;
53  AnnealEvolution *annealEvo;
54  std::vector< AnnealEvoMember *>currentControllers;
55  std::vector<double> initialPosition;
56  double errorOfFirstController;
57  double totalTime;
58 };
59 
60 #endif /* ANNEALADAPTER_H_ */
Contains the definition of class AnnealEvoMember Adapting NeuroEvolution to do Simulated Annealing...
Contains the definition of class AnnealEvolution. Adapting NeuroEvolution to do Simulated Annealing...
void initialize(AnnealEvolution *evo, bool isLearning, configuration config)