44 int main(
int argc,
char** argv)
46 std::cout <<
"AppGATests" << std::endl;
49 const std::string suffix((argc > 1) ? argv[1] :
"default");
51 std::string fileName =
"Config.ini";
52 std::string path =
"bmirletz/GATests/";
60 testConfigData.readFile(fullPath + fileName);
61 bool learning = testConfigData.getintvalue(
"learning");
65 int numberOfInputs = testConfigData.getintvalue(
"numberOfStates");
66 int numberOfOutputs = testConfigData.getintvalue(
"numberOfActions");
67 std::vector<double> state(numberOfInputs, 1.0);
68 double goal = 1.0 * (double) numberOfOutputs;
78 std::vector<std::vector<double> > actions = testAdapter.step(0.0, state);
80 for(std::size_t i = 0; i < actions.size(); i++)
82 for(std::size_t j = 0; j < actions[i].size(); j++)
84 score1 += actions[i][j];
88 std::vector<double> scores;
89 scores.push_back(score1);
90 scores.push_back(0.0);
92 testAdapter.endEpisode(scores);
void initialize(NeuroEvolution *evo, bool isLearning, configuration config)
A series of functions to assist with file input/output.
static std::string getResourcePath(std::string relPath)
Defines a class NeuroAdapter to pass parameters from NeuroEvolution to a controller.
Top level class for NeuroEvolution.
int main(int argc, char **argv)