All Packages Class Hierarchy This Package Previous Next Index
Interface gpsys.GPObserver
- public interface GPObserver
Classes that implement this interface can become observers of the GP system.
By defining the functions of this interface they can monitor important
events such as the creation of new Individuals and the completion of a
generation.
- Version:
- 1.1, 30th June '97
- Author:
- Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.
-
CREATION
- Used to indicate that the generation update is for the 0th generation.
-
EVOLVED
- Used to indicate that the generation update represents a generation
that has been evolved.
-
FROMSTREAM
- Used to indicate that the generation update represents a generation
loaded from a stream.
-
VIA_CROSSOVER
- Used to indicate that an Individual was created via crossover.
-
VIA_MUTATION
- Used to indicate that an Individual was created via mutation.
-
diagnosticUpdate(String)
- Invoked by the GP system whenever something interesting occurs, the
supplied String indictates what happened.
-
exception(GPException)
- Invoked by the GP system whenever an exception occurs, override this
to do something useful such as print a stack trace.
-
generationUpdate(GPParameters, int)
- Invoked by the GP system whenever a new generation has been created.
-
individualUpdate(GPParameters, Individual, int)
- Invoked by the GP system whenever a new Individual has been created
during the generation of the initial population.
-
individualUpdate(GPParameters, int, int)
- Invoked by the GP system whenever a new Individual has been created
during evolution.
VIA_MUTATION
public static final int VIA_MUTATION
- Used to indicate that an Individual was created via mutation.
VIA_CROSSOVER
public static final int VIA_CROSSOVER
- Used to indicate that an Individual was created via crossover.
CREATION
public static final int CREATION
- Used to indicate that the generation update is for the 0th generation.
FROMSTREAM
public static final int FROMSTREAM
- Used to indicate that the generation update represents a generation
loaded from a stream.
EVOLVED
public static final int EVOLVED
- Used to indicate that the generation update represents a generation
that has been evolved.
generationUpdate
public abstract void generationUpdate(GPParameters gpParameters,
int how)
- Invoked by the GP system whenever a new generation has been created.
- Parameters:
- gpParameters - the GP parameters used for this run.
- how - how the generation was created. Can be either
CREATION, FROMSTREAM or EVOLVED.
individualUpdate
public abstract void individualUpdate(GPParameters gpParameters,
Individual i,
int creationIndex)
- Invoked by the GP system whenever a new Individual has been created
during the generation of the initial population.
- Parameters:
- gpParameters - the GP parameters used for this run.
- i - the Individual that has just been created.
- creationIndex - the index of the Individual in the population.
individualUpdate
public abstract void individualUpdate(GPParameters gpParameters,
int individualIndex,
int creationMethod)
- Invoked by the GP system whenever a new Individual has been created
during evolution.
- Parameters:
- gpParameters - the GP parameters used for this run.
- individualIndex - the index of the created Individual in the
population.
- creationMethod - how the Individual was created. Can be either
VIA_MUTATION or VIA_CROSSOVER.
diagnosticUpdate
public abstract void diagnosticUpdate(String s)
- Invoked by the GP system whenever something interesting occurs, the
supplied String indictates what happened.
- Parameters:
- s - a String describing the event.
exception
public abstract void exception(GPException e)
- Invoked by the GP system whenever an exception occurs, override this
to do something useful such as print a stack trace.
- Parameters:
- e - The Exception that was raised.
All Packages Class Hierarchy This Package Previous Next Index