|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.primordion.xholon.base.Xholon org.primordion.xholon.base.XholonWithPorts org.primordion.xholon.base.AbstractGrid org.primordion.ealontro.app.XhAntForaging
Ant Foraging System WITHOUT Genetic Programming.
source: Koza, J. (1992). Genetic Programming. p.329-344
Field Summary | |
double |
dropSize
|
int |
food
|
boolean |
hasNest
|
double |
pheromoneLevel
|
java.lang.String |
roleName
|
Fields inherited from class org.primordion.xholon.base.AbstractGrid |
P_BEHAVIOR, P_NEXT, P_PREVIOUS |
Fields inherited from class org.primordion.xholon.base.XholonWithPorts |
port |
Fields inherited from class org.primordion.xholon.base.Xholon |
DEFAULT_LEVEL, interaction, interactionsEnabled |
Fields inherited from interface org.primordion.ealontro.app.CeAntForaging |
AntCE, AntForagingGPCE, AntForagingSystemCE, BehaviorCE, FoodCE, GeneticProgramCE, GridCE, GridCellCE, GridReferenceCE, NestCE, NonTerminalCE, PfDropPheromoneCE, PfIfCarryingFoodCE, PfIfFoodHereCE, PfMoveRandomCE, PfMoveToAdjacentFoodElseCE, PfMoveToAdjacentPheromoneElseCE, PfMoveToNestCE, PfPickUpCE, PfWrapperCE, PopulationCE, PrimitiveCE, RowCE, StructureCE, TerminalCE, XholonClassCE |
Fields inherited from interface org.primordion.xholon.base.IGrid |
BOUNDARY_GRID, BOUNDARY_TORUS, NEIGHBORHOOD_1DCA, NEIGHBORHOOD_HEXAGONAL, NEIGHBORHOOD_MOORE, NEIGHBORHOOD_SIBLING, NEIGHBORHOOD_VON_NEUMANN, P_CAFUTURESELF, P_CALEFTNEIGHBOR, P_CARIGHTNEIGHBOR, P_EAST, P_HEX0, P_HEX1, P_HEX2, P_HEX3, P_HEX4, P_HEX5, P_NORTH, P_NORTHEAST, P_NORTHWEST, P_SOUTH, P_SOUTHEAST, P_SOUTHWEST, P_STAYHERE, P_WEST, REGULAR_COMPLETE, REGULAR_COMPLETE_SELF, REGULAR_CYCLE, REGULAR_WHEEL |
Fields inherited from interface org.primordion.xholon.base.IXholon |
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx |
Constructor Summary | |
XhAntForaging()
Constructor. |
Method Summary | |
void |
act()
Do some action during this time step. |
void |
adjustRawFitness()
Adjust the fitness. |
int |
getFoodQuantity()
Get food quantity. |
static double |
getPheromoneDiffusionRate()
Get the current pheromone diffusion rate. |
static double |
getPheromoneEvaporationRate()
Get the current pheromone evaporation rate. |
int |
getRawFitness()
Get current fitness score for this GeneticProgram. |
java.lang.String |
getRoleName()
Get name of the role played by this Xholon within a specific context. |
static boolean |
getUsePheromone()
Get whether or not pheromone is being used in the simulationa. |
static boolean |
getUsePheromoneDiffusion()
Get whether or not pheromone diffusion is being used in the simulation. |
double |
getVal()
Get the value of a "double" maintained by this xholon instance. |
boolean |
hasFood()
Determine whether GridCell or Ant have any food. |
void |
incRawFitness(int amount)
Increase the raw fitness of this GeneticProgram. |
void |
initialize()
Initialize the tree node. |
boolean |
performBooleanActivity(IXholon activity)
Perform an activity including the entire activity subtree. |
void |
postAct()
Do any required work after doing the main action during a time step. |
void |
preAct()
Do any setup required before doing the main action during a time step. |
void |
setFoodQuantity(int fq)
Set food quantity. |
static void |
setPheromoneDiffusionRate(double pdr)
Set pheromone diffusion rate. |
static void |
setPheromoneEvaporationRate(double per)
Set pheromone evaporation rate. |
void |
setRawFitness(int rawFitness)
Set current fitness score for this GeneticProgram (typically used to reset to zero). |
void |
setRoleName(java.lang.String roleName)
Set name of the role played by this Xholon within a specific context. |
static void |
setUsePheromone(boolean usePher)
Set whether or not to use pheromone in the simulation. |
static void |
setUsePheromoneDiffusion(boolean upd)
Set whether or not to use pheromone diffusion in the simulation. |
java.lang.String |
toString()
|
Methods inherited from class org.primordion.xholon.base.AbstractGrid |
configure, getNeighType, getNumNeighbors, moveXholonsToGrid, postConfigure, postReconfigure, preReconfigure, reconfigure, setCaFuture, setCaLeft, setCaRight, setEast, setHex0, setHex1, setHex2, setHex3, setHex4, setHex5, setNorth, setNorthEast, setNorthWest, setSiblingsComplete, setSiblingsCompleteSelf, setSiblingsCycle, setSiblingsWheel, setSouth, setSouthEast, setSouthWest, setWest |
Methods inherited from class org.primordion.xholon.base.XholonWithPorts |
configure, getMaxPorts, getPort, isActiveObject, isBound, isContainer, isPassiveObject, setMaxPorts, setPorts, terminate |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public boolean hasNest
public double pheromoneLevel
public double dropSize
public int food
public java.lang.String roleName
Constructor Detail |
public XhAntForaging()
Method Detail |
public void initialize()
IXholon
initialize
in interface IXholon
initialize
in class AbstractGrid
public double getVal()
IXholon
getVal
in interface IXholon
getVal
in class Xholon
public void setRoleName(java.lang.String roleName)
IXholon
setRoleName
in interface IXholon
setRoleName
in class Xholon
public java.lang.String getRoleName()
IXholon
getRoleName
in interface IXholon
getRoleName
in class Xholon
public void setFoodQuantity(int fq)
fq
- The food quantity.public int getFoodQuantity()
public void setRawFitness(int rawFitness)
rawFitness
- The new raw fitness value.public int getRawFitness()
public void adjustRawFitness()
public void incRawFitness(int amount)
amount
- Amount by which to increase the fitness.public boolean hasFood()
public void preAct()
IXholon
preAct
in interface IXholon
preAct
in class Xholon
public void act()
IXholon
act
in interface IXholon
act
in class Xholon
public void postAct()
IXholon
postAct
in interface IXholon
postAct
in class Xholon
public boolean performBooleanActivity(IXholon activity)
IXholon
performBooleanActivity
in interface IXholon
performBooleanActivity
in class Xholon
public static void setUsePheromone(boolean usePher)
usePher
- true or falsepublic static boolean getUsePheromone()
public static void setPheromoneEvaporationRate(double per)
per
- The new pheromone evaporation rate.public static double getPheromoneEvaporationRate()
public static void setPheromoneDiffusionRate(double pdr)
pdr
- The new pheromone diffusion rate.public static double getPheromoneDiffusionRate()
public static void setUsePheromoneDiffusion(boolean upd)
upd
- true or falsepublic static boolean getUsePheromoneDiffusion()
public java.lang.String toString()
toString
in class Xholon
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |