Пример #1
0
int main(int argc, char** argv){
	//Reading parameters from file defined as input in the run command:
	Parameters param(argc, argv);
	srand(param.getSeed());
	
	//Using Basic features:
	RedundantBPROFeatures features(&param);
	//Reporting parameters read:
	printBasicInfo(param);
	
	ALEInterface ale(param.getDisplay());

	ale.setFloat("repeat_action_probability", 0.00);
	ale.setInt("random_seed", param.getSeed());
	ale.setFloat("frame_skip", param.getNumStepsPerAction());
	ale.setInt("max_num_frames_per_episode", param.getEpisodeLength());

	ale.loadROM(param.getRomPath().c_str());

	//Instantiating the learning algorithm:
	SarsaLearner sarsaLearner(ale, &features, &param,param.getSeed());
    //Learn a policy:
    sarsaLearner.learnPolicy(ale, &features);

    printf("\n\n== Evaluation without Learning == \n\n");
    sarsaLearner.evaluatePolicy(ale, &features);
	
    return 0;
}
Пример #2
0
 void print()
 {
     printBasicInfo();
     printNeighbours();
 }