examples.gp.anttrail
Class IfFoodAheadElse
java.lang.Object
org.jgap.gp.CommandGene
examples.gp.anttrail.AntCommand
examples.gp.anttrail.IfFoodAheadElse
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable
public class IfFoodAheadElse
- extends AntCommand
If food-ahead then execute else execute .
- Since:
- 3.01
- See Also:
- Serialized Form
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 |
IfFoodAheadElse
public IfFoodAheadElse(GPConfiguration a_conf)
throws InvalidConfigurationException
- Standard constructor for the classic ant problem. Looks ahead 1 field.
- Parameters:
a_conf
- the configuration to use
- Throws:
InvalidConfigurationException
- Since:
- 3.01
IfFoodAheadElse
public IfFoodAheadElse(GPConfiguration a_conf,
int a_lookAheadFields)
throws InvalidConfigurationException
- Allows to specify how many fields to look ahead.
- Parameters:
a_conf
- the configuration to usea_lookAheadFields
- look ahead n fields
- Throws:
InvalidConfigurationException
- Since:
- 3.01
execute_void
public void execute_void(ProgramChromosome a_chrom,
int a_n,
java.lang.Object[] a_args)
- Description copied from class:
CommandGene
- Executes this node, returning nothing. Override to implement.
- Overrides:
execute_void
in class CommandGene
- Parameters:
a_chrom
- ignored herea_n
- ignored herea_args
- ignored here
toString
public java.lang.String toString()
- Specified by:
toString
in class CommandGene
- Returns:
- the string representation of the command. Especially usefull to
output a resulting formula in human-readable form.