Package net.javlov

Examples of net.javlov.EpisodicRewardStepStatistic


  @Override
  public void run() {
    int episodes = 500;
    int runs = 100;
    double[][] allrewards = new double[runs][episodes];
    EpisodicRewardStepStatistic stat = new EpisodicRewardStepStatistic(episodes);
    sim.addStatistic(stat);
   
    for ( int r = 0; r < runs; r++ ) {
      sim.init();
      agent.setInterruptOptions(false);
      //sim.suspend();
      //agent.setInterruptOptions(true);
      for ( int i = 0; i < episodes; i++ ) {
        if ( i == 400 )
          agent.setInterruptOptions(true);
        sim.runEpisode();
        sim.reset();
      }
      allrewards[r] = stat.getRewards();
    }
    System.out.println(agent.getValueFunction());
    System.out.println("FINISHED");   
    System.out.println(qf);
View Full Code Here

TOP

Related Classes of net.javlov.EpisodicRewardStepStatistic

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.