net.openai.ai.ga.environment
Class AbstractEnvironment

java.lang.Object
  |
  +--net.openai.ai.ga.environment.AbstractEnvironment
All Implemented Interfaces:
Environment

public abstract class AbstractEnvironment
extends java.lang.Object
implements Environment

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.

Since:
JDK1.3
Version:
%I%, %G%
Author:
Jared Grubb

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

environmentGeneration

protected int environmentGeneration
Constructor Detail

AbstractEnvironment

public AbstractEnvironment()
Method Detail

reactToPopulation

public void reactToPopulation(Population pop)
Tells the 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.

Specified by:
reactToPopulation in interface Environment
Parameters:
pop - the Population that works on it


Copyright - 2001 OpenAI Labs. All Rights Reserved.