#include <gaenvrnmt.h>
Inheritance diagram for EAEnvironment:
Public Methods | |
void | setevals (int n) |
int | evals () const |
int | total_evals () const |
void | addnoise (double stddev) |
double | evaluate (const Individual &indiv) |
void | logDir (const String &dir) |
void | cycleReport (OStream &log, OStream &out) |
virtual void | addFeaturesTo (Genome &genome) const |
virtual void | init_cycle () |
virtual void | check () const |
Protected Methods | |
virtual double | evaluateg (const Individual &ind) |
virtual void | cycle_report (OStream &log, OStream &out) |
Protected Attributes | |
int | mNEvals |
int | mTotEvals |
int | mCycles |
double | mNoise |
Individual * | mpBest |
double | mBestFitness |
String | mLogDir |
The inheritors of this class are typically used as follows (assume that the parameter map has been defined and parameters to it inserted):
MyEnvironment myEnvir (paramMap, someOtherParameters);
SimplePopulation pop (envir, paramMap);
pop.evolve (100);
Note: the class is actually not abstract because the RTTI system doesn't allow that.
Definition at line 58 of file gaenvrnmt.h.
|
Adds problem-specific features to a genome.
Reimplemented in BinaryTestEAEnv, FloatTestEAEnv, and MultiMinEAEnv. Definition at line 106 of file gaenvrnmt.h. Referenced by SimplePopulation::SimplePopulation(). |
|
Orders to add gaussian noise to the evaluated fitness. This is useful for testing the robustness of the EA for noisy evaluation. Definition at line 88 of file gaenvrnmt.h. References mNoise. |
|
Implementation for Object.
Definition at line 96 of file gaenvrnmt.cc. References mCycles, mNEvals, mNoise, and mTotEvals. Referenced by SimplePopulation::check(). |
|
Prints some statistics or something at the end of the evaluation cycle.
Reimplemented in BinaryTestEAEnv, FloatTestEAEnv, and MultiMinEAEnv. Definition at line 130 of file gaenvrnmt.h. Referenced by cycleReport(). |
|
Prints out a generation report to the given brief log stream and more verbose output stream.
Definition at line 100 of file gaenvrnmt.h. References cycle_report(), and mCycles. Referenced by EAStrategy::evolve(). |
|
Returns the number of evaluations to be done for each individual to determine it's fitness.
Definition at line 76 of file gaenvrnmt.h. References mNEvals. Referenced by Individual::evaluate(). |
|
Evaluates fitness of an individual. If artificial noise is defined for the environment, applies it to the fitness. Keeps record of the best measured fitness and stores the individual having the fitness until a better one is found.
Definition at line 69 of file gaenvrnmt.cc. References evaluateg(), mBestFitness, mNoise, mpBest, and mTotEvals. Referenced by Individual::evaluate(). |
|
Evaluates the fitness of the given individual in the environment. MUST OVERLOAD!
Reimplemented in BinaryTestEAEnv, FloatTestEAEnv, and MultiMinEAEnv. Definition at line 126 of file gaenvrnmt.h. Referenced by evaluate(). |
|
Initializes a generation. Not necessary in all models. Reimplemented in BinaryTestEAEnv, FloatTestEAEnv, and MultiMinEAEnv. Definition at line 110 of file gaenvrnmt.h. References mBestFitness, and mpBest. Referenced by EAStrategy::evolve(). |
|
Sets evolution log directory for cycle reports and miscellaneous log files.
Definition at line 95 of file gaenvrnmt.h. References mLogDir. |
|
Sets the number of evaluations to be done for each individual to determine it's fitness. This is useful only if the fitness measurement is noisy. This variable should be set before starting the evolution, of course. Definition at line 71 of file gaenvrnmt.h. References mNEvals. |
|
Returns the total number of evaluations performed in all generations so far. This includes all multiple evaluations of all individuals. Definition at line 82 of file gaenvrnmt.h. References mTotEvals. |
|
(Subjective) fitness of the best individual. "Subjective" means here that the artificial noise is included in this value. Definition at line 158 of file gaenvrnmt.h. Referenced by evaluate(), and init_cycle(). |
|
Basicly a generation counter. It would be nicer if this was not stored here (redundacy, see). Definition at line 143 of file gaenvrnmt.h. Referenced by check(), and cycleReport(). |
|
Directory for gathering evolution logs.
Definition at line 162 of file gaenvrnmt.h. Referenced by logDir(). |
|
Number of evaluations to be done for each individual, default=1.
Definition at line 134 of file gaenvrnmt.h. Referenced by check(), evals(), and setevals(). |
|
Amount of artificial noise to be added to evaluated fitness. This is useful for testing the effects of noise on evolution. Requires deterministic test functions to be useful. Definition at line 149 of file gaenvrnmt.h. Referenced by addnoise(), check(), and evaluate(). |
|
The best individual in this cycle.
Definition at line 153 of file gaenvrnmt.h. Referenced by evaluate(), and init_cycle(). |
|
Total number of evaluations done so far.
Definition at line 138 of file gaenvrnmt.h. Referenced by check(), evaluate(), and total_evals(). |