All Downloads are FREE. Search and download functionalities are using the official Maven repository.

exp-examples.mini-robot-nav.txt Maven / Gradle / Ivy

The newest version!
ea.experiment(
  runs = (randomGenerator = (seed = [1]) * [m.defaultRG()]) * [ea.run(
      name = "robotnav_maze_tree";
        problem = ea.p.numEnvTo(
        dT = 0.1;
        finalT = 20;
        environment = ds.e.navigation(
          arena = e_maze;
          initialRobotXRange = m.range(min = 0.5; max = 0.5);
          initialRobotYRange = m.range(min = 0.75; max = 0.75);
          robotMaxV = 0.05
        );
        stopCondition = predicate.lt(f = ds.e.n.distanceFromTarget(); t = 0.01);
        f = ds.e.n.finalTimePlusD();
        type = minimize
      );
      solver = ea.s.mapElites(
        representation = ea.representation.multiSRTree();
        mapper = ea.mapper.nmrfToNds(of = ea.mapper.multiSrTreeToNmrf());
        nPop = 100;
        nEval = 4000;
        descriptors = [
          ea.s.me.d.descriptor(
            f = ds.e.n.x(of = ds.e.n.finalRobotP(of = ea.f.simOutcome(of = ea.f.quality())));
            min = 0;
            max = 1;
            nOfBins = 10
          );
          ea.s.me.d.descriptor(
            f = ds.e.n.y(of = ds.e.n.finalRobotP(of = ea.f.simOutcome(of = ea.f.quality())));
            min = 0;
            max = 1;
            nOfBins = 10
          )
        ]
      )
    )
  ];
  listeners = [
    ea.l.console(
      functions = [
        ea.f.simQuality(of = ea.f.quality(of = ea.f.best()); format = "%9.5f")
      ];
      onlyLast = true
    );
    ea.l.runSaver(
      filePathTemplate = "../best-traj-{solver.name}-{randomGenerator.seed:%04d}";
      of = ea.acc.lastBest();
      processors = [ea.f.toImage(image = ds.d.navigation(); of = ea.f.simOutcome(of = ea.f.quality()))]
    );
    ea.l.expPlotSaver(
      filePath = "../fitness";
      of = ea.plot.multi.quality(y = ea.f.simQuality(of = ea.f.quality(of = ea.f.best())))
    )
  ]
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy