JGAP

examples.gp.paintedDesert
Class GO_S

java.lang.Object
  extended by org.jgap.gp.CommandGene
      extended by examples.gp.paintedDesert.AntCommand
          extended by examples.gp.paintedDesert.GO_S
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, IMutateable

public class GO_S
extends AntCommand
implements IMutateable

Moves the ant to the south or negative y direction

Since:
3.2
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jgap.gp.CommandGene
CommandGene.COMMAND_TYPE
 
Field Summary
 
Fields inherited from class org.jgap.gp.CommandGene
BooleanClass, CharacterClass, DELTA, DoubleClass, FloatClass, IntegerClass, LongClass, nodeIndex, VoidClass
 
Constructor Summary
GO_S(GPConfiguration a_conf)
          Constructor for the Go south function
 
Method Summary
 CommandGene applyMutation(int index, double a_percentage)
          Mutates the gene
 void execute_void(ProgramChromosome a_chrom, int a_n, java.lang.Object[] a_args)
          Goes south if possible
 java.lang.String toString()
          Returns the program listing name
 
Methods inherited from class examples.gp.paintedDesert.AntCommand
getMap
 
Methods inherited from class org.jgap.gp.CommandGene
check, check, cleanup, compareTo, dynamizeArity, ensureUniqueness, ensureUniqueness, ensureUniqueness2, equals, execute_boolean, execute_double, execute_float, execute_int, execute_long, execute_object, execute, getAllele, getApplicationData, getArity, getArityMax, getArityMin, getChildType, getCommandType, getEnergy, getGPConfiguration, getInternalValue, getName, getPersistentRepresentation, getPersistentRepresentationExt, getReturnType, getSubChildType, getSubChildTypes, getSubReturnType, hashCode, init, isAffectGlobalState, isCompareApplicationData, isFloatType, isIntegerType, isValid, isValid, setAllele, setApplicationData, setArity, setArityMax, setArityMin, setCompareApplicationData, setEnergy, setNoValidation, setReturnType, setToRandomValue, setValueFromPersistentRepresentation, setValueFromString, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GO_S

public GO_S(GPConfiguration a_conf)
     throws InvalidConfigurationException
Constructor for the Go south function

Parameters:
a_conf -
Throws:
InvalidConfigurationException
Method Detail

applyMutation

public CommandGene applyMutation(int index,
                                 double a_percentage)
                          throws InvalidConfigurationException
Mutates the gene

Specified by:
applyMutation in interface IMutateable
Parameters:
index - references the part of a multipart object, normally not relevant
a_percentage - the mutation rate (0.0 to 1.0)
Returns:
the mutant
Throws:
InvalidConfigurationException

execute_void

public void execute_void(ProgramChromosome a_chrom,
                         int a_n,
                         java.lang.Object[] a_args)
Goes south if possible

Overrides:
execute_void in class CommandGene
Parameters:
a_chrom - ignored here
a_n - ignored here
a_args - ignored here

toString

public java.lang.String toString()
Returns the program listing name

Specified by:
toString in class CommandGene
Returns:
the string representation of the command. Especially usefull to output a resulting formula in human-readable form.

JGAP