|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FitnessEngine
Registry for fitness functions for Taxon (Evolutionary Computation) Systems.
Method Summary | |
---|---|
double |
calculateFitness(Phenotype phenotype,
Environment environment)
|
void |
onEnvironmentChange(java.util.Collection<java.lang.String> characterKeys,
Environment environment)
The base implementation of this method (which should normally be appropriate for all usage) simply goes through all possible pairings of trait/ecofactor (from the given traits and the ecofactors belonging to the environment) and gets the appropriate setup. |
Fitness |
putFitness(java.lang.String key,
Fitness fitness)
Register a fitness pair with this fitness engine. |
void |
setFitnessAdjustment(java.util.Collection<java.lang.String> characterKeys,
java.lang.Number adjustment)
The base implementation of this method (which should normally be appropriate for all usage) simply goes through all possible pairings of trait/ecofactor (from the given traits and the ecofactors belonging to the environment) and gets the appropriate setup. |
void |
setFitnessCache(FitnessCache fitnessCache)
TODO consider renaming this to addListener(FitnessEngineListener ...) Register the cache for this fitness engine. |
Fitness |
unregisterFitness(java.lang.String key)
Remove the fitness identified by key |
Methods inherited from interface com.rubecula.darwin.foundation.HasExpressions |
---|
getExpressions |
Methods inherited from interface com.rubecula.darwin.domain.helper.CacheSignature |
---|
getSignature |
Method Detail |
---|
double calculateFitness(Phenotype phenotype, Environment environment) throws FitnessException
phenotype
- environment
-
FitnessException
void onEnvironmentChange(java.util.Collection<java.lang.String> characterKeys, Environment environment)
characterKeys
- XXXenvironment
- calculateFitness(com.rubecula.darwin.domain.helper.Phenotype,
com.rubecula.darwin.domain.helper.Environment)
Fitness putFitness(java.lang.String key, Fitness fitness)
key
- a key by which the fitness may be retrievedfitness
- the fitness evaluator
void setFitnessAdjustment(java.util.Collection<java.lang.String> characterKeys, java.lang.Number adjustment)
characterKeys
- XXXadjustment
- the object to be passed in to the setup method.calculateFitness(com.rubecula.darwin.domain.helper.Phenotype,
com.rubecula.darwin.domain.helper.Environment)
void setFitnessCache(FitnessCache fitnessCache)
fitnessCache
- Fitness unregisterFitness(java.lang.String key)
key
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |