Package evo.search

Class Evolution

    • Method Detail

      • run

        public void run()
        Execute an evolution Works with the Configuration held by this instance. Clears out the history and the last result.

        Stores the history of the generations in history.

        Specified by:
        run in interface Runnable
      • fitnessMulti

        public double fitnessMulti​(List<DiscreteGene> chromosome)
        Compute the fitness of a DiscreteGene chromosome based on all treasures.

        The fitness of the chromosome is the sum of all singular fitnesses divided by the amount of treasures.

        Parameters:
        chromosome - chromosome to evaluate
        Returns:
        chromosome fitness based on multiple treasures
        See Also:
        AnalysisUtils.traceLength(List, DiscreteGene)
      • evalFitness

        public double evalFitness​(List<DiscreteGene> chromosome)
        Evaluate fitness method.
        Parameters:
        chromosome - chromosome to evaluate
        Returns:
        evaluated fitness
      • clone

        public Evolution clone()
        Clones the evolution shallow.
        Overrides:
        clone in class Object
        Returns:
        shallow evolution clone
      • getConfiguration

        public Configuration getConfiguration()
        Configuration to use during the evolution.
      • setConfiguration

        public void setConfiguration​(Configuration configuration)
        Configuration to use during the evolution.
      • getHistory

        public List<io.jenetics.engine.EvolutionResult<DiscreteGene,​Double>> getHistory()
        History of individuals with the best phenotype in each generation.
      • setHistory

        public void setHistory​(List<io.jenetics.engine.EvolutionResult<DiscreteGene,​Double>> history)
        History of individuals with the best phenotype in each generation.
      • setAborted

        public void setAborted​(boolean aborted)
        Evolution abort flag.