All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gpsys.symreg.SymReg

java.lang.Object
   |
   +----gpsys.symreg.SymReg

public class SymReg
extends Object
implements GPObserver
The user interface for the symbolic regression problem. This class also contains the main() function to execute the application.

Version:
1.1, 30th June '97
Author:
Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.

Constructor Index

 o SymReg(String)
Construct the symbolic regression user interface using the specified file prefix.

Method Index

 o diagnosticUpdate(String)
Print the diagnostic message to the standard output.
 o exception(GPException)
Print the exception and generate a stack trace on the standard output.
 o generationUpdate(GPParameters, int)
If the filePrefix is null, just write a report of the current generation to the standard output.
 o individualUpdate(GPParameters, Individual, int)
We are not interested in this update, so we just ignore it.
 o individualUpdate(GPParameters, int, int)
We are not interested in this update, so we just ignore it.
 o main(String[])
The main() method of the symbolic regression application.

Constructors

 o SymReg
 public SymReg(String filePrefix)
Construct the symbolic regression user interface using the specified file prefix.

Parameters:
filePrefix - The file prefix to bse used for saving reports and generation states.

Methods

 o generationUpdate
 public void generationUpdate(GPParameters gpParameters,
                              int how)
If the filePrefix is null, just write a report of the current generation to the standard output. Otherwise, also append the report to the file "filePrefix.txt" and save the current generation to the file "filePrefix.p1.gzip".

Parameters:
gpParameters - The GP parameters used for this run.
how - How the generation was created. Can be either CREATION, FROMSTREAM or EVOLVED.
 o individualUpdate
 public void individualUpdate(GPParameters gpParameters,
                              Individual i,
                              int creationIndex)
We are not interested in this update, so we just ignore it.

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.
 o individualUpdate
 public void individualUpdate(GPParameters gpParameters,
                              int individualIndex,
                              int creationIndex)
We are not interested in this update, so we just ignore it.

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.
 o diagnosticUpdate
 public void diagnosticUpdate(String s)
Print the diagnostic message to the standard output.

Parameters:
s - The diagnostic message.
 o exception
 public void exception(GPException e)
Print the exception and generate a stack trace on the standard output.

Parameters:
e - The exception that was genearted.
 o main
 public static void main(String argv[])
The main() method of the symbolic regression application. This application may be invoked in any of the following ways.
		java SymReg <filePrefix>
		java SymReg <filePrefix> <generations>
		java SymReg <filePrefix> <RNG seed> <population> <generations>
		java SymReg <RNG seed> <population> <generations>
 
The first istructs the application to restart from the last saved session using the files with the prefix specified. The second is the same as the first, execept that the maximum number of geneartion is modified as specified. The third istructs the application to start a new run using the specifed file prefix for saves, and the specified parameters for the run. The last is the similar to the previous invokation except that nothing is saved to disk and is hence very fast.


All Packages  Class Hierarchy  This Package  Previous  Next  Index