void AtariNoGeomExperiment::setSubstrateValues() { // Set substrate value for all objects (of a certain size) setSubstrateObjectValues(*visProc); // Set substrate value for self setSubstrateSelfValue(*visProc); }
void AtariFTNeatExperiment::runAtariEpisode(shared_ptr<NEAT::GeneticIndividual> individual) { // Reset the game ale.reset_game(); while (!ale.game_over()) { // Set value of all nodes to zero substrate.reinitialize(); substrate.dummyActivation(); // Set substrate value for all objects (of a certain size) setSubstrateObjectValues(*visProc); // Set substrate value for self setSubstrateSelfValue(*visProc); // Propagate values through the ANN // This is necessary to fully propagate through the different layers substrate.updateFixedIterations(2); //printLayerInfo(); // Choose which action to take Action action = selectAction(*visProc); ale.act(action); } cout << "Game ended in " << ale.frame << " frames with score " << ale.game_score << endl; // Give the reward to the agent individual->reward(ale.game_score); }