gpsys
Class ChromosomeParameters

java.lang.Object
  |
  +--gpsys.ChromosomeParameters
Direct Known Subclasses:
LawnMowerChromosomeParametersADF0, LawnMowerChromosomeParametersADF1, LawnMowerChromosomeParametersADF2, SymRegChromosomeParametersADF0

public class ChromosomeParameters
extends java.lang.Object
implements java.io.Serializable

ChromosomeParameters define information needed to construct a chromosome. Users should extend this class for each ADF to be defined.

Version:
$Revision: 1.1 $, $Date: 2000/07/05 16:21:25 $
Author:
Adil Qureshi
Department of Computer Science,
University College London,
Gower St,
London WC1E 6BT,
UK.
See Also:
gpsys.Chromsome, GPParameters, Serialized Form

Field Summary
static int CREATE_FULL
          This constant used to initialise the createMethod variable to select the full method of creation.
static int CREATE_GROW
          This constant used to initialise the createMethod variable to select the grow method of creation.
static int CREATE_RAMP_HALF_AND_HALF
          This constant used to initialise the createMethod variable to select the ramp method of creation.
 int createMethod
          The method of Chromosome creation, this can be initialised to any of the following constants.
 Function[] functions
          The table of available functions.
 TypeToFunctionsTable[] functionsOfTypeAtDepthFull
          Functions of a given return type possible at a given depth for both the FULL creation method.
 TypeToFunctionsTable[] functionsOfTypeAtDepthGrow
          Functions of a given return type possible at a given depth for both the GROW creation method.
 int maxDepth
          The maximum depth of the Gene tree.
 int maxDepthAtCreation
          The maximum depth at creation of the Gene tree.
 int maxDepthMutation
          The maximum depth of tree created to mutate the Gene tree.
 Terminal[] terminals
          The table of available terminals.
 TypeToTerminalsTable terminalsOfType
          A hash table mapping a given Type to an array of terminals of that Type.
 Type type
          The type to be returned by the Chromosome.
 Type[] types
          The table of available types.
 
Constructor Summary
ChromosomeParameters()
           
 
Method Summary
private  void initialiseFunctionsTypeTable(int maxDepthAtCreation)
           
private  void initialiseFunctionsTypeTableFull(int maxDepthAtCreation)
           
private  void initialiseFunctionsTypeTableGrow(int maxDepthAtCreation)
           
private  void initialiseTerminalsTypeTable()
           
 void initialiseTypeTables(int maxDepthAtCreation)
          Initialises the type possibilities tables, read the "Strongly Typed Genetic Programing" paper by David J.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

type

public Type type
The type to be returned by the Chromosome.
See Also:
Type

maxDepth

public int maxDepth
The maximum depth of the Gene tree.

maxDepthAtCreation

public int maxDepthAtCreation
The maximum depth at creation of the Gene tree.

maxDepthMutation

public int maxDepthMutation
The maximum depth of tree created to mutate the Gene tree.

functions

public Function[] functions
The table of available functions.

terminals

public Terminal[] terminals
The table of available terminals.

types

public Type[] types
The table of available types.

functionsOfTypeAtDepthGrow

public TypeToFunctionsTable[] functionsOfTypeAtDepthGrow
Functions of a given return type possible at a given depth for both the GROW creation method. The index = the required depth, the array contains a hash table mapping Types to Function arrays - note that not all functions of given return type possible at a given depth.

functionsOfTypeAtDepthFull

public TypeToFunctionsTable[] functionsOfTypeAtDepthFull
Functions of a given return type possible at a given depth for both the FULL creation method. The index = the required depth, the array contains a hash table mapping Types to Function arrays - note that not all functions of given return type possible at a given depth.

terminalsOfType

public TypeToTerminalsTable terminalsOfType
A hash table mapping a given Type to an array of terminals of that Type.

createMethod

public int createMethod
The method of Chromosome creation, this can be initialised to any of the following constants.

CREATE_FULL

public static final int CREATE_FULL
This constant used to initialise the createMethod variable to select the full method of creation. The full method creates Gene trees of the maximum available depth.

CREATE_GROW

public static final int CREATE_GROW
This constant used to initialise the createMethod variable to select the grow method of creation. The grow method creates Gene trees of variable depths.

CREATE_RAMP_HALF_AND_HALF

public static final int CREATE_RAMP_HALF_AND_HALF
This constant used to initialise the createMethod variable to select the ramp method of creation. The ramp half and half method creates Gene trees in the population of which half are created using the full method and the other half are created using the grow method. The depth of these trees is varied between 2 and maxDepthAtCreation.
Constructor Detail

ChromosomeParameters

public ChromosomeParameters()
Method Detail

initialiseTypeTables

public void initialiseTypeTables(int maxDepthAtCreation)
Initialises the type possibilities tables, read the "Strongly Typed Genetic Programing" paper by David J. Montana.
Parameters:
maxDepthAtCreation - the maximum depth at creation of the Gene trees.

initialiseTerminalsTypeTable

private void initialiseTerminalsTypeTable()

initialiseFunctionsTypeTable

private void initialiseFunctionsTypeTable(int maxDepthAtCreation)

initialiseFunctionsTypeTableFull

private void initialiseFunctionsTypeTableFull(int maxDepthAtCreation)

initialiseFunctionsTypeTableGrow

private void initialiseFunctionsTypeTableGrow(int maxDepthAtCreation)