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

exp-examples.num-opt-benchmarks.txt Maven / Gradle / Ivy

The newest version!
ea.experiment(
  runs = (randomGenerator = (seed = [1:1:5]) * [m.defaultRG()]) *
    (problem = [
      ea.p.s.pointAiming(p = 200);
      ea.p.s.circularPointsAiming(p = 200);
      ea.p.s.ackley(p = 20);
      ea.p.s.rastrigin(p = 20);
      ea.p.s.sphere(p = 20)
    ]) *
    (solver = (nEval = [5000]) * [
      ea.s.cmaEs();
      ea.s.ga(representation = ea.r.doubleString());
      ea.s.simpleEs();
      ea.s.openAiEs();
      ea.s.pso()
    ]) * [
    ea.run()
  ];
  listeners = [
    ea.l.console(
      functions = [
        ea.f.size(of = ea.f.genotype(of = ea.f.best()); format = "%3d");
        ea.f.quality(of = ea.f.best(); format = "%6.2f");
        ea.f.hist(of = f.each(of = ea.f.all(); mapF = ea.f.quality()));
        ea.f.id(of = ea.f.best());
        ea.f.parentIds(of = ea.f.best(); format = "%20.20s")
      ];
      onlyLast = true;
      runFunctions = [ea.f.runKey(key = "problem.p")]
    );
    ea.l.expPlotSaver(
      filePath = "../num-bench-fitness.png";
      freeScales = true;
      w = 600; h = 1000;
      type = lines;
      plot = ea.plot.qualityPlotMatrix(
        xFunction = f.quantized(of = ea.f.nOfEvals(); q = 200)
      )
    )
  ]
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy