Commit 122e2536 authored by Romain Reuillon's avatar Romain Reuillon
Browse files

[Lib] fix: netlogo

parent 5a069799
Pipeline #427 failed with stage
in 1 minute and 30 seconds
......@@ -9,7 +9,7 @@ organization := "org.openmole"
//resolvers += Classpaths.sbtPluginSnapshots
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.5")
libraryDependencies ++= Seq(
"com.jsuereth" %% "scala-arm" % "2.0",
......
......@@ -145,11 +145,13 @@ lazy val netlogo6 = OsgiProject(
"ccl.northwestern.edu.netlogo6",
exports = Seq("org.nlogo.*"),
privatePackages = Seq("**"),
imports = Seq("!*")) settings (
imports = Seq("empty;resolution:=optional")) settings (
//resolvers += Resolver.bintrayRepo("netlogo", "NetLogo-JVM"),
libraryDependencies ++= Seq(
"org.nlogo" % "netlogo" % netLogo6Version % "provided" from s"https://dl.bintray.com/netlogo/NetLogo-JVM/org/nlogo/netlogo/$netLogo6Version/netlogo-$netLogo6Version.jar",
"org.scala-lang" % "scala-library" % "2.12.8" % "provided",
//"org.scala-lang" % "scala-reflect" % "2.12.8" % "provided",
//"org.scala-lang" % "scala-compiler" % "2.12.8" % "provided",
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.5" % "provided",
"commons-codec" % "commons-codec" % "1.10" % "provided",
"org.ow2.asm" % "asm-all" % "5.0.4" % "provided",
......@@ -157,7 +159,7 @@ lazy val netlogo6 = OsgiProject(
"org.parboiled" %% "parboiled" % "2.1.3" % "provided",
"com.typesafe" % "config" % "1.3.1" % "provided",
"net.lingala.zip4j" % "zip4j" % "1.3.2" % "provided"
), version := netLogo6Version, scalaVersion := "2.12.8", crossPaths := false) settings(settings: _*)
), version := netLogo6Version, scalaVersion := "2.12.8", crossPaths := false) settings(settings: _*)
lazy val scalaTagsVersion = "0.6.5"
lazy val scalaRxVersion = "0.4.0"
......@@ -225,7 +227,7 @@ lazy val squants =
) settings(settings: _*)
lazy val mgoVersion = "3.38"
lazy val mgoVersion = "3.39"
lazy val mgo = OsgiProject(dir, "mgo", exports = Seq("mgo.*", "freestyle.*"), imports = Seq("!better.*", "!javax.xml.*", "!scala.meta.*", "!sun.misc.*", "*"), privatePackages = Seq("!scala.*", "!monocle.*", "!org.apache.commons.math3.*", "!cats.*", "!squants.*", "!scalaz.*", "*")) settings(
libraryDependencies += "org.openmole" %% "mgo" % mgoVersion,
......
......@@ -174,7 +174,7 @@ object Genome {
fromVariables0(genome.toList, List(), List())
}
def toVariables(genome: Genome, continuousValues: Vector[Double], discreteValue: Vector[Int], scale: Boolean) = {
def toVariables(genome: Genome, continuousValues: Vector[Double], discreteValue: Vector[Int], scale: Boolean = true) = {
@tailrec def toVariables0(genome: List[Genome.GenomeBound], continuousValues: List[Double], discreteValues: List[Int], acc: List[FromContext[Variable[_]]]): FromContext[Vector[Variable[_]]] = {
genome match {
......
......@@ -17,23 +17,10 @@
package org.openmole.plugin.method.evolution
import org.openmole.core.context.{ Context, Val, Variable }
import org.openmole.core.exception.UserBadDataError
import org.openmole.core.expansion.FromContext
import org.openmole.core.workflow.tools.OptionalArgument
import cats._
import cats.data._
import cats.implicits._
import mgo.evolution._
import mgo.evolution.algorithm._
import mgo.evolution.breeding._
import mgo.evolution.elitism._
import mgo.evolution.niche._
import monocle.macros.GenLens
import org.openmole.core.workflow.builder.{ DefinitionScope, ValueAssignment }
import org.openmole.core.workflow.composition.DSLContainer
import org.openmole.core.workflow.domain._
import org.openmole.core.workflow.sampling._
import org.openmole.core.dsl._
import org.openmole.core.dsl.extension._
import org.openmole.plugin.method.evolution.Genome.Suggestion
import squants.time.Time
......@@ -42,9 +29,7 @@ import scala.language.higherKinds
object NSGA2 {
object DeterministicParams {
import mgo.evolution.algorithm.{ NSGA2 MGONSGA2, _ }
import mgo.evolution.algorithm.CDGenome
import cats.data._
import mgo.evolution.algorithm.{ CDGenome, NSGA2 MGONSGA2, _ }
implicit def integration: MGOAPI.Integration[DeterministicParams, (Vector[Double], Vector[Int]), Array[Any]] = new MGOAPI.Integration[DeterministicParams, (Vector[Double], Vector[Int]), Array[Any]] {
type G = CDGenome.Genome
......@@ -58,12 +43,17 @@ object NSGA2 {
def operations(om: DeterministicParams) = new Ops {
def startTimeLens = GenLens[EvolutionState[Unit]](_.startTime)
def generationLens = GenLens[EvolutionState[Unit]](_.generation)
def genomeValues(genome: G) = MGOAPI.paired(CDGenome.continuousValues.get _, CDGenome.discreteValues.get _)(genome)
def buildGenome(v: (Vector[Double], Vector[Int])): G = CDGenome.buildGenome(v._1, None, v._2, None)
def buildGenome(vs: Vector[Variable[_]]) = Genome.fromVariables(vs, om.genome).map(buildGenome)
def buildIndividual(genome: G, phenotype: Array[Any], context: Context) = CDGenome.DeterministicIndividual.buildIndividual(genome, phenotype)
def initialState = EvolutionState[Unit](s = ())
def result(population: Vector[I], state: S) = FromContext { p
......@@ -81,10 +71,12 @@ object NSGA2 {
MGONSGA2.initialGenomes(n, continuous, discrete, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: scala.util.Random) =
Genome.discrete(om.genome).map { discrete
MGONSGA2.adaptiveBreeding[S, Array[Any]](n, om.operatorExploration, discrete, ExactObjective.toFitnessFunction(om.objectives))(s, individuals, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: scala.util.Random) = FromContext { p
import p._
val discrete = Genome.discrete(om.genome).from(context)
val filterValue = om.filter.map(f GAIntegration.filterValue[G](f, om.genome, _.continuousValues.toVector, _.discreteValues.toVector).from(context))
MGONSGA2.adaptiveBreeding[S, Array[Any]](n, om.operatorExploration, discrete, ExactObjective.toFitnessFunction(om.objectives), filterValue)(s, individuals, rng)
}
def elitism(population: Vector[I], candidates: Vector[I], s: S, rng: scala.util.Random) =
Genome.continuous(om.genome).map { continuous
......@@ -108,12 +100,11 @@ object NSGA2 {
mu: Int,
genome: Genome,
objectives: Seq[ExactObjective[_]],
operatorExploration: Double)
operatorExploration: Double,
filter: Option[Condition])
object StochasticParams {
import mgo.evolution.algorithm.{ NoisyNSGA2 MGONoisyNSGA2, _ }
import mgo.evolution.algorithm.CDGenome
import cats.data._
import mgo.evolution.algorithm.{ CDGenome, NoisyNSGA2 MGONoisyNSGA2, _ }
implicit def integration = new MGOAPI.Integration[StochasticParams, (Vector[Double], Vector[Int]), Array[Any]] {
type G = CDGenome.Genome
......@@ -155,10 +146,12 @@ object NSGA2 {
MGONoisyNSGA2.initialGenomes(n, continuous, discrete, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: util.Random) =
Genome.discrete(om.genome).map { discrete
MGONoisyNSGA2.adaptiveBreeding[S, Array[Any]](n, om.operatorExploration, om.cloneProbability, aggregate, discrete) apply (s, individuals, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: util.Random) = FromContext { p
import p._
val discrete = Genome.discrete(om.genome).from(context)
val filterValue = om.filter.map(f GAIntegration.filterValue[G](f, om.genome, _.continuousValues.toVector, _.discreteValues.toVector).from(context))
MGONoisyNSGA2.adaptiveBreeding[S, Array[Any]](n, om.operatorExploration, om.cloneProbability, aggregate, discrete, filterValue) apply (s, individuals, rng)
}
def elitism(population: Vector[I], candidates: Vector[I], s: S, rng: util.Random) =
Genome.continuous(om.genome).map { continuous
......@@ -183,20 +176,22 @@ object NSGA2 {
genome: Genome,
objectives: Seq[NoisyObjective[_]],
historySize: Int,
cloneProbability: Double
cloneProbability: Double,
filter: Option[Condition]
)
def apply[P](
genome: Genome,
objectives: Objectives,
mu: Int = 200,
stochastic: OptionalArgument[Stochastic] = None
stochastic: OptionalArgument[Stochastic] = None,
filter: OptionalArgument[Condition] = None
): EvolutionWorkflow =
WorkflowIntegration.stochasticity(objectives, stochastic.option) match {
case None
val exactObjectives = objectives.map(o Objective.toExact(o))
val integration: WorkflowIntegration.DeterministicGA[_] = WorkflowIntegration.DeterministicGA(
DeterministicParams(mu, genome, exactObjectives, operatorExploration),
DeterministicParams(mu, genome, exactObjectives, operatorExploration, filter),
genome,
exactObjectives
)(DeterministicParams.integration)
......@@ -206,7 +201,7 @@ object NSGA2 {
val noisyObjectives = objectives.map(o Objective.toNoisy(o))
val integration: WorkflowIntegration.StochasticGA[_] = WorkflowIntegration.StochasticGA(
StochasticParams(mu, operatorExploration, genome, noisyObjectives, stochasticValue.replications, stochasticValue.reevaluate),
StochasticParams(mu, operatorExploration, genome, noisyObjectives, stochasticValue.replications, stochasticValue.reevaluate, filter.option),
genome,
noisyObjectives,
stochasticValue
......@@ -228,6 +223,7 @@ object NSGA2Evolution {
termination: OMTermination,
mu: Int = 200,
stochastic: OptionalArgument[Stochastic] = None,
filter: OptionalArgument[Condition] = None,
parallelism: Int = 1,
distribution: EvolutionPattern = SteadyState(),
suggestion: Suggestion = Suggestion.empty,
......@@ -238,7 +234,8 @@ object NSGA2Evolution {
mu = mu,
genome = genome,
objectives = objectives,
stochastic = stochastic
stochastic = stochastic,
filter = filter
),
evaluation = evaluation,
termination = termination,
......
......@@ -2,7 +2,7 @@ package org.openmole.plugin.method.evolution
import org.openmole.core.context.{ Context, Val, Variable }
import org.openmole.core.exception.UserBadDataError
import org.openmole.core.expansion.FromContext
import org.openmole.core.expansion.{ FromContext, Condition }
import org.openmole.core.workflow.tools.OptionalArgument
import cats._
import cats.implicits._
......@@ -59,7 +59,7 @@ object NichedNSGA2Algorithm {
def initialGenomes(lambda: Int, continuous: Vector[C], discrete: Vector[D], rng: scala.util.Random) =
CDGenome.initialGenomes(lambda, continuous, discrete, rng)
def adaptiveBreeding[S, P](lambda: Int, operatorExploration: Double, discrete: Vector[D], fitness: P Vector[Double]) =
def adaptiveBreeding[S, P](lambda: Int, filter: Option[Genome Boolean], operatorExploration: Double, discrete: Vector[D], fitness: P Vector[Double]) =
NSGA2Operations.adaptiveBreeding[S, Individual[P], Genome](
i fitness(i.phenotype),
Individual.genome.get,
......@@ -71,6 +71,7 @@ object NichedNSGA2Algorithm {
buildGenome,
logOfPopulationSize,
lambda,
filter,
operatorExploration)
def expression[P](fitness: (Vector[Double], Vector[Int]) P, components: Vector[C]): Genome Individual[P] =
......@@ -135,7 +136,7 @@ object NoisyNichedNSGA2Algorithm {
def gridObjectiveProfile[P: Manifest](aggregation: Vector[P] Vector[Double], x: Int, intervals: Vector[Double]): Niche[Individual[P], Int] =
mgo.evolution.niche.gridContinuousProfile[Individual[P]](aggregatedFitness(aggregation), x, intervals)
def adaptiveBreeding[S, P: Manifest](lambda: Int, operatorExploration: Double, cloneProbability: Double, aggregation: Vector[P] Vector[Double], discrete: Vector[D]) =
def adaptiveBreeding[S, P: Manifest](lambda: Int, filter: Option[Genome Boolean], operatorExploration: Double, cloneProbability: Double, aggregation: Vector[P] Vector[Double], discrete: Vector[D]) =
NoisyNSGA2Operations.adaptiveBreeding[S, Individual[P], Genome, P](
aggregatedFitness(aggregation),
Individual.genome.get,
......@@ -147,6 +148,7 @@ object NoisyNichedNSGA2Algorithm {
buildGenome,
logOfPopulationSize,
lambda,
filter,
operatorExploration,
cloneProbability)
......@@ -258,10 +260,12 @@ object NichedNSGA2 {
mgo.evolution.algorithm.Profile.initialGenomes(n, continuous, discrete, rng)
}
def breeding(population: Vector[I], n: Int, s: S, rng: scala.util.Random) =
Genome.discrete(om.genome).map { discrete
mgo.evolution.algorithm.Profile.adaptiveBreeding[Array[Any]](n, om.operatorExploration, discrete, ExactObjective.toFitnessFunction(om.objectives)) apply (s, population, rng)
}
def breeding(population: Vector[I], n: Int, s: S, rng: scala.util.Random) = FromContext { p
import p._
val discrete = Genome.discrete(om.genome).from(context)
val filterValue = om.filter.map(f GAIntegration.filterValue[G](f, om.genome, _.continuousValues.toVector, _.discreteValues.toVector).from(context))
mgo.evolution.algorithm.Profile.adaptiveBreeding[Array[Any]](n, om.operatorExploration, discrete, ExactObjective.toFitnessFunction(om.objectives), filterValue) apply (s, population, rng)
}
def elitism(population: Vector[I], candidates: Vector[I], s: S, rng: scala.util.Random) = FromContext { p
import p._
......@@ -285,7 +289,8 @@ object NichedNSGA2 {
niche: FromContext[Niche[CDGenome.DeterministicIndividual.Individual[Array[Any]], Vector[Int]]],
genome: Genome,
objectives: Seq[ExactObjective[_]],
operatorExploration: Double)
operatorExploration: Double,
filter: Option[Condition])
object StochasticParams {
......@@ -358,10 +363,12 @@ object NichedNSGA2 {
NoisyNichedNSGA2Algorithm.initialGenomes(n, continuous, discrete, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: scala.util.Random) =
Genome.discrete(om.genome).map { discrete
NoisyNichedNSGA2Algorithm.adaptiveBreeding[S, Array[Any]](n, om.operatorExploration, om.cloneProbability, NoisyObjective.aggregate(om.objectives), discrete) apply (s, individuals, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: scala.util.Random) = FromContext { p
import p._
val discrete = Genome.discrete(om.genome).from(context)
val filterValue = om.filter.map(f GAIntegration.filterValue[G](f, om.genome, _.continuousValues.toVector, _.discreteValues.toVector).from(context))
NoisyNichedNSGA2Algorithm.adaptiveBreeding[S, Array[Any]](n, filterValue, om.operatorExploration, om.cloneProbability, NoisyObjective.aggregate(om.objectives), discrete) apply (s, individuals, rng)
}
def elitism(population: Vector[I], candidates: Vector[I], s: S, rng: scala.util.Random) =
FromContext { p
......@@ -394,14 +401,16 @@ object NichedNSGA2 {
genome: Genome,
objectives: Seq[NoisyObjective[_]],
historySize: Int,
cloneProbability: Double)
cloneProbability: Double,
filter: Option[Condition])
def apply[P](
niche: Seq[NichedElement],
genome: Genome,
objectives: Objectives,
nicheSize: Int,
stochastic: OptionalArgument[Stochastic] = None
stochastic: OptionalArgument[Stochastic] = None,
filter: OptionalArgument[Condition] = None
): EvolutionWorkflow =
WorkflowIntegration.stochasticity(objectives, stochastic.option) match {
case None
......@@ -412,8 +421,8 @@ object NichedNSGA2 {
objectives = exactObjectives,
niche = DeterministicParams.niche(genome, exactObjectives, niche),
operatorExploration = operatorExploration,
nicheSize = nicheSize
),
nicheSize = nicheSize,
filter = filter.option),
genome,
exactObjectives
)
......@@ -431,7 +440,8 @@ object NichedNSGA2 {
genome = genome,
objectives = noisyObjectives,
historySize = stochasticValue.replications,
cloneProbability = stochasticValue.reevaluate),
cloneProbability = stochasticValue.reevaluate,
filter = filter.option),
genome,
noisyObjectives,
stochasticValue
......@@ -455,6 +465,7 @@ object NichedNSGA2Evolution {
nicheSize: Int,
stochastic: OptionalArgument[Stochastic] = None,
parallelism: Int = 1,
filter: OptionalArgument[Condition] = None,
distribution: EvolutionPattern = SteadyState(),
suggestion: Suggestion = Suggestion.empty,
scope: DefinitionScope = "niched nsga2") =
......@@ -465,7 +476,8 @@ object NichedNSGA2Evolution {
genome = genome,
nicheSize = nicheSize,
objectives = objectives,
stochastic = stochastic
stochastic = stochastic,
filter = filter
),
evaluation = evaluation,
termination = termination,
......
......@@ -25,7 +25,8 @@ object OSE {
limit: Vector[Double],
genome: Genome,
objectives: Seq[ExactObjective[_]],
operatorExploration: Double)
operatorExploration: Double,
filter: Option[Condition])
object DeterministicParams {
......@@ -72,15 +73,18 @@ object OSE {
MGOOSE.initialGenomes(n, continuous, discrete, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: scala.util.Random) =
Genome.discrete(om.genome).map { discrete
MGOOSE.adaptiveBreeding[Array[Any]](
n,
om.operatorExploration,
discrete,
om.origin,
ExactObjective.toFitnessFunction(om.objectives)) apply (s, individuals, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: scala.util.Random) = FromContext { p
import p._
val discrete = Genome.discrete(om.genome).from(context)
val filterValue = om.filter.map(f GAIntegration.filterValue[G](f, om.genome, _.continuousValues.toVector, _.discreteValues.toVector).from(context))
MGOOSE.adaptiveBreeding[Array[Any]](
n,
om.operatorExploration,
discrete,
om.origin,
ExactObjective.toFitnessFunction(om.objectives),
filterValue) apply (s, individuals, rng)
}
def elitism(population: Vector[I], candidates: Vector[I], s: S, rng: scala.util.Random) =
Genome.continuous(om.genome).map { continuous
......@@ -104,7 +108,8 @@ object OSE {
objectives: Seq[NoisyObjective[_]],
historySize: Int,
cloneProbability: Double,
operatorExploration: Double)
operatorExploration: Double,
filter: Option[Condition])
object StochasticParams {
......@@ -152,17 +157,21 @@ object OSE {
MGONoisyOSE.initialGenomes(n, continuous, discrete, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: scala.util.Random) =
Genome.discrete(om.genome).map { discrete
MGONoisyOSE.adaptiveBreeding[Array[Any]](
n,
om.operatorExploration,
om.cloneProbability,
NoisyObjective.aggregate(om.objectives),
discrete,
om.origin,
om.limit) apply (s, individuals, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: scala.util.Random) = FromContext { p
import p._
val discrete = Genome.discrete(om.genome).from(context)
val filterValue = om.filter.map(f GAIntegration.filterValue[G](f, om.genome, _.continuousValues.toVector, _.discreteValues.toVector).from(context))
MGONoisyOSE.adaptiveBreeding[Array[Any]](
n,
om.operatorExploration,
om.cloneProbability,
NoisyObjective.aggregate(om.objectives),
discrete,
om.origin,
om.limit,
filterValue) apply (s, individuals, rng)
}
def elitism(population: Vector[I], candidates: Vector[I], s: S, rng: scala.util.Random) =
Genome.continuous(om.genome).map { continuous
......@@ -265,7 +274,8 @@ object OSE {
objectives: Seq[FitnessPattern],
genome: Genome = Seq(),
mu: Int = 200,
stochastic: OptionalArgument[Stochastic] = None): EvolutionWorkflow =
stochastic: OptionalArgument[Stochastic] = None,
filter: OptionalArgument[Condition] = None): EvolutionWorkflow =
WorkflowIntegration.stochasticity(objectives.map(_.objective), stochastic.option) match {
case None
val exactObjectives = FitnessPattern.toObjectives(objectives).map(o Objective.toExact(o))
......@@ -279,7 +289,8 @@ object OSE {
genome = fg,
objectives = exactObjectives,
limit = FitnessPattern.toLimit(objectives),
operatorExploration = operatorExploration),
operatorExploration = operatorExploration,
filter = filter.option),
fg,
exactObjectives
)
......@@ -299,7 +310,8 @@ object OSE {
limit = FitnessPattern.toLimit(objectives),
operatorExploration = operatorExploration,
historySize = stochasticValue.replications,
cloneProbability = stochasticValue.reevaluate),
cloneProbability = stochasticValue.reevaluate,
filter = filter.option),
fg,
noisyObjectives,
stochasticValue
......@@ -322,6 +334,7 @@ object OSEEvolution {
mu: Int = 200,
genome: Genome = Seq(),
stochastic: OptionalArgument[Stochastic] = None,
filter: OptionalArgument[Condition] = None,
parallelism: Int = 1,
distribution: EvolutionPattern = SteadyState(),
suggestion: Suggestion = Suggestion.empty,
......@@ -333,7 +346,8 @@ object OSEEvolution {
genome = genome,
objectives = objectives,
stochastic = stochastic,
mu = mu
mu = mu,
filter = filter
),
evaluation = evaluation,
termination = termination,
......
......@@ -81,6 +81,7 @@ object PSEAlgorithm {
def adaptiveBreeding[S, P](
lambda: Int,
filter: Option[CDGenome.Genome Boolean],
operatorExploration: Double,
discrete: Vector[D],
pattern: P Vector[Int],
......@@ -95,6 +96,7 @@ object PSEAlgorithm {
Individual.phenotype[P].get _ andThen pattern,
buildGenome,
lambda,
filter,
operatorExploration,
hitmap)
......@@ -134,6 +136,7 @@ object NoisyPSEAlgorithm {
def adaptiveBreeding[S, P: Manifest](
lambda: Int,
filter: Option[Genome Boolean],
operatorExploration: Double,
cloneProbability: Double,
aggregation: Vector[P] Vector[Double],
......@@ -150,6 +153,7 @@ object NoisyPSEAlgorithm {
vectorPhenotype.get _ andThen aggregation andThen pattern,
buildGenome,
lambda,
filter,
operatorExploration,
cloneProbability,
hitmap)
......@@ -215,7 +219,8 @@ object PSE {
pattern: Vector[Double] Vector[Int],
genome: Genome,
objectives: Seq[ExactObjective[_]],
operatorExploration: Double
operatorExploration: Double,
filter: Option[Condition]
)
object DeterministicParams {
......@@ -264,15 +269,18 @@ object PSE {
private def pattern(p: Array[Any]) = om.pattern(ExactObjective.toFitnessFunction(om.objectives)(p))
def breeding(individuals: Vector[I], n: Int, s: S, rng: scala.util.Random) =
Genome.discrete(om.genome).map { discrete
PSEAlgorithm.adaptiveBreeding[S, Array[Any]](
n,
om.operatorExploration,
discrete,
pattern,
EvolutionState.s)(s, individuals, rng)
}
def breeding(individuals: Vector[I], n: Int, s: S, rng: scala.util.Random) = FromContext { p
import p._
val discrete = Genome.discrete(om.genome).from(context)
val filterValue = om.filter.map(f GAIntegration.filterValue[G](f, om.genome, _.continuousValues.toVector, _.discreteValues.toVector).from(context))
PSEAlgorithm.adaptiveBreeding[S, Array[Any]](
n,
filterValue,
om.operatorExploration,
discrete,
pattern,
EvolutionState.s)(s, individuals, rng)
}
def elitism(population: Vector[I], candidates: Vector[I], s: S, rng: scala.util.Random) =