artoflife pre0.1.0-dev

org.artoflife.gp.individual
Class MutableFitnessIndividual

java.lang.Object
  |
  +--org.artoflife.gp.Individual
        |
        +--org.artoflife.gp.individual.MutableFitnessIndividual
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public abstract class MutableFitnessIndividual
extends Individual

An Individual that holds a mutable Fitness property. Not for Individuals that determine fitness by evaluation of a fitness function over their phenotype, but useful for image-creation with an external fitness evaluation.

Author:
Steve Meyfroidt
See Also:
Serialized Form

Field Summary
protected  Fitness fitness
          This Individual's Fitness: default is 5.0f.
 
Constructor Summary
MutableFitnessIndividual(Phenotype phenotype, Chromosome chromosome)
           
MutableFitnessIndividual(Phenotype phenotype, java.util.Collection chromosomes)
           
 
Method Summary
 java.lang.Object clone()
          Override to deep clone fitness field.
 Fitness getFitness()
          The Fitness object returned can be changed if required.
 
Methods inherited from class org.artoflife.gp.Individual
addChromsome, breedWith, expressGenome, genotypeAsString, getChromosome, getChromosomes, getGenomeSize, getPhenotype, mutate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fitness

protected Fitness fitness
This Individual's Fitness: default is 5.0f.

Constructor Detail

MutableFitnessIndividual

public MutableFitnessIndividual(Phenotype phenotype,
                                java.util.Collection chromosomes)
Parameters:
phenotype -
chromosomes -

MutableFitnessIndividual

public MutableFitnessIndividual(Phenotype phenotype,
                                Chromosome chromosome)
Parameters:
phenotype -
chromosome -
Method Detail

getFitness

public Fitness getFitness()
The Fitness object returned can be changed if required.

Specified by:
getFitness in class Individual
Returns:
this Individual's Fitness, never null

clone

public java.lang.Object clone()
Override to deep clone fitness field.

Overrides:
clone in class Individual
Returns:
an Individual that is an independent deep clone.

artoflife pre0.1.0-dev

Copyright © 2002 the Art Of Life team. All Rights Reserved.