|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.openai.ai.ga.environment.AbstractEnvironment
The AbstractEnvironment
is the encapsulation of the problem that
the population will try to solve. This class provides a skeletal
implementation to minimize the effort needed to implement a simple
Environment
interface.
Field Summary | |
protected int |
environmentGeneration
|
Constructor Summary | |
AbstractEnvironment()
|
Method Summary | |
void |
reactToPopulation(Population pop)
Tells the AbstractEnvironment to react to the given
Population . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int environmentGeneration
Constructor Detail |
public AbstractEnvironment()
Method Detail |
public void reactToPopulation(Population pop)
AbstractEnvironment
to react to the given
Population
. This allows for evolution of the problem model
according to what its population is. This method is called by a
World
during each Iteration and may also be used as an
age counter. For many programs, this function may be stubbed {} in
cases when the problem does not need to evolve.
This skeletal implementation increments a variable, generation
that stores what generation this class is in.
reactToPopulation
in interface Environment
pop
- the Population
that works on it
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |