org.primordion.ealontro.app
Class AppAntForaging

java.lang.Object
  extended byorg.primordion.xholon.base.Xholon
      extended byorg.primordion.xholon.app.Application
          extended byorg.primordion.ealontro.app.AppAntForaging
All Implemented Interfaces:
CeAntForaging, IApplication, IXholon

public class AppAntForaging
extends Application
implements CeAntForaging

Ant System with Genetic Programming.

The Ant System is a Xholon implementation of the example presented by John Koza in his book Genetic Programming. It demonstrates how genetic programming can be used to evolve tree-based behaviors, is an example of a grid implemented in Xholon, and also demonstrates mobility as ants move about on the grid.

source: Koza, J. (1992). Genetic Programming. p.329-344

Since:
0.1 (Created on Jun 8, 2005)
Author:
Ken Webb

Nested Class Summary
 
Nested classes inherited from class org.primordion.xholon.app.Application
Application.GridViewerDetails
 
Field Summary
 
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.IXholon
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx
 
Constructor Summary
AppAntForaging()
           
 
Method Summary
 double getPheromoneDiffusionRate()
           
 double getPheromoneEvaporationRate()
           
 boolean getUsePheromone()
           
 boolean getUsePheromoneDiffusion()
           
 void initialize(java.lang.String configFileName)
          Initialize the application.
static void main(java.lang.String[] args)
          main
 boolean setParam(java.lang.String pName, java.lang.String pValue)
          Set the value of a parameter.
 void setPheromoneDiffusionRate(double pheromoneDiffusionRate)
           
 void setPheromoneEvaporationRate(double pheromoneEvaporationRate)
           
 void setUsePheromone(boolean usePheromone)
           
 void setUsePheromoneDiffusion(boolean usePheromoneDiffusion)
           
 void wrapup()
          Wrapup any unfinished business in the application.
 
Methods inherited from class org.primordion.xholon.app.Application
about, appMain, getApplication, getAppM, getAppRoot, getClass, getClassDetailsFile, getCompositeStructureHierarchyFile, getControllerState, getDataPlotterParams, getErrorM, getGraphicalNetworkViewerClassName, getGraphicalNetworkViewerParams, getGraphicalTreeViewerParams, getGridPanelClassName, getHistogramPlotterParams, getInfoM, getInformationFile, getInheritanceHierarchyFile, getInteractionParams, getJavaActivityClassName, getJavaClassName, getJavaXhClassClassName, getJavaXhClassName, getMaxActivities, getMaxPorts, getMaxProcessLoops, getMaxStateMachineEntities, getMaxXholonClasses, getMaxXholons, getModelName, getRandomNumberSeed, getRoot, getSaveSnapshots, getSizeMessageQueue, getSnapshotParams, getTimeStepInterval, getTreeNodeFactoryDynamic, getUseDataPlotter, getUseGnuplot_Hist, getUseGnuplot, getUseGraphicalNetworkViewer, getUseGraphicalTreeViewer, getUseGridViewer, getUseHistogramPlotter, getUseInteractions, getUseJFreeChart_Hist, getUseJFreeChart, getUseTextTree, getUseVrml, getVrmlParams, getVrmlWriterClassName, getXhymAgent, getXincludePath, information, initControl, initGui, initViewers, invokeDataPlotter, invokeGraphicalNetworkViewer, invokeGraphicalNetworkViewer, invokeGraphicalTreeViewer, invokeGraphicalTreeViewer, invokeHistogramPlotter, invokeInteraction, process, readConfigFromFileXml, resetViewers, saveSnapshot, setApplication, setAppM, setClassDetailsFile, setCompositeStructureHierarchyFile, setControllerState, setDataPlotterParams, setErrorM, setGraphicalNetworkViewerClassName, setGraphicalNetworkViewerParams, setGraphicalTreeViewerParams, setGridPanelClassName, setGridViewerParams, setHistogramPlotterParams, setInfoM, setInformationFile, setInheritanceHierarchyFile, setInteractionParams, setJavaActivityClassName, setJavaClassName, setJavaXhClassClassName, setJavaXhClassName, setMaxActivities, setMaxPorts, setMaxProcessLoops, setMaxStateMachineEntities, setMaxXholonClasses, setMaxXholons, setModelName, setRandomNumberSeed, setSaveSnapshots, setSizeMessageQueue, setSnapshotParams, setTimeStepInterval, setTreeNodeFactoryDynamic, setUseDataPlotter, setUseGraphicalNetworkViewer, setUseGraphicalTreeViewer, setUseGridViewer, setUseHistogramPlotter, setUseInteractions, setUseTextTree, setUseVrml, setVrmlParams, setVrmlWriterClassName, setXhymAgent, setXincludePath
 
Methods inherited from class org.primordion.xholon.base.Xholon
act, appendChild, appendChild, appendChild, cleanup, configure, configure, createStructure, decVal, decVal, depth, draw, getChildNodes, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getNeighbors, getNextId, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumSiblings, getParentNode, getPort, getPreviousSibling, getRoleName, getRootNode, getSiblings, getSizeMessageQ, getUid, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getVal, getXhc, getXhcId, getXhcName, getXhType, handleNodeSelection, hasAncestor, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, height, incVal, incVal, initialize, initStatics, inOrderPrint, insertAfter, insertBefore, insertFirstChild, isActiveObject, isBound, isContainer, isExternal, isInternal, isLeaf, isPassiveObject, isRootNode, performActivity, performActivity, performBooleanActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postConfigure, postOrderPrint, postReconfigure, preAct, preConfigure, preOrderPrint, preReconfigure, print, println, processMessageQ, processReceivedMessage, reconfigure, remove, removeChild, resetNextId, sendMessage, sendMessage, sendMessage, setAttributeVal, setFactory, setFirstChild, setId, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setPorts, setRoleName, setSizeMessageQ, setUid, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVariableValue, setXhc, swapNode, terminate, toString, treeSize, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.primordion.xholon.base.IXholon
act, appendChild, appendChild, appendChild, cleanup, configure, configure, createStructure, decVal, decVal, depth, draw, getChildNodes, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getNeighbors, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumSiblings, getParentNode, getPort, getPreviousSibling, getRoleName, getRootNode, getSiblings, getUid, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getVal, getXhc, getXhcId, getXhcName, getXhType, handleNodeSelection, hasAncestor, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, height, incVal, incVal, initialize, initStatics, inOrderPrint, insertAfter, insertBefore, insertFirstChild, isActiveObject, isBound, isContainer, isExternal, isInternal, isLeaf, isPassiveObject, isRootNode, performActivity, performActivity, performBooleanActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postConfigure, postOrderPrint, postReconfigure, preAct, preConfigure, preOrderPrint, preReconfigure, print, println, processMessageQ, processReceivedMessage, reconfigure, remove, removeChild, sendMessage, sendMessage, sendMessage, setAttributeVal, setFirstChild, setId, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setPorts, setRoleName, setUid, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVariableValue, setXhc, swapNode, terminate, treeSize, writeXml
 

Constructor Detail

AppAntForaging

public AppAntForaging()
Method Detail

setPheromoneEvaporationRate

public void setPheromoneEvaporationRate(double pheromoneEvaporationRate)
Parameters:
pheromoneEvaporationRate - The pheromoneEvaporationRate to set.

setPheromoneDiffusionRate

public void setPheromoneDiffusionRate(double pheromoneDiffusionRate)
Parameters:
pheromoneDiffusionRate - The pheromoneDiffusionRate to set.

setUsePheromone

public void setUsePheromone(boolean usePheromone)
Parameters:
usePheromone - The usePheromone to set.

setUsePheromoneDiffusion

public void setUsePheromoneDiffusion(boolean usePheromoneDiffusion)
Parameters:
usePheromoneDiffusion - The usePheromoneDiffusion to set.

getPheromoneEvaporationRate

public double getPheromoneEvaporationRate()
Returns:
Returns the pheromoneEvaporationRate.

getPheromoneDiffusionRate

public double getPheromoneDiffusionRate()
Returns:
Returns the pheromoneDiffusionRate.

getUsePheromone

public boolean getUsePheromone()
Returns:
Returns the usePheromone.

getUsePheromoneDiffusion

public boolean getUsePheromoneDiffusion()
Returns:
Returns the usePheromoneDiffusion.

setParam

public boolean setParam(java.lang.String pName,
                        java.lang.String pValue)
Description copied from interface: IApplication
Set the value of a parameter.

Specified by:
setParam in interface IApplication
Overrides:
setParam in class Application

initialize

public void initialize(java.lang.String configFileName)
Description copied from interface: IApplication
Initialize the application.

Specified by:
initialize in interface IApplication
Overrides:
initialize in class Application

wrapup

public void wrapup()
Description copied from interface: IApplication
Wrapup any unfinished business in the application.

Specified by:
wrapup in interface IApplication
Overrides:
wrapup in class Application

main

public static void main(java.lang.String[] args)
main

Parameters:
args - One optional command line argument.