Proposal|NNP for|IN a|DT Red|NNP Harvester|NNP Ant|NNP Robot|NNP :|: Colony|NNP Infiltration|NNP and|CC Task|NNP Switching|NNP Sonia|NNP Roberts|NNP 11/27/07|CD Introduction|NNP Background|NNP Science|NNP fiction|NN writers|NNS have|VBP been|VBN anticipating|VBG humanoid|NN androids|NNS that|WDT could|MD pass|VB a|DT Turing|NNP Test|NNP for|IN years|NNS .|. 
Unfortunately|RB ,|, as|IN of|IN yet|RB ,|, no|DT robot|NN has|VBZ managed|VBN to|TO fool|VB a|DT human|NN for|IN more|JJR than|IN a|DT few|JJ seconds|NNS ,|, and|CC no|DT robot|NN has|VBZ been|VBN created|VBN that|WDT can|MD integrate|VB itself|PRP into|IN human|JJ society|NN .|. 
Infiltrating|NNP insect|NN societies|NNS ,|, however|RB ,|, is|VBZ much|RB simpler|JJR .|. 
Extensive|NNP research|NN has|VBZ been|VBN done|VBN on|IN the|DT interactions|NNS of|IN social|JJ insects|NNS such|JJ as|IN honeybees|NNS ,|, ants|NNS and|CC cockroaches|NNS ,|, and|CC in|IN fact|NN robots|NNS have|VBP passed|VBN undetected|JJ in|IN cockroach|NN society|NN performing|VBG single|JJ simple|JJ behaviors|NNS already|RB (|( Halloy|NNP et|CC al|NN ,|, 2007|CD )|) .|. 
No|DT robot|NN has|VBZ yet|RB been|VBN constructed|VBN ,|, however|RB ,|, that|WDT could|MD pass|VB undetected|JJ within|IN a|DT colony|NN of|IN the|DT red|JJ harvester|NN ants|NNS species|NNS Pogonomyrmex|NNP barbatus|JJ ;|: nor|CC has|VBZ a|DT robot|NN managed|VBN to|TO pass|VB undetected|JJ in|IN a|DT society|NN of|IN insects|NNS while|IN combining|VBG in|IN its|PRP$ design|NN several|JJ different|JJ behaviors|NNS and|CC the|DT thresholds|NNS of|IN stimulation|NN required|VBN to|TO switch|VB between|IN them|PRP .|. 
Such|JJ a|DT robot|NN would|MD allow|VB for|IN both|DT long-term|JJ studies|NNS of|IN ant-robot|JJ interactions|NNS and|CC studies|NNS of|IN task-switching|JJ in|IN the|DT robots|NNS .|. 
I|PRP propose|VBP here|RB the|DT theoretical|JJ construction|NN and|CC programming|NN of|IN a|DT robot|NN (|( hereafter|RB referred|VBD to|TO as|IN Antie|NNP )|) that|WDT will|MD be|VB able|JJ to|TO infiltrate|VB a|DT red|JJ harvester|NN ant|NN nest|NN ,|, switching|VBG between|IN the|DT foraging|VBG ,|, patrolling|NN and|CC midden|NN work|NN behaviors|NNS .|. 

Environment|NNP The|DT red|JJ harvester|NN ant|NN lives|NNS in|IN hot|JJ ,|, dry|JJ deserts|NNS ,|, building|VBG its|PRP$ nests|NNS in|IN light|JJ yellowy|NN sand|NN and|CC foraging|VBG for|IN seeds|NNS deposited|VBN by|IN winds|NNS and|CC rain|NN .|. 
The|DT ants|NNS forage|NN for|IN more|JJR than|IN 30|CD different|JJ varieties|NNS of|IN seeds|NNS ,|, many|JJ of|IN which|WDT do|VBP not|RB grow|VB in|IN the|DT desert|NN (|( Gordon|NNP ,|, 54|CD )|) ,|, where|WRB only|RB a|DT few|JJ varieties|NNS of|IN small|JJ shrubs|NNS ,|, small|JJ herbaceous|JJ flowering|VBG plants|NNS and|CC short|JJ grasses|NNS do|VBP grow|VB (|( Gordon|NNP ,|, 51|CD )|) .|. 
Other|JJ insects|NNS and|CC creatures|NNS ,|, including|VBG other|JJ species|NNS of|IN ants|NNS ,|, are|VBP present|JJ in|IN the|DT desert|NN ,|, but|CC red|JJ harvester|NN ants|NNS seem|VBP to|TO be|VB relatively|RB undisturbed|JJ by|IN these|DT animals|NNS (|( Gordon|NNP ,|, 7|CD -|: 11|CD )|) .|. 
Though|IN fights|NNS sometimes|RB do|VBP break|VB out|IN with|IN other|JJ red|JJ harvester|NN ants|NNS from|IN different|JJ nests|NNS ,|, intraspecies|NNS interactions|NNS tend|VBP not|RB to|TO be|VB aggressive|JJ (|( Gordon|NNP ,|, 11|CD )|) .|. 
Because|IN of|IN this|DT ,|, I|PRP will|MD ignore|VB other|JJ ant|NN species|NNS in|IN the|DT design|NN of|IN Antie|NNP ,|, and|CC will|MD not|RB create|VB a|DT fighting|VBG behavior|NN .|. 
Antie|NNP will|MD be|VB equipped|VBN to|TO navigate|VB in|IN this|DT environment|NN and|CC will|MD be|VB designed|VBN to|TO find|VB seeds|NNS in|IN sandy|JJ soil|NN .|. 

The|DT Ant|NNP &|CC the|DT Robot|NNP Ants|NNP of|IN this|DT species|NNS are|VBP of|IN two|CD types|NNS :|: breeding|VBG ants|NNS (|( queens|NNS and|CC drones|NNS )|) and|CC sterile|JJ female|JJ workers|NNS .|. 
Queens|NNP and|CC drones|NNS will|MD not|RB be|VB considered|VBN in|IN this|DT proposal|NN ,|, as|IN their|PRP$ behaviors|NNS and|CC design|NN is|VBZ much|RB more|RBR specialized|JJ and|CC would|MD be|VB applicable|JJ only|RB during|IN the|DT breeding|VBG season|NN ,|, which|WDT occurs|VBZ but|CC once|RB per|IN year|NN .|. 
The|DT behaviors|NNS of|IN the|DT sterile|JJ workers|NNS may|MD be|VB divided|VBN into|IN several|JJ subcategories|NNS :|: brood|NN care|NN ,|, nest|NN maintenance|NN ,|, patrolling|NN and|CC foraging|VBG .|. 
Little|NNP is|VBZ known|VBN about|IN brood|NN care|NN ,|, as|IN this|DT occurs|VBZ only|RB in|IN the|DT deepest|JJS regions|NNS of|IN the|DT nest|NN and|CC observation|NN would|MD generally|RB require|VB the|DT destruction|NN of|IN the|DT nest|NN .|. 
Nest|NNP maintenance|NN and|CC seed|NN processing|NN are|VBP likewise|RB difficult|JJ to|TO observe|VB in|IN the|DT deeper|JJR regions|NNS of|IN the|DT nest|NN ,|, but|CC the|DT sorting|VBG and|CC deposition|NN of|IN waste|NN dirt|NN and|CC nest|NN garbage|NN outside|IN of|IN the|DT nest|NN (|( midden|NN work|NN )|) occurs|VBZ close|VB enough|RB to|TO the|DT surface|NN to|TO be|VB observable|JJ .|. 
Patrolling|NNP and|CC foraging|VBG ,|, too|RB ,|, occur|VB for|IN the|DT most|JJS part|NN outside|IN of|IN the|DT nest|NN ,|, and|CC have|VBP therefore|RB been|VBN studied|VBN extensively|RB (|( ex|FW .|. ,|, Schafer|NNP ,|, et|CC al|NN ,|, 2006|CD ;|: Gordon|NNP ,|, et|CC al|NN ,|, 2002|CD ;|: Gordon|NNP ,|, 2002|CD ;|: Gordon|NNP ,|, 1987|CD )|) .|. 
It|PRP is|VBZ therefore|RB these|DT three|CD behaviors|NNS that|IN I|PRP would|MD like|VB to|TO focus|VB on|IN in|IN this|DT proposal|NN :|: the|DT others|NNS remain|VBP a|DT bit|NN too|RB mysterious|JJ to|TO yet|RB model|VB ,|, and|CC the|DT ability|NN of|IN a|DT robot|NN to|TO pass|VB undetected|JJ in|IN the|DT depths|NNS of|IN a|DT colony|NN would|MD be|VB very|RB difficult|JJ to|TO observe|VB .|. 

These|DT three|CD behaviors|NNS each|DT present|JJ different|JJ puzzles|NNS to|TO the|DT ant|NN and|CC to|TO the|DT modeler|NN ,|, though|IN there|EX is|VBZ some|DT overlap|VB ,|, particularly|RB with|IN navigational|NN problems|NNS .|. 
In|IN the|DT case|NN of|IN midden|NN work|NN ,|, Antie|NNP must|MD be|VB able|JJ to|TO identify|VB garbage|NN ,|, grasp|VB it|PRP ,|, carry|VB it|PRP out|IN of|IN the|DT nest|NN ,|, and|CC deposit|VB it|PRP about|IN halfway|RB down|RP the|DT mound|NN before|IN returning|VBG to|TO repeat|VB the|DT process|NN ad|NN infinitum|NN (|( or|CC until|IN stimulated|VBN to|TO switch|VB behaviors|NNS )|) .|. 
Patrolling|NNP may|MD be|VB divided|VBN into|IN two|CD distinct|JJ sub-behaviors|JJ ,|, nest|NN patrolling|NN and|CC trail|NN patrolling|NN .|. 
An|DT ant|NN engaged|VBN in|IN nest|NN patrolling|NN must|MD exit|VB the|DT nest|NN at|IN the|DT proper|JJ time|NN in|IN the|DT morning|NN and|CC wander|VB about|IN for|IN a|DT bit|NN on|IN the|DT nest|NN mound|NN ,|, presumably|RB taking|VBG measurements|NNS of|IN the|DT temperature|NN and|CC humidity|NN in|IN some|DT way|NN and|CC making|VBG sure|JJ that|IN it|PRP is|VBZ safe|JJ for|IN the|DT other|JJ ants|NNS to|TO exit|VB .|. 
Perhaps|RB the|DT level|NN of|IN degradation|NN of|IN the|DT nest|NN patrollers|NNS ’|NN cuticular|NN hydrocarbons|NNS after|IN this|DT short|JJ foray|NN into|IN the|DT sun|NN and|CC heat|NN acts|NNS as|IN an|DT indication|NN of|IN the|DT outside|JJ conditions|NNS to|TO the|DT foragers|NNS ,|, who|WP may|MD then|RB ,|, upon|IN smelling|VBG the|DT returning|VBG patroller|NN ,|, be|VB stimulated|VBN either|CC to|TO forage|NN or|CC to|TO remain|VB inactive|JJ inside|IN the|DT nest|NN .|. 
An|DT ant|NN engaged|VBN in|IN trail|NN patrolling|NN must|MD exit|VB the|DT nest|NN ,|, wander|VB around|IN searching|VBG for|IN food|NN sources|NNS ,|, identify|VB food|NN upon|IN discovery|NN and|CC return|NN to|TO the|DT nest|NN to|TO show|VB the|DT foragers|NNS where|WRB the|DT food|NN is|VBZ .|. 
This|DT is|VBZ thought|VBN to|TO be|VB accomplished|VBN by|IN the|DT deposition|NN of|IN chemical|NN markers|NNS from|IN a|DT gland|NN on|IN the|DT abdomen|NN that|IN the|DT patroller|NN drags|VBZ along|IN the|DT ground|NN on|IN her|PRP$ return|NN route|NN to|TO the|DT nest|NN that|IN the|DT foragers|NNS may|MD then|RB follow|VB (|( Gordon|NNP ,|, 33|CD -|: 34|CD ;|: Holldobler|NNP et|CC al|NN ,|, 1990|CD ,|, as|IN cited|VBN in|IN Webb|NNP ,|, 1998|CD )|) .|. 
In|IN addition|NN to|TO following|VBG these|DT trails|NNS to|TO the|DT food|NN ,|, foragers|NNS must|MD also|RB be|VB able|JJ to|TO identify|VB food|NN ,|, grasp|VB it|PRP and|CC carry|VB it|PRP back|RB to|TO the|DT nest|NN .|. 
Ants|NNP engaged|VBD in|IN all|DT three|CD behaviors|NNS must|MD be|VB able|JJ to|TO identify|VB other|JJ nestmates|NNS and|CC their|PRP$ current|JJ tasks|NNS (|( as|RB well|RB as|IN indicate|VBP to|TO other|JJ ants|NNS their|PRP$ own|JJ nestmate|NN status|NN and|CC current|JJ task|NN )|) ,|, walk|VB ,|, navigate|VB both|DT within|IN and|CC outside|IN of|IN the|DT nest|NN ,|, and|CC of|IN course|NN switch|NN tasks|NNS at|IN appropriate|JJ times|NNS .|. 

The|DT Agent|NNP Chassis|NNP Antie|NNP will|MD be|VB implemented|VBN on|IN a|DT tiny|JJ Road|NNP Warrior|NNP robotic|JJ system|NN .|. 
Behaviors|NNP will|MD be|VB coded|VBN in|IN Interactive|NNP C|NNP ,|, for|IN which|WDT some|DT pseudocode|NN is|VBZ included|VBN .|. 
Sensors|NNP will|MD include|VB a|DT thermometer|NN ,|, photoreceptors|NNS ,|, bump|NN sensors|NNS ,|, a|DT polarization|NN compass|NNS ,|, and|CC a|DT series|NN of|IN chemical|NN receptors|NNS .|. 
Antie|NNP be|VB a|DT circular|JJ robot|NN ,|, no|RB more|JJR than|IN 1|CD cm|NN in|IN diameter|NN (|( the|DT length|NN of|IN a|DT red|JJ harvester|NN ant|NN )|) ,|, with|IN two|CD driving|VBG wheels|NNS and|CC one|CD rear|JJ wheel|NN for|IN stabilization|NN .|. 
A|DT gripper|NN will|MD be|VB located|VBN on|IN the|DT front|NN of|IN the|DT robot|NN consisting|VBG of|IN two|CD elongated|JJ tongs|NNS .|. 
Antie|NNP will|MD also|RB feature|VB a|DT skirt|NN of|IN bump|NN sensors|NNS ,|, sonar|NN detectors|NNS and|CC chemical|NN emitters|NNS ,|, including|VBG sacs|NNS of|IN hydrocarbons|NNS extracted|VBN from|IN ants|NNS of|IN the|DT nest|NN being|VBG infiltrated|VBN and|CC pheromones|NNS for|IN successful|JJ patrolling|NN and|CC foraging|VBG .|. 
These|DT sacs|NNS will|MD be|VB refilled|JJ at|IN a|DT filling|VBG station|NN each|DT morning|NN as|IN Antie|NNP determines|VBZ that|IN they|PRP are|VBP getting|VBG depleted|VBN .|. 
Antie|NNP will|MD likewise|RB recharge|NN at|IN a|DT special|JJ station|NN at|IN night|NN just|RB inside|IN the|DT nest|NN entrance|NN .|. 
For|IN the|DT purposes|NNS of|IN this|DT proposal|NN ,|, I|PRP will|MD assume|VB that|IN Antie|NNP has|VBZ enough|JJ battery|NN life|NN to|TO remain|VB powered|VBN the|DT whole|JJ day|NN .|. 
A|DT rudimentary|JJ blueprint|NN of|IN Antie|NNP is|VBZ attached|VBN .|. 
(|( Fig|NNP 1|CD )|) 
Sensors|NNP In|IN order|NN to|TO inform|VB itself|PRP about|IN its|PRP$ environment|NN ,|, Antie|NNP will|MD need|VB a|DT number|NN of|IN sensors|NNS .|. 
In|IN an|DT attempt|NN to|TO mimic|VB the|DT red|JJ harvester|NN ant|NN as|RB closely|RB as|IN possible|JJ ,|, these|DT sensors|NNS include|VBP a|DT thermometer|NN ,|, photoreceptors|NNS ,|, bump|NN sensors|NNS and|CC sonar|NN ,|, a|DT polarization|NN compass|NNS ,|, and|CC a|DT series|NN of|IN chemical|NN receptors|NNS on|IN a|DT pair|NN of|IN stalks|NNS corresponding|JJ to|TO the|DT antennae|NN .|. 
On|IN its|PRP$ front|JJ grippers|NNS ,|, Antie|NNP will|MD have|VB a|DT tactile|NN skin|NN to|TO sense|VB pressure|NN .|. 
The|DT locations|NNS of|IN the|DT rest|NN of|IN these|DT sensors|NNS will|MD depend|VB on|IN their|PRP$ function|NN .|. 

The|DT thermometer|NN will|MD be|VB located|VBN on|IN the|DT rear|NN of|IN the|DT robot|NN to|TO keep|VB it|PRP out|IN of|IN the|DT way|NN ,|, and|CC will|MD detect|VB and|CC input|NN to|TO the|DT robot|NN the|DT outside|JJ temperature|NN in|IN degrees|NNS Celsius|NNP .|. 
Harvester|NNP ants|NNS do|VBP not|RB exit|VB the|DT nest|NN when|WRB the|DT outside|JJ temperature|NN is|VBZ above|IN 52|CD degrees|NNS Celsius|NNP (|( Gordon|NNP ,|, 9|CD )|) ,|, and|CC the|DT ability|NN to|TO use|VB a|DT temperature|NN gradient|NN will|MD enable|VB in-nest|JJ navigation|NN .|. 

Antie|NNP will|MD also|RB be|VB equipped|VBN with|IN one|CD photoreceptor|NN located|VBN in|IN the|DT middle|NN of|IN the|DT top|NN of|IN its|PRP$ chassis|NN corresponding|JJ to|TO the|DT ant|NN ’|NN s|VBZ eyes|NNS .|. 
These|DT will|MD be|VB useful|JJ for|IN initiating|VBG patrolling|NN behavior|NN in|IN the|DT morning|NN and|CC shutting|VBG off|RP behaviors|NNS at|IN night|NN :|: the|DT patrollers|NNS first|JJ poke|NN their|PRP$ heads|NNS out|IN of|IN the|DT nest|NN shortly|RB after|IN sunrise|NN and|CC scuttle|VB back|RB in|IN at|IN night|NN (|( Gordon|NNP ,|, 5|CD )|) .|. 

The|DT bump|NN sensors|NNS and|CC sonar|NN will|MD form|VB a|DT skirt|NN around|IN Antie|NNP to|TO keep|VB it|PRP from|IN colliding|VBG with|IN other|JJ objects|NNS .|. 
The|DT sonar|NN will|MD constantly|RB be|VB detecting|VBG nearby|JJ objects|NNS and|CC initiate|VB an|DT escape|NN maneuver|NN when|WRB their|PRP$ inputs|NNS pass|VBP a|DT certain|JJ threshold|NN of|IN stimulation|NN ,|, and|CC the|DT bump|NN sensors|NNS will|MD ,|, when|WRB depressed|VBN ,|, also|RB initiate|VB the|DT escape|NN function|NN .|. 
The|DT sonar|NN will|MD correspond|VB to|TO the|DT ant|NN ’|NN s|VBZ limited|VBN optical|JJ object|VBP detection|NN ability|NN ,|, and|CC the|DT bump|NN sensors|NNS will|MD allow|VB the|DT robot|NN to|TO detect|VB collisions|NNS .|. 

The|DT polarization|NN compass|NNS will|MD consist|VB of|IN two|CD polarized|VBN light|JJ sensors|NNS placed|VBN at|IN 45|CD and|CC -|: 45|CD degrees|NNS from|IN the|DT center|NN front|NN of|IN Antie|NNP ,|, respectively|RB ,|, that|WDT will|MD orient|NN Antie|NNP towards|IN a|DT desired|VBN polarization|NN pattern|NN .|. 
These|DT sensors|NNS would|MD correspond|VB to|TO the|DT cells|NNS in|IN the|DT ants|NNS ’|NN eyes|NNS sensitive|JJ to|TO polarized|VBN light|JJ ,|, and|CC research|NN has|VBZ shown|VBN that|IN many|JJ insects|NNS ,|, including|VBG ants|NNS ,|, do|VBP navigate|VB using|VBG a|DT path|NN integration|NN system|NN synthesizing|VBG input|NN from|IN a|DT polarization|NN compasses|NNS and|CC from|IN a|DT sort|NN of|IN odometer|NN (|( Labhart|NNP ,|, et|CC al|NN ,|, 2002|CD )|) .|. 
Antie|NNP would|MD use|VB a|DT system|NN for|IN processing|VBG the|DT input|NN from|IN its|PRP$ polarization|NN compass|NNS based|VBN on|IN the|DT compass|NNS designed|VBN by|IN Lambrinos|NNP ,|, Moller|NNP ,|, Labhart|NNP ,|, Pfeifer|NNP and|CC Wehner|NNP in|IN 2000|CD ,|, consisting|VBG of|IN two|CD photodiodes|NNS with|IN blue|JJ filters|NNS and|CC polarizers|NNS .|. 
(|( Fig|NNP 2|CD )|) The|DT difference|NN of|IN their|PRP$ logarithmized|JJ signals|NNS would|MD be|VB returned|VBN to|TO Antie|NNP ,|, who|WP will|MD use|VB a|DT simultaneous|JJ model|NN to|TO navigate|VB returns|NNS to|TO the|DT nest|NN :|: Upon|IN each|DT exit|NN from|IN the|DT nest|NN ,|, Antie|NNP will|MD take|VB a|DT single|JJ 360|CD o|NN scan|VB of|IN the|DT sky|NN ,|, and|CC will|MD orient|NN itself|PRP according|VBG to|TO an|DT analytical|JJ procedure|NN to|TO derive|VB compass|NNS information|NN from|IN different|JJ polarization|NN patterns|NNS perceived|VBN later|RB .|. 
This|DT should|MD be|VB sufficient|JJ to|TO return|VB Antie|NNP to|TO the|DT nest|NN ,|, given|VBN the|DT accuracy|NN achieved|VBN by|IN Lambrinos|NNP ,|, et|CC al|NN and|CC the|DT relatively|RB short|JJ periods|NNS of|IN time|NN that|IN harvester|NN ants|NNS spend|VBP outside|IN the|DT nest|NN before|IN returning|VBG .|. 

Fig.|NN 2|CD .|. Diagram|NNP of|IN the|DT polarization-opponent|JJ unit|NN described|VBN by|IN Lambrinos|NNP ,|, et|CC al|NN (|( 2000|CD )|) .|. The|DT unit|NN takes|VBZ in|IN polarization|NN levels|NNS through|IN the|DT two|CD polarization-sensitive|JJ photodiodes|NNS and|CC feeds|VBZ them|PRP into|IN the|DT logarithm|NN ratio|NN amplifier|NN ,|, which|WDT returns|VBZ the|DT difference|NN of|IN the|DT logarithmized|JJ signals|NNS from|IN the|DT photodiodes|NNS .|. 
The|DT e-vector|JJ (|( heading|VBG )|) returned|VBD from|IN the|DT two|CD polarization-sensitive|JJ photodiodes|NNS (|( 1|CD ,|, 2|CD )|) follows|VBZ a|DT cos2|NN -|: function|NN .|. 

Ants|NNP themselves|PRP rely|VBP primarily|RB on|IN chemical|NN information|NN taken|VBN in|IN through|IN their|PRP$ antennae|NN ,|, and|CC to|TO mimic|VB this|DT ,|, Antie|NNP will|MD have|VB chemical|NN sensing|VBG and|CC emitting|VBG “|NN stalks|NNS ”|NN with|IN which|WDT to|TO both|DT interact|NN with|IN other|JJ ants|NNS (|( who|WP may|MD be|VB surprised|VBN to|TO find|VB an|DT ant|NN without|IN antennae|NN )|) and|CC take|VB in|IN chemical|NN information|NN .|. 
These|DT stalks|NNS will|MD need|VB to|TO have|VB receptors|NNS to|TO measure|VB the|DT n-alkene|JJ levels|NNS present|JJ in|IN another|DT ant|NN ’|NN s|VBZ cuticular|NN hydrocarbons|NNS ,|, which|WDT research|NN indicates|VBZ is|VBZ the|DT marker|NN for|IN harvester|NN ants|NNS of|IN a|DT nestmate|NN ’|NN s|VBZ current|JJ task|NN ,|, perhaps|RB because|IN the|DT hydrocarbons|NNS are|VBP altered|VBN in|IN the|DT dry|JJ sun|NN ,|, causing|VBG a|DT different|JJ ratio|NN of|IN n-alkanes|JJ to|TO n-alkenes|JJ and|CC the|DT presence|NN of|IN branched|VBN n-alkanes|JJ in|IN the|DT hydrocarbon|NN profile|NN (|( Wagner|NNP ,|, et|CC al|NN ,|, 2001|CD ,|, as|IN cited|VBN in|IN Gordon|NNP &|CC Greene|NNP ,|, 2003|CD )|) .|. 
Antie|NNP ’|NN s|VBZ stalks|NNS would|MD also|RB have|VB receptors|NNS for|IN the|DT hydrocarbons|NNS themselves|PRP ,|, which|WDT research|NN shows|NNS indicate|VBP to|TO the|DT ants|NNS whether|IN another|DT ant|NN is|VBZ their|PRP$ nestmate|NN (|( Arnold|NNP ,|, et|CC al|NN ,|, 1996|CD ,|, as|IN cited|VBN in|IN Gordon|NNP &|CC Mehdiabadi|NNP ,|, 1999|CD )|) ,|, receptors|NNS to|TO detect|VB food|NN ,|, and|CC receptors|NNS for|IN three|CD types|NNS of|IN pheromones|NNS :|: those|DT released|VBN by|IN successful|JJ foragers|NNS returning|VBG with|IN food|NN ,|, those|DT released|VBN by|IN successful|JJ patrollers|NNS returning|VBG to|TO the|DT nest|NN ,|, and|CC those|DT marking|VBG piles|NNS of|IN trash|NN as|IN midden|NN .|. 
Research|NNP shows|VBZ that|IN successful|JJ foragers|NNS returning|VBG to|TO the|DT nest|NN do|VBP have|VBP a|DT different|JJ effect|NN on|IN the|DT inactive|JJ workers|NNS than|IN unsuccessful|JJ foragers|NNS returning|VBG (|( Schafer|NNP ,|, et|CC al|NN ,|, 2006|CD )|) .|. 
Returning|NNP successful|JJ patrollers|NNS have|VBP an|DT even|RB greater|JJR effect|NN on|IN foraging|VBG activity|NN :|: foragers|NNS will|MD not|RB leave|VB the|DT nest|NN unless|IN a|DT patroller|NN returns|NNS (|( Gordon|NNP ,|, 2002|CD )|) ,|, and|CC the|DT rate|NN of|IN foraging|VBG in|IN a|DT colony|NN can|MD be|VB controlled|VBN by|IN rolling|VBG glass|NN beads|NNS coated|VBN with|IN cuticular|NN hydrocarbons|NNS extracted|VBN from|IN patrollers|NNS into|IN the|DT nest|NN (|( Gordon|NNP &|CC Greene|NNP ,|, 2003|CD ;|: Greene|NNP &|CC Gordon|NNP ,|, 2007|CD )|) .|. 
Midden|NNP seems|VBZ to|TO be|VB marked|VBN in|IN some|DT olfactory|NN way|NN ,|, since|IN removing|VBG midden|NN from|IN nests|NNS makes|VBZ them|PRP more|RBR likely|JJ to|TO be|VB invaded|VBD by|IN other|JJ species|NNS (|( Gordon|NNP ,|, 35|CD )|) .|. 
For|IN the|DT purposes|NNS of|IN this|DT proposal|NN ,|, I|PRP will|MD assume|VB that|IN the|DT nest|NN maintenance|NN and|CC food|NN processing|NN ants|NNS have|VBP marked|VBN the|DT midden|NN with|IN a|DT particular|JJ pheromone|NN .|. 
All|DT of|IN these|DT chemical|NN receptors|NNS will|MD be|VB arranged|VBN in|IN an|DT array|NN on|IN a|DT pair|NN of|IN chemical|NN stalks|NNS ,|, with|IN four|CD of|IN each|DT type|NN of|IN receptor|NN per|IN stalk|NN .|. 
This|DT technique|NN ,|, described|VBN by|IN Ishida|NNP ,|, et|CC al|NN (|( 2001|CD )|) ,|, has|VBZ been|VBN shown|VBN to|TO improve|VB the|DT chemical|NN plume-tracking|JJ abilities|NNS of|IN robots|NNS .|. 
The|DT wires|NNS will|MD lead|VB back|RB down|RB through|IN the|DT stalk|NN to|TO the|DT on-board|JJ PC|NN .|. 

Finally|RB ,|, Antie|NNP will|MD have|VB tactile|NN sensors|NNS on|IN its|PRP$ grippers|NNS to|TO analyze|VB the|DT pressure|NN being|VBG exerted|VBN on|IN a|DT gripped|VBD object|NN .|. 
These|DT sensors|NNS will|MD be|VB of|IN the|DT type|NN patented|VBN by|IN Peterson|NNP ,|, et|CC al|NN (|( Patent|NNP #|# 4|CD ,|, 492,949|CD )|) ,|, and|CC will|MD feature|VB several|JJ layers|NNS of|IN electrically|RB insulating|VBG and|CC parallel|JJ flexible|JJ conductive|JJ rods|NNS arranged|VBD such|JJ that|IN an|DT exerted|VBN pressure|NN may|MD be|VB measured|VBN in|IN output|NN voltage|NN .|. 
These|DT will|MD correspond|VB to|TO the|DT muscles|NNS of|IN the|DT ant|NN ’|NN s|VBZ mandibles|NNS ,|, which|WDT provide|VBP sensorimotor|NN feedback|NN to|TO the|DT ant|NN when|WRB grasping|VBG objects|NNS .|. 
A|DT table|NN of|IN the|DT sensors|NNS and|CC their|PRP$ relation|NN to|TO the|DT ant|NN ’|NN s|VBZ sensory|JJ system|NN is|VBZ provided|VBN below|IN .|. 

Fig|NNP 3|CD .|. Table|NNP of|IN sensors|NNS and|CC their|PRP$ relations|NNS to|TO the|DT ant|NN .|. Sensor|NNP Relation|NNP to|TO Ant|NNP Placement|NNP on|IN Antie|NNP Function|NNP Sonar|NNP detectors|NNS Eyes|NNS ;|: object|VBP perception|NN Skirt|NNP Prevent|VB object|VBP collisions|NNS !|. Thermometer|NNP Ants|NNP respond|VBP to|TO different|JJ temperatures|NNS Rear|NNP In-nest|NNP navigation|NN ;|: tells|VBZ Antie|NNP when|WRB to|TO stop|VB engaging|VBG in|IN extra-nest|JJ activity|NN “|NN Successful|JJ forager|NN ”|NN pheromone|NN chemical|NN detectors|NNS Antennae|NNP Stalks|NNP Forager|NNP behavior|NN activation|NN “|NN Successful|JJ patroller|NN ”|NN pheromone|NN chemical|NN detectors|NNS Antennae|NNP Stalks|NNP Detect|NNP and|CC follow|VB trails|NNS left|VBN by|IN patrollers|NNS Photoreceptor|NNP Eyes|NNS ;|: light|JJ perception|NN Center|NNP top|JJ Find|VBP surface|NN from|IN inside|IN nest|NN ;|: tell|VB patrollers|NNS when|WRB to|TO begin|VB patrolling|NN in|IN the|DT morning|NN Hydrocarbon|NNP alkene|NN level|NN detectors|NNS Antennae|NNP Stalks|NNP Determine|NNP what|WP task|NN other|JJ ants|NNS are|VBP engaged|VBN in|IN Cuticular|NNP hydrocarbon|NN detectors|NNS Antennae|NNP Stalks|NNP Determine|NNP whether|IN an|DT ant|NN is|VBZ a|DT nestmate|NN Chemical|NN seed|NN detectors|NNS Antennae|NNP Stalks|NNP Determine|NNP whether|IN an|DT object|VBP is|VBZ a|DT seed|NN or|CC not|RB Polarized|NNP photoreceptors|NNS Retina|NNP 45|CD and|CC -|: 45|CD degrees|NNS from|IN center|NN on|IN top|JJ Polarization|NNP compass|NNS Midden|NNP pheromone|NN chemical|NN receptors|NNS Antennae|NNP Stalks|NNP Determine|NNP whether|IN an|DT object|VBP is|VBZ midden|NN or|CC not|RB Motors|NNPS Antie|NNP ’|NN s|VBZ motors|NNS will|MD allow|VB it|PRP to|TO move|VB around|IN and|CC interact|NN with|IN its|PRP$ environment|NN and|CC fellow|NN ants|NNS .|. 
There|EX will|MD be|VB two|CD individually|RB operated|VBN motors|NNS to|TO drive|VB the|DT two|CD side|NN wheels|NNS in|IN lieu|NN of|IN legs|NNS .|. 
Two|CD simultaneously|RB operated|VBN motors|NNS will|MD open|VB and|CC close|VB the|DT grippers|NNS ,|, emulating|VBG the|DT grasping|VBG power|NN of|IN the|DT ant|NN ’|NN s|VBZ mandibles|NNS .|. 
A|DT third|JJ motor|NN will|MD lift|VB and|CC lower|VB the|DT grippers|NNS ,|, allowing|VBG Antie|NNP to|TO raise|VB and|CC lower|JJR gripped|VBD items|NNS as|IN an|DT ant|NN would|MD by|IN raising|VBG and|CC lowering|VBG its|PRP$ head|NN .|. 
Three|CD small|JJ sprayers|NNS will|MD emit|NN successful|JJ patroller|NN and|CC forager|NN pheromones|NNS and|CC cuticular|NN hydrocarbons|NNS from|IN the|DT appropriate|JJ sacs|NNS .|. 
These|DT will|MD be|VB located|VBN in|IN different|JJ places|NNS :|: the|DT sprayer|NN for|IN the|DT successful|JJ patroller|NN pheromone|NN will|MD be|VB located|VBN on|IN the|DT rear|NN at|IN the|DT base|NN of|IN Antie|NNP ,|, corresponding|JJ to|TO the|DT glands|NNS that|IN researchers|NNS believe|VBP the|DT ants|NNS drag|VBP along|IN behind|IN them|PRP to|TO mark|VB returning|VBG paths|NNS ,|, while|IN the|DT successful|JJ forager|NN and|CC cuticular|NN hydrocarbon|NN sprayers|NNS will|MD be|VB located|VBN on|IN the|DT skirt|NN .|. 
Antie|NNP will|MD not|RB spray|NN different|JJ pheromones|NNS depending|VBG on|IN its|PRP$ task|NN ,|, on|IN the|DT assumption|NN that|IN its|PRP$ time|NN in|IN the|DT sun|NN will|MD alter|VB its|PRP$ hydrocarbons|NNS enough|RB that|IN its|PRP$ tasks|NNS will|MD be|VB recognizable|JJ to|TO other|JJ ants|NNS .|. 
Almost|RB all|DT motor|NN output|NN will|MD be|VB a|DT direct|JJ function|NN of|IN sensory|JJ input|NN as|IN indicated|VBN in|IN the|DT following|VBG section|NN .|. 

The|DT Behavior|NNP Antie|NNP will|MD have|VB a|DT hybrid|JJ software|NN architecture|NN :|: a|DT subsumption|NN hierarchy|NN will|MD be|VB responsible|JJ for|IN switching|VBG between|IN behaviors|NNS ,|, but|CC many|JJ sub-behaviors|JJ will|MD operate|VB on|IN a|DT schema|NN basis|NN .|. 
Pseudocode|NNP will|MD approximate|JJ this|DT architecture|NN as|RB closely|RB as|IN possible|JJ ,|, and|CC where|WRB appropriate|JJ ,|, different|JJ subroutines|NNS running|VBG on|IN a|DT schema|NN basis|NN will|MD be|VB marked|VBN .|. 

Common|NNP Behaviors|NNP A|DT few|JJ sub-behaviors|JJ will|MD be|VB necessary|JJ for|IN more|JJR than|IN one|CD behavior|NN .|. 
To|TO ease|VB Antie|NNP ’|NN s|VBZ on-board|JJ memory|NN requirements|NNS and|CC processing|NN capabilities|NNS (|( and|CC to|TO make|VB all|DT the|DT rest|NN of|IN the|DT pseudocode|NN easier|JJR for|IN the|DT reader|NN to|TO understand|VB )|) ,|, I|PRP propose|VBP a|DT few|JJ global|JJ variables|NNS and|CC subroutines|NNS .|. 

The|DT following|VBG global|JJ variables|NNS will|MD be|VB used|VBN throughout|IN the|DT pseudocode|NN ,|, and|CC are|VBP compiled|VBN here|RB for|IN ease|NN of|IN reference|NN :|: 

/|NN /|NN number|NN representing|VBG calibration|NN for|IN speed|NN double|JJ calibrate|NN =|SYM 0|CD ;|: /|NN /|NN constant|JJ representing|VBG the|DT light|NN at|IN sunrise|NN double|JJ sunrise|NN ;|: /|NN /|NN outputs|NNS double|RB left|JJ _|NN motor|NN _|NN OP|NNP =|SYM 0|CD ;|: /|NN /|NN left|VBD wheel|NN motor|NN double|JJ right|JJ _|NN motor|NN _|NN OP|NNP =|SYM 0|CD ;|: /|NN /|NN right|JJ wheel|NN motor|NN /|NN /|NN inputs|NNS double|JJ photo|NN _|NN IP|NNP ;|: /|NN /|NN photoreceptor|NN double|JJ temp|NN _|NN IP|NNP ;|: /|NN /|NN thermometer|NN /|NN /|NN Array|NNP inputs|NNS from|IN left|VBD and|CC right|JJ midden|NN pheromone|NN /|NN /|NN detectors|NNS .|. Assume|VB a|DT function|NN to|TO determine|VB more|RBR precise|JJ /|NN /|NN location|NN ,|, returning|VBG these|DT variables|NNS :|: double|RB left|JJ _|NN midden|NN _|NN IP|NNP ;|: double|JJ right|JJ _|NN midden|NN _|NN IP|NNP ;|: /|NN /|NN Array|NNP inputs|NNS from|IN left|VBD and|CC right|JJ alkene|NN sensors|NNS .|. Assume|VB a|DT /|NN /|NN function|NN to|TO determine|VB location|NN :|: double|RB left|JJ _|NN alk|NN _|NN avg|NN _|NN IP|NNP ;|: double|JJ right|JJ _|NN alk|NN _|NN avg|NN _|NN IP|NNP ;|: /|NN /|NN Array|NNP inputs|NNS from|IN left|VBD and|CC right|NN successful|JJ forager|NN /|NN /|NN sensors|NNS .|. Assume|VB a|DT function|NN to|TO determine|VB location|NN :|: double|RB left|JJ _|NN sucfor|NN _|NN IP|NNP ;|: double|JJ right|JJ _|NN sucfor|NN _|NN IP|NNP ;|: /|NN /|NN Array|NNP inputs|NNS from|IN left|VBD and|CC right|JJ “|NN successful|JJ patroller|NN ”|NN /|NN /|NN sensors|NNS .|. Assume|VB a|DT function|NN to|TO determine|VB location|NN :|: double|RB left|JJ _|NN sucpat|NN _|NN IP|NNP ;|: double|JJ right|JJ _|NN sucpat|NN _|NN IP|NNP ;|: /|NN /|NN Array|NNP inputs|NNS from|IN left|VBD and|CC right|JJ nestmate|NN hydrocarbon|NN /|NN /|NN detectors|NNS .|. Assume|VB a|DT function|NN to|TO determine|VB location|NN :|: double|RB left|JJ _|NN hydrocarb|NN _|NN IP|NNP ;|: double|JJ right|JJ _|NN hydrocarb|NN _|NN IP|NNP ;|: /|NN /|NN Array|NNP inputs|NNS from|IN left|VBD and|CC right|JJ chemical|NN seed|NN detectors|NNS .|. /|NN /|NN Assume|VB a|DT function|NN to|TO determine|VB location|NN :|: double|RB left|JJ _|NN seed|NN _|NN IP|NNP ;|: double|JJ right|JJ _|NN seed|NN _|NN IP|NNP ;|: /|NN /|NN inputs|NNS from|IN left|VBD and|CC right|JJ sonar|NN sensors|NNS :|: double|RB left|JJ _|NN sonar|NN _|NN IP|NNP ;|: double|JJ right|JJ _|NN sonar|NN _|NN IP|NNP ;|: /|NN /|NN Booleans|NNP representing|VBG detection|NN boolean|NN food|NN _|NN detect|VB =|SYM false|JJ ;|: /|NN /|NN is|VBZ an|DT object|VBP food|NN ?|. boolean|NN midden|NN _|NN detect|VB =|SYM false|JJ ;|: /|NN /|NN is|VBZ an|DT object|VBP midden|NN ?|. boolean|NN nestmate|NN _|NN detect|VB =|SYM false|JJ ;|: /|NN /|NN is|VBZ an|DT object|VBP a|DT nestmate|NN ?|. boolean|NN sucfor|NN _|NN detect|VB =|SYM false|JJ ;|: /|NN /|NN successful|JJ forager|NN boolean|NN forager|NN _|NN detect|VB =|SYM false|JJ ;|: /|NN /|NN forager|NN boolean|NN midworker|NN _|NN detect|VB =|SYM false|JJ ;|: /|NN /|NN midden|NN worker|NN poolean|NN patroller|NN _|NN detect|VB =|SYM false|JJ ;|: /|NN /|NN patroller|NN boolean|NN sucpat|NN _|NN detect|VB =|SYM false|JJ ;|: /|NN /|NN successful|JJ patroller|NN /|NN /|NN thresholds|NNS at|IN which|WDT inputs|NNS may|MD be|VB declared|VBN to|TO /|NN /|NN have|VBP been|VBN detected|VBN double|JJ food|NN _|NN threshold|NN ;|: double|JJ midden|NN _|NN threshold|NN ;|: double|JJ hydrocarb|NN _|NN threshold|NN ;|: /|NN /|NN nestmate|NN hydrocarbons|NNS boolean|NN forage|NN _|NN active|JJ =|SYM false|JJ ;|: /|NN /|NN activation|NN status|NN as|IN forager|NN 
Common|JJ behaviors|NNS will|MD include|VB a|DT forward|JJ cruise|NN and|CC turning|VBG mechanism|NN ,|, procedures|NNS to|TO determine|VB the|DT orientation|NN towards|IN nest|NN and|CC the|DT distance|NN from|IN the|DT nest|NN when|WRB outside|IN ,|, in-nest|JJ navigation|NN ,|, an|DT escape|NN function|NN for|IN when|WRB objects|NNS are|VBP detected|VBN or|CC bumped|VBN into|IN ,|, object|VBP identification|NN and|CC gripping|VBG ,|, a|DT generic|JJ algorithm|NN for|IN pheromone|NN plume|NN and|CC chemical|NN trail|NN following|NN ,|, and|CC the|DT identification|NN of|IN other|JJ ants|NNS .|. 

For|IN a|DT simple|JJ start|NN ,|, the|DT forward|JJ cruise|NN function|NN will|MD merely|RB take|VB in|IN a|DT double|JJ integer|NN representing|VBG a|DT speed|NN and|CC cause|VB Antie|NNP to|TO move|VB forward|RB at|IN this|DT speed|NN .|. 

/|NN /|NN Forward|NNP cruise|NN /|NN /|NN Takes|VBZ in|IN a|DT number|NN representing|VBG the|DT desired|VBN speed|NN .|. /|NN /|NN Causes|NNP robot|NN to|TO cruise|NN forward|RB at|IN said|VBD speed|NN .|. /|NN /|NN Speeds|NNP assumed|VBD to|TO be|VB on|IN a|DT 1|CD -|: 10|CD scale|NN (|( 10|CD being|VBG fastest|JJS )|) .|. void|NN forCruz|NN (|( double|JJ speed|NN )|) {|( /|NN /|NN Each|DT wheel|NN input|NN "|'' gets|VBZ "|'' the|DT appropriate|JJ speed|NN /|NN /|NN Calibrate|NNP is|VBZ a|DT double|JJ representing|VBG a|DT calibration|NN /|NN /|NN initialized|JJ to|TO zero|CD and|CC altered|VBN as|IN necessary|JJ .|. /|NN /|NN The|DT robot|NN will|MD receive|VB the|DT “|NN GO|NNP ”|NN command|NN as|RB long|RB as|IN /|NN /|NN this|DT function|NN is|VBZ running|VBG .|. left|VBD _|NN motor|NN _|NN OP|NNP =|SYM speed|NN +|NN calibrate|NN ;|: right|JJ _|NN motor|NN _|NN OP|NNP =|SYM speed|NN ;|: }|) /|NN /|NN end|NN forCruz|NN 
A|DT similar|JJ rotate|VB function|NN will|MD be|VB used|VBN to|TO orient|NN Antie|NNP towards|IN a|DT particular|JJ heading|VBG .|. 
/|NN /|NN Rotate|NNP /|NN /|NN Takes|VBZ in|IN a|DT desired|VBN angle|NN to|TO rotate|VB the|DT robot|NN and|CC /|NN /|NN rotates|NNS accordingly|RB /|NN /|NN Assume|VB that|IN 10|CD s|VBZ is|VBZ sufficient|JJ to|TO rotate|VB the|DT robot|NN /|NN /|NN completely|RB around|IN one|CD wheel|NN ;|: this|DT may|MD be|VB changed|VBN /|NN /|NN in|IN implementation|NN .|. void|NN rotate|VB (|( int|NN angle|NN )|) {|( /|NN /|NN If|IN angle|NN to|TO turn|VB is|VBZ to|TO the|DT right|NN ,|, rotate|VB left|VBD wheel|NN /|NN /|NN for|IN a|DT portion|NN of|IN 10|CD s|VBZ in|IN accordance|NN with|IN desired|VBN /|NN /|NN angle|NN 's|POS proportion|NN of|IN a|DT circle|NN if|IN (|( angle|NN >|NN 0|CD )|) {|( while|IN (|( [|NN timer|NN ]|NN <|NN 10|CD *|NN angle|NN /|NN 360|CD )|) {|( left|VBD _|NN motor|NN _|NN OP|NNP =|SYM 5|CD ;|: right|JJ _|NN motor|NN _|NN OP|NNP =|SYM 0|CD ;|: }|) /|NN /|NN else|RB rotate|VB right|JJ wheel|NN for|IN appropriate|JJ portion|NN of|IN 10|CD s|VBZ else|RB {|( while|IN (|( [|NN timer|NN ]|NN <|NN 10|CD *|NN angle|NN /|NN 360|CD )|) {|( left|VBD _|NN motor|NN _|NN OP|NNP =|SYM 0|CD ;|: right|JJ _|NN motor|NN _|NN OP|NNP =|SYM 5|CD ;|: }|) /|NN /|NN end|NN while|IN }|) /|NN /|NN end|NN else|RB }|) /|NN /|NN end|NN rotate|VB 
These|DT behaviors|NNS will|MD often|RB be|VB used|VBN in|IN other|JJ subroutines|NNS running|VBG on|IN a|DT schema|NN basis|NN ,|, and|CC when|WRB combined|VBN with|IN the|DT forward|JJ cruise|NN function|NN ,|, should|MD cause|VB the|DT robot|NN to|TO move|VB at|IN an|DT angle|NN .|. 

In|IN order|NN to|TO orient|NN itself|PRP toward|IN the|DT nest|NN while|IN navigating|VBG outside|IN ,|, Antie|NNP will|MD need|VB to|TO determine|VB which|WDT direction|NN the|DT nest|NN is|VBZ in|IN and|CC rotate|VB toward|IN that|DT heading|VBG ,|, and|CC also|RB how|WRB far|RB from|IN the|DT nest|NN it|PRP is|VBZ at|IN its|PRP$ current|JJ location|NN .|. 
The|DT orientation|NN and|CC distance|NN should|MD be|VB calculable|JJ by|IN the|DT polarization|NN pattern|NN according|VBG to|TO the|DT system|NN set|VBN up|RP by|IN Lambrinos|NNP ,|, et|CC al.|NN 
Antie|NNP will|MD therefore|RB have|VB a|DT polarization|NN function|NN that|WDT will|MD return|VB a|DT compass|NNS direction|NN toward|IN which|WDT it|PRP should|MD orient|NN in|IN order|NN to|TO return|VB home|NN to|TO the|DT nest|NN ,|, and|CC a|DT distance|NN function|NN that|WDT will|MD return|VB the|DT shortest|JJS direct|JJ distance|NN .|. 
We|PRP may|MD assume|VB that|IN this|DT first|JJ function|NN will|MD return|VB a|DT direction|NN in|IN degrees|NNS ,|, positive|JJ or|CC negative|JJ ,|, and|CC that|IN the|DT second|JJ function|NN will|MD return|VB a|DT distance|NN in|IN centimeters|NNS .|. 
The|DT first|JJ function|NN might|MD look|VB something|NN like|IN this|DT :|: 

/|NN /|NN Nest|NNP Orient|NNP /|NN /|NN Takes|VBZ in|IN the|DT polarization|NN sensitive|JJ photo|NN diode|NN inputs|NNS /|NN /|NN and|CC returns|VBZ the|DT location|NN of|IN the|DT nest|NN in|IN degrees|NNS .|. int|NN nestOrient|NN (|( double|RB left|JJ _|NN POL|NNP _|NN IP|NNP ,|, double|JJ right|JJ _|NN POL|NNP _|NN IP|NNP )|) {|( int|NN degrees|NNS =|SYM 0|CD ;|: /|NN /|NN Calculates|NNP direction|NN of|IN nest|NN ,|, and|CC returns|NNS as|IN degrees|NNS .|. return|NN degrees|NNS ;|: }|) /|NN /|NN end|NN nestOrient|NN 
The|DT second|JJ function|NN ,|, which|WDT would|MD return|VB the|DT distance|NN in|IN centimeters|NNS ,|, might|MD look|VB something|NN like|IN this|DT :|: 
/|NN /|NN Nest|NNP Distance|NNP /|NN /|NN Takes|VBZ in|IN the|DT polarization|NN sensitive|JJ photo|NN diode|NN inputs|NNS /|NN /|NN and|CC returns|VBZ the|DT current|JJ distance|NN to|TO the|DT nest|NN .|. int|NN nestDist|NN (|( double|RB left|JJ _|NN POL|NNP _|NN IP|NNP ,|, double|JJ right|JJ _|NN POL|NNP _|NN IP|NNP )|) {|( int|NN dist|NN =|SYM 0|CD ;|: /|NN /|NN Calculates|NNP distance|NN from|IN nest|NN ,|, returning|VBG distance|NN in|IN cm|NN .|. return|NN dist|NN ;|: }|) /|NN /|NN end|NN nestDist|NN 
In-nest|NNP navigation|NN will|MD be|VB a|DT function|NN of|IN the|DT temperature|NN ,|, read|VBN by|IN Antie|NNP ’|NN s|VBZ thermometer|NN and|CC a|DT light|JJ source|NN .|. 
To|TO exit|VB ,|, Antie|NNP will|MD seek|VB a|DT high|JJ temperature|NN until|IN the|DT photoreceptor|NN reaches|VBZ a|DT threshold|NN of|IN stimulation|NN indicating|VBG sunlight|NN ,|, and|CC to|TO get|VB deeper|JJR ,|, Antie|NNP will|MD seek|VB a|DT lower|JJR temperature|NN .|. 
The|DT code|NN may|MD look|VB something|NN like|IN this|DT :|: 

/|NN /|NN Exit|NN Nest|NNP /|NN /|NN Uses|NNP temperature|NN gradient|NN to|TO navigate|VB towards|IN the|DT nest|NN /|NN /|NN entrance|NN from|IN inside|IN void|NN nestExit|NN (|( )|) {|( /|NN /|NN Reads|NNP temperature|NN ,|, scoots|NNS forward|RB 1|CD s|VBZ ,|, reads|VBZ temperature|NN /|NN /|NN again|RB ,|, takes|VBZ the|DT difference|NN ,|, and|CC determines|VBZ whether|IN current|JJ /|NN /|NN heading|VBG is|VBZ increasing|VBG temperature|NN reading|NN .|. If|IN not|RB ,|, rotates|NNS /|NN /|NN 45|CD degrees|NNS and|CC tries|VBZ again|RB .|. while|IN (|( photo|NN _|NN IP|NNP <|NN sunrise|NN )|) {|( double|JJ temp|NN =|SYM temp|NN _|NN IP|NNP ;|: while|IN (|( [|NN timer|NN ]|NN <|NN 1|CD )|) {|( forCruz|NN (|( 5|CD )|) ;|: }|) temp|NN -|: =|SYM temp|NN _|NN IP|NNP ;|: if|IN (|( temp|NN >|NN 0|CD )|) rotate|VB (|( 45|CD )|) ;|: }|) /|NN /|NN end|NN nestExit|NN 
To|TO enter|VB the|DT nest|NN ,|, such|JJ as|IN at|IN the|DT end|NN of|IN a|DT task|NN ,|, Antie|NNP will|MD perform|VB the|DT same|JJ function|NN ,|, except|IN it|PRP will|MD seek|VB a|DT lower|JJR temperature|NN instead|RB of|IN a|DT higher|JJR temperature|NN ,|, it|PRP will|MD avoid|VB light|JJ ,|, and|CC it|PRP will|MD only|RB activate|VBP while|IN Antie|NNP is|VBZ less|JJR than|IN 10|CD cm|NN from|IN the|DT nest|NN entrance|NN .|. 
This|DT void|NN function|NN will|MD be|VB called|VBN nestEnter|NN (|( )|) ,|, and|CC will|MD take|VB in|IN no|DT inputs|NNS .|. 

To|TO avoid|VB bumping|VBG into|IN things|NNS (|( including|VBG other|JJ ants|NNS )|) ,|, Antie|NNP be|VB provided|VBN with|IN an|DT escape|NN function|NN .|. 
Each|DT of|IN Antie|NNP ’|NN s|VBZ eight|CD bump|NN sensors|NNS will|MD cause|VB the|DT robot|NN to|TO rotate|VB a|DT different|JJ amount|NN ,|, and|CC the|DT sonar|NN will|MD cause|VB it|PRP to|TO rotate|VB 90|CD degrees|NNS in|IN the|DT opposite|JJ direction|NN .|. 
Regardless|RB ,|, this|DT will|MD be|VB a|DT very|RB simple|JJ function|NN .|. 
I|PRP will|MD include|VB one|CD example|NN :|: 

/|NN /|NN Escape|NNP /|NN /|NN Escapes|NNP from|IN danger|NN when|WRB bump|NN sensors|NNS or|CC sonar|NN are|VBP /|NN /|NN activated|VBN .|. void|NN escape|NN (|( )|) {|( /|NN /|NN Declare|NNP and|CC initialize|NN left|VBD bump|NN sensors|NNS in|IN /|NN /|NN order|NN from|IN front|NN to|TO back|VB .|. bump|NN _|NN left1|NN ;|: bump|NN _|NN left2|NN ;|: bump|NN _|NN left3|NN ;|: bump|NN _|NN left4|NN ;|: /|NN /|NN Declare|NNP and|CC initialize|NN right|JJ bump|NN sensors|NNS in|IN /|NN /|NN order|NN from|IN front|NN to|TO back|VB .|. /|NN /|NN Sonar|NNP sensors|NNS are|VBP globally|RB declared|VBN .|. if|IN (|( bump|NN _|NN left1|NN )|) {|( /|NN /|NN reverse|NN …|NN (|( at|IN reduced|VBN speed|NN )|) forCruz|NN (|( -|: 3|CD )|) ;|: /|NN /|NN …|NN and|CC rotate|VB !|. rotate|VB (|( 45|CD )|) ;|: }|) }|) /|NN /|NN end|NN escape|NN 
Because|IN this|DT function|NN responds|VBZ to|TO the|DT sensors|NNS on|IN Antie|NNP ’|NN s|VBZ around|IN the|DT sides|NNS and|CC only|RB its|PRP$ sonar|NN detectors|NNS will|MD be|VB able|JJ to|TO detect|VB objects|NNS in|IN front|NN of|IN it|PRP ,|, this|DT escape|NN function|NN will|MD not|RB prevent|VB Antie|NNP from|IN being|VBG able|JJ to|TO locate|VB and|CC pick|VB up|RP objects|NNS such|JJ as|IN seeds|NNS .|. 

Before|IN picking|VBG objects|NNS up|RB ,|, however|RB ,|, Antie|NNP will|MD need|VB to|TO identify|VB them|PRP .|. 
This|DT object|VBP detection|NN process|NN will|MD be|VB activated|VBN when|WRB the|DT front|JJ bump|NN sensor|NN is|VBZ stimulated|VBN or|CC when|WRB both|DT sonar|NN detectors|NNS are|VBP stimulated|VBN .|. 
Chemical|NN inputs|NNS will|MD be|VB checked|VBN to|TO see|VB what|WP this|DT object|VBP is|VBZ most|RBS likely|JJ to|TO be|VB given|VBN its|PRP$ smell|NN .|. 
Objects|NNP will|MD include|VB midden|NN and|CC food|NN .|. 
The|DT code|NN may|MD look|VB something|NN like|IN this|DT :|: 

/|NN /|NN Object|NNP Identification|NNP /|NN /|NN Identifies|NNP an|DT object|VBP that|WDT has|VBZ snuck|NN up|RB on|IN the|DT /|NN /|NN unsuspecting|JJ robot|NN .|. void|NN objID|NN (|( )|) {|( /|NN /|NN Declare|NNP and|CC initialize|NN front|JJ bump|NN sensor|NN .|. /|NN /|NN Sonar|NNP sensors|NNS are|VBP globally|RB declared|VBN .|. /|NN /|NN Check|VB inputs|NNS to|TO determine|VB which|WDT smell|VBP is|VBZ strongest|JJS /|NN /|NN if|IN food|NN smell|NN is|VBZ detected|VBN at|IN higher|JJR rate|NN and|CC /|NN /|NN above|IN the|DT food|NN threshold|NN for|IN detection|NN ,|, Antie|NNP /|NN /|NN assumes|VBZ object|VBP is|VBZ food|NN while|IN (|( bump|NN _|NN front|JJ ||NN ||NN (|( sonar|NN _|NN left|VBD _|NN IP|NNP &|CC &|CC sonar|NN _|NN right|JJ _|NN IP|NNP )|) )|) {|( if|IN (|( (|( (|( left|VBD _|NN midden|NN _|NN IP|NNP +|NN right|JJ _|NN midden|NN _|NN IP|NNP )|) <|NN (|( (|( left|VBD _|NN food|NN _|NN IP|NNP +|NN right|JJ _|NN food|NN _|NN IP|NNP )|) )|) &|CC &|CC (|( (|( left|VBD _|NN food|NN _|NN IP|NNP +|NN right|JJ _|NN food|NN _|NN IP|NNP )|) >|NN food|NN _|NN threshold|NN )|) {|( food|NN _|NN detect|VB =|SYM true|JJ ;|: }|) /|NN /|NN if|IN midden|NN smell|NN is|VBZ detected|VBN at|IN higher|JJR rate|NN /|NN /|NN and|CC above|IN threshold|NN for|IN midden|NN detection|NN ,|, /|NN /|NN Antie|NNP assumes|VBZ object|VBP is|VBZ midden|NN else|RB if|IN (|( (|( (|( left|VBD _|NN midden|NN _|NN IP|NNP +|NN right|JJ _|NN midden|NN _|NN IP|NNP )|) >|NN (|( (|( left|VBD _|NN food|NN _|NN IP|NNP +|NN right|JJ _|NN food|NN _|NN IP|NNP )|) )|) &|CC &|CC (|( (|( left|VBD _|NN midden|NN _|NN IP|NNP +|NN right|JJ _|NN midden|NN _|NN IP|NNP )|) >|NN midden|NN _|NN threshold|NN )|) {|( midden|NN _|NN detect|VB =|SYM true|JJ ;|: }|) }|) /|NN /|NN end|NN objID|NN 
Once|RB the|DT object|NN has|VBZ been|VBN identified|VBN ,|, Antie|NNP may|MD grip|NN it|PRP and|CC lift|VB it|PRP .|. 
A|DT simple|JJ void|NN function|NN grip|NN (|( )|) taking|VBG in|IN no|DT inputs|NNS will|MD tighten|VB the|DT grippers|NNS until|IN a|DT certain|JJ threshold|NN of|IN pressure|NN is|VBZ reached|VBN ,|, at|IN which|WDT point|VBP the|DT grippers|NNS will|MD be|VB lifted|VBN for|IN carrying|VBG .|. 
A|DT void|NN function|NN release|NN (|( )|) will|MD perform|VB this|DT same|JJ action|NN in|IN reverse|NN .|. 

Antie|NNP will|MD also|RB need|VB to|TO follow|VB several|JJ different|JJ kinds|NNS of|IN chemical|NN gradient|NN trails|NNS :|: it|PRP will|MD need|VB to|TO track|VB the|DT trails|NNS left|VBN by|IN successful|JJ patrollers|NNS ,|, and|CC localize|NN the|DT source|NN of|IN food-odors|JJ and|CC midden-odors|JJ .|. 
Implementations|NNP of|IN chemical|NN gradient|NN following|VBG robots|NNS using|VBG two|CD sensors|NNS on|IN “|NN antennae|NN ”|NN stalks|NNS has|VBZ been|VBN successful|JJ in|IN with|IN analog|NN robots|NNS in|IN the|DT past|JJ (|( Webb|NNP ,|, 1998|CD )|) ,|, regardless|RB of|IN the|DT potential|JJ problem|NN of|IN airflow|NN causing|VBG a|DT disturbed|VBN gradient|NN over|IN evaporating|VBG pheromones|NNS .|. 
As|IN a|DT partial|JJ control|NN for|IN the|DT problem|NN of|IN imprecise|NN sensing|VBG ,|, a|DT function|NN will|MD perform|VB an|DT analysis|NN of|IN the|DT array|NN information|NN coming|VBG on|IN from|IN Antie|NNP ’|NN s|VBZ four|CD sensors|NNS on|IN each|DT stalk|NN .|. 
The|DT differences|NNS between|IN these|DT outputs|NNS is|VBZ what|WP is|VBZ being|VBG compared|VBN everywhere|RB there|EX is|VBZ a|DT “|NN left|VBD _|NN IP|NNP ”|NN or|CC “|NN right|JJ _|NN IP|NNP .|. ”|NN 
Antie|NNP will|MD use|VB the|DT chemical|NN gradient|NN algorithm|NN of|IN Braitenberg|NNP ’|NN s|VBZ aggressive|JJ type|NN 2|CD vehicle|NN described|VBD in|IN his|PRP$ book|NN “|NN Vehicles|NNPS :|: Experiments|NNS in|IN Synthetic|NNP Psychology|NNP ,|, ”|NN as|IN this|DT was|VBD found|VBN through|IN a|DT series|NN of|IN experiments|NNS by|IN Russell|NNP ,|, et|CC al|NN (|( 2003|CD )|) to|TO be|VB very|RB efficient|JJ when|WRB compared|VBN to|TO several|JJ biomimetic|JJ models|NNS .|. 
Because|IN the|DT same|JJ general|JJ algorithm|NN will|MD be|VB followed|VBN for|IN the|DT localization|NN of|IN all|DT three|CD chemical|NN traces|NNS ,|, I|PRP will|MD provide|VB pseudocode|NN for|IN only|RB one|CD generic|JJ subroutine|NN .|. 
Note|VB that|IN a|DT portion|NN of|IN this|DT subroutine|NN does|VBZ run|VB on|IN a|DT schema|NN basis|NN :|: 

/|NN /|NN Follow|VB Gradient|NNP /|NN /|NN Follows|NNP a|DT generic|JJ chemical|NN gradient|NN ,|, seeking|VBG a|DT higher|JJR /|NN /|NN concentration|NN .|. void|NN gradientFollow|NN (|( )|) {|( /|NN /|NN Compares|NNP left|VBD and|CC right|JJ inputs|NNS and|CC activates|NNS opposite|JJ /|NN /|NN motor|NN to|TO a|DT greater|JJR degree|NN .|. if|IN (|( left|VBD _|NN IP|NNP >|NN right|JJ _|NN IP|NNP )|) {|( [|NN schema|NN ]|NN {|( rotate|VB (|( -|: 90|CD )|) ;|: forCruz|NN (|( 5|CD )|) ;|: }|) /|NN /|NN end|NN schema|NN }|) /|NN /|NN end|NN if|IN if|IN (|( right|JJ _|NN IP|NNP >|NN left|VBD _|NN IP|NNP )|) {|( [|NN schema|NN ]|NN {|( rotate|VB (|( 90|CD )|) ;|: forCruz|NN (|( 5|CD )|) ;|: }|) /|NN /|NN end|NN schema|NN }|) /|NN /|NN end|NN if|IN else|RB forCruz|NN (|( 5|CD )|) ;|: }|) /|NN /|NN end|NN gradientFollow|NN 
For|IN the|DT purposes|NNS of|IN calls|NNS later|RB in|IN the|DT pseudocode|NN ,|, I|PRP will|MD refer|VB to|TO these|DT subroutines|NNS as|IN trailFollow|NN (|( )|) ,|, findFood|NN (|( )|) ,|, and|CC findMidden|NN (|( )|) .|. 
All|DT three|CD are|VBP void|NN and|CC take|VB no|DT inputs|NNS .|. 

The|DT final|JJ common|JJ subroutine|NN will|MD be|VB one|CD for|IN the|DT identification|NN of|IN other|JJ ants|NNS .|. 
When|WRB both|DT sonar|NN sensors|NNS are|VBP stimulated|VBN simultaneously|RB ,|, Antie|NNP will|MD check|VB hydrocarbon|NN inputs|NNS and|CC determine|VB whether|IN the|DT detected|VBN object|VBP is|VBZ a|DT nestmate|NN .|. 
As|IN harvester|NN ants|NNS tend|VBP not|RB to|TO engage|VB aggressively|RB with|IN non-nestmates|JJ ,|, Antie|NNP will|MD only|RB identify|VB other|JJ ants|NNS as|IN ants|NNS if|IN they|PRP belong|VBP to|TO its|PRP$ nest|NN .|. 
Research|NNP has|VBZ shown|VBN that|IN red|JJ harvester|NN ants|NNS may|MD identify|VB the|DT tasks|NNS nestmates|NNS are|VBP engaged|VBN in|IN based|VBN on|IN the|DT ratio|NN of|IN n-alkenes|JJ to|TO n-alkanes|JJ in|IN their|PRP$ hydrocarbons|NNS and|CC the|DT presence|NN or|CC absence|NN of|IN branched|VBN n-alkanes|JJ .|. 
The|DT difference|NN in|IN ratio|NN is|VBZ caused|VBN by|IN the|DT time|NN ants|NNS spend|VBP outside|IN in|IN the|DT sun|NN ,|, which|WDT depletes|VBZ their|PRP$ n-alkene|JJ levels|NNS .|. 
Antie|NNP will|MD attempt|VB to|TO determine|VB the|DT tasks|NNS of|IN other|JJ ants|NNS by|IN sensing|VBG only|RB the|DT n-alkene|JJ levels|NNS .|. 
The|DT code|NN will|MD be|VB similar|JJ to|TO the|DT object|NN identification|NN subroutine|NN and|CC may|MD look|VB something|NN like|IN this|DT :|: 

/|NN /|NN Ant|NNP Identification|NNP /|NN /|NN Identifies|NNP an|DT ant|NN that|WDT has|VBZ snuck|NN up|RB on|IN the|DT /|NN /|NN unsuspecting|JJ robot|NN .|. void|NN antID|NN (|( )|) {|( while|IN (|( left|VBD _|NN sonar|NN _|NN IP|NNP &|CC &|CC right|JJ _|NN sonar|NN _|NN IP|NNP )|) {|( /|NN /|NN Are|VBP hydrocarbons|NNS present|JJ ?|. (|( Is|VBZ this|DT a|DT nestmate|NN ?|. )|) if|IN (|( (|( left|VBD _|NN hydrocarb|NN _|NN IP|NNP +|NN right|JJ _|NN hydrocarb|NN _|NN IP|NNP )|) >|NN hydrocarb|NN _|NN threshold|NN )|) {|( nestmate|NN _|NN detect|VB =|SYM true|JJ ;|: /|NN /|NN In|IN what|WP task|NN is|VBZ the|DT nestmate|NN engaged|VBN ?|. if|IN (|( n-alkene|JJ level|NN is|VBZ appropriate|JJ for|IN a|DT forager|NN )|) {|( forager|NN _|NN detect|VB =|SYM true|JJ ;|: }|) if|IN (|( n-alkene|JJ level|NN is|VBZ appropriate|JJ for|IN a|DT patroller|NN )|) {|( patroller|NN _|NN detect|VB =|SYM true|JJ ;|: }|) if|IN (|( n-alkene|JJ level|NN is|VBZ appropriate|JJ for|IN a|DT midden|NN worker|NN )|) {|( midworker|NN _|NN detect|VB =|SYM true|JJ ;|: }|) /|NN /|NN If|IN not|RB midden|NN work|NN ,|, foraging|VBG or|CC patrolling|NN ,|, ignore|VB }|) /|NN /|NN If|IN not|RB nestmate|NN ,|, ignore|VB }|) }|) /|NN /|NN end|NN antID|NN 
Using|VBG these|DT basic|JJ common|JJ behaviors|NNS ,|, more|RBR complex|JJ behaviors|NNS may|MD be|VB coded|VBN .|. 

Red|JJ harvester|NN ants|NNS do|VBP not|RB retain|VB one|CD task|NN throughout|IN their|PRP$ lifespan|NN ,|, but|CC instead|RB change|VB their|PRP$ behaviors|NNS as|IN is|VBZ appropriate|JJ for|IN the|DT colony|NN (|( Gordon|NNP ,|, 1996|CD )|) .|. 
Research|NNP has|VBZ shown|VBN that|IN red|JJ harvester|NN ants|NNS switch|VBP tasks|NNS partially|RB as|IN a|DT function|NN of|IN age|NN (|( ex|FW .|. ,|, Ingram|NNP ,|, et|CC al|NN ,|, 2005|CD )|) and|CC partially|RB as|IN a|DT function|NN of|IN interactions|NNS with|IN other|JJ workers|NNS (|( ex|FW .|. ,|, Schafer|NNP et|CC al|NN ,|, 2006|CD ;|: Gordon|NNP ,|, 2002|CD ;|: Greene|NNP &|CC Gordon|NNP ,|, 2007|CD )|) .|. 
Younger|NNP ants|NNS work|VBP more|JJR inside|IN the|DT nest|NN ,|, and|CC older|JJR ants|NNS work|VBP more|JJR outside|IN the|DT nest|NN .|. 
As|IN a|DT result|NN ,|, I|PRP will|MD model|VB the|DT three|CD main|JJ behaviors|NNS in|IN the|DT order|NN that|IN they|PRP are|VBP to|TO be|VB engaged|VBN in|IN .|. 
Midden|NNP work|NN ,|, which|WDT consists|VBZ of|IN moving|VBG dirt|NN between|IN the|DT inside|JJ of|IN the|DT nest|NN and|CC the|DT outside|JJ ,|, will|MD occur|VB first|JJ ;|: patrolling|NN ,|, which|WDT involves|VBZ a|DT shorter|JJR overall|JJ amount|NN of|IN time|NN spent|VBD outside|IN ,|, will|MD occur|VB second|JJ ;|: and|CC foraging|VBG will|MD be|VB the|DT final|JJ behavior|NN .|. 
Finally|RB ,|, I|PRP will|MD discuss|VB a|DT main|JJ method|NN encoding|VBG the|DT task|NN switching|VBG between|IN these|DT behaviors|NNS .|. 

The|DT midden|NN work|NN behavior|NN will|MD be|VB Antie|NNP ’|NN s|VBZ default|NN initial|JJ behavior|NN .|. 
It|PRP will|MD be|VB initiated|VBN in|IN the|DT morning|NN by|IN the|DT sunrise|NN ,|, and|CC will|MD continue|VB until|IN the|DT outside|JJ temperature|NN reaches|VBZ 52|CD ­|NN ­|NN ­|NN oC|NN ,|, at|IN which|WDT point|VBP all|DT red|JJ harvester|NN ants|NNS must|MD return|VB to|TO the|DT nest|NN .|. 
As|IN previously|RB stated|VBN ,|, a|DT midden|NN worker|NN must|MD identify|VB midden|NN ,|, grasp|VB it|PRP ,|, and|CC carry|VB it|PRP to|TO the|DT surface|NN ,|, depositing|VBG it|PRP halfway|RB down|RP the|DT mound|NN before|IN returning|VBG to|TO collect|VB more|JJR midden|NN .|. 
A|DT program|NN encoding|VBG this|DT behavior|NN might|MD look|VB like|IN this|DT :|: 

/|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN MIDDEN|NNP WORK|VBP /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN Antie|NNP will|MD leave|VB nest|NN in|IN the|DT morning|NN after|IN sunrise|NN ,|, /|NN /|NN carrying|VBG bits|NNS of|IN midden|NN halfway|RB down|RP the|DT nest|NN mound|NN /|NN /|NN and|CC depositing|VBG them|PRP .|. Antie|NNP will|MD return|VB to|TO the|DT nest|NN and|CC /|NN /|NN repeat|NN this|DT task|NN until|IN the|DT temperature|NN reaches|VBZ above|IN /|NN /|NN 52|CD degrees|NNS Celsius|NNP .|. void|NN midden|NN (|( )|) {|( /|NN /|NN Initiated|NNP by|IN sunrise|NN ,|, stopped|VBN by|IN temperature|NN while|IN (|( photo|NN _|NN IP|NNP >|NN sunrise|NN &|CC &|CC temp|NN _|NN IP|NNP <|NN 52|CD )|) {|( /|NN /|NN Find|VBP midden|NN and|CC identify|VB any|DT found|VBD objects|NNS .|. If|IN /|NN /|NN they|PRP are|VBP midden|NN ,|, grip|NN and|CC carry|VB outside|JJ nest|NN .|. findMidden|NN (|( )|) ;|: objID|NN (|( )|) ;|: if|IN (|( midden|NN _|NN detect|VB )|) {|( grip|NN (|( )|) ;|: nestExit|NN (|( )|) ;|: /|NN /|NN cruise|NN to|TO halfway|RB down|RP the|DT nest|NN mound|NN while|IN (|( nestDistance|NN (|( )|) <|NN 25|CD )|) {|( forCruz|NN (|( )|) ;|: }|) release|NN (|( )|) ;|: /|NN /|NN reset|NN midden|NN _|NN detect|VB midden|NN _|NN detect|VB =|SYM 0|CD ;|: nestEnter|NN (|( )|) ;|: }|) /|NN /|NN end|NN if|IN }|) /|NN /|NN end|NN while|IN }|) /|NN /|NN end|NN midden|NN 
The|DT second|JJ behavior|NN ,|, patrolling|NN ,|, involves|VBZ two|CD sub-behaviors|JJ :|: nest|NN patrolling|NN and|CC trail|NN patrolling|NN .|. 
Nest|NNP patrolling|NN will|MD involve|VB leaving|VBG the|DT nest|NN ,|, roaming|VBG around|IN on|IN the|DT nest|NN mound|NN for|IN a|DT few|JJ minutes|NNS ,|, and|CC reentering|VBG the|DT nest|NN .|. 
This|DT behavior|NN will|MD be|VB implemented|VBN in|IN two|CD parts|NNS ,|, with|IN a|DT task-switching|JJ algorithm|NN based|VBN on|IN age|NN .|. 
Research|NNP shows|VBZ that|IN ants|NNS do|VBP change|VB their|PRP$ behaviors|NNS based|VBN partly|RB on|IN their|PRP$ perceived|VBN life|NN expectancy|NN (|( Moron|NNP ,|, et|CC al|NN ,|, 2007|CD )|) ,|, and|CC that|IN task-switching|JJ is|VBZ partly|RB genetically|RB controlled|VBN by|IN a|DT switch|NN in|IN gene|NN expression|NN as|IN the|DT individual|JJ ages|NNS (|( Ingram|NNP ,|, et|CC al|NN ,|, 2005|CD )|) .|. 
It|PRP is|VBZ therefore|RB reasonable|JJ to|TO assign|VB a|DT constant|JJ age|NN at|IN which|WDT Antie|NNP will|MD switch|VB from|IN nest|NN patrolling|NN to|TO trail|VB patrolling|NN .|. 
In|IN order|NN to|TO perform|VB both|DT of|IN these|DT functions|NNS ,|, Antie|NNP will|MD need|VB a|DT subroutine|NN to|TO explore|VB in|IN a|DT zig-zag|VBP fashion|NN ,|, as|IN harvester|NN ants|NNS do|VBP (|( Gordon|NNP ,|, 34|CD )|) .|. 
Harvester|NNP ants|NNS display|VBP a|DT preference|NN to|TO wander|VB in|IN familiar|JJ territory|NN ,|, though|IN foragers|NNS and|CC patrollers|NNS do|VBP sometimes|RB wander|VB into|IN other|JJ nests|NNS ’|NN territories|NNS (|( Gordon|NNP ,|, 57|CD -|: 60|CD )|) .|. 
To|TO control|VB for|IN this|DT behavior|NN ,|, Antie|NNP ’|NN s|VBZ explore|VB subroutine|NN will|MD display|VB a|DT preference|NN for|IN exploration|NN in|IN places|NNS where|WRB there|EX is|VBZ a|DT low|JJ gradient|NN of|IN nestmate|NN pheromones|NNS .|. 
This|DT model|NN is|VBZ reasonable|JJ because|IN patrollers|NNS and|CC foragers|NNS change|VBP their|PRP$ explored|JJ territory|NN from|IN day|NN to|TO day|NN ,|, even|RB though|IN they|PRP do|VBP retain|VB some|DT more|RBR commonly|RB chosen|VBN paths|NNS (|( Gordon|NNP ,|, 45|CD )|) .|. 
The|DT code|NN may|MD look|VB something|NN like|IN this|DT :|: 

/|NN /|NN Explore|NNP /|NN /|NN Takes|VBZ in|IN desired|VBN distance|NN from|IN nest|NN to|TO explore|VB /|NN /|NN in|IN cm|NN and|CC moves|NNS in|IN a|DT slightly|RB randomized|JJ zigzag|NN /|NN /|NN pattern|NN void|NN explore|VB (|( int|NN distance|NN ,|, int|NN time|NN )|) {|( /|NN /|NN Local|NNP Variables|NNP int|NN time|NN =|SYM 0|CD ;|: /|NN /|NN integer|NN representing|VBG the|DT time|NN to|TO /|NN /|NN wander|VB one|CD direction|NN int|NN angle|NN =|SYM 0|CD ;|: /|NN /|NN integer|NN representing|VBG number|NN of|IN /|NN /|NN degrees|NNS to|TO rotate|VB int|NN dir|NN =|SYM 0|CD ;|: /|NN /|NN integer|NN representing|VBG the|DT direction|NN to|TO /|NN /|NN turn|NN (|( 0|CD =|SYM right|NN ,|, 1|CD =|SYM left|VBD )|) /|NN /|NN Random|NNP number|NN generator|NN to|TO add|VB a|DT bit|NN of|IN wanderlust|NN RandomGenerator|NNP rGen|NN =|SYM new|JJ RandomGenerator|NNP (|( )|) ;|: /|NN /|NN While|IN loop|NN ;|: robot|NN will|MD keep|VB zigging|VBG and|CC zagging|VBG /|NN /|NN for|IN a|DT set|VBN amount|NN of|IN time|NN while|IN (|( [|NN timer|NN ]|NN <|NN time|NN )|) {|( if|IN (|( ant|NN 's|POS distance|NN from|IN nest|NN <|NN distance|NN )|) {|( /|NN /|NN int|NN time|NN gets|VBZ a|DT random|JJ number|NN of|IN seconds|NNS /|NN /|NN between|IN 3|CD and|CC 10|CD time|NN =|SYM rGen|NN .|. nextInt|NN (|( 3|CD ,|, 10|CD )|) ;|: /|NN /|NN int|NN angle|NN gets|VBZ a|DT random|JJ number|NN of|IN degrees|NNS /|NN /|NN between|IN 15|CD and|CC 75|CD angle|NN =|SYM rGen|NN .|. nextInt|NN (|( 15|CD ,|, 75|CD )|) ;|: /|NN /|NN function|NN call|NN to|TO rotation|NN subroutine|NN /|NN /|NN if|IN dir|NN is|VBZ 0|CD ,|, rotate|VB to|TO the|DT right|NN ;|: if|IN dir|NN /|NN /|NN is|VBZ 1|CD ,|, rotate|VB to|TO the|DT left|NN .|. if|IN (|( dir|NN =|SYM =|SYM 0|CD )|) {|( dir|NN =|SYM 1|CD ;|: /|NN /|NN dir|NN changes|NNS direction-|NN turn|NN /|NN /|NN left|VBD next|JJ time|NN rotate|VB (|( angle|NN )|) ;|: /|NN /|NN rotate|VB to|TO the|DT right|NN }|) else|RB {|( dir|NN =|SYM 0|CD ;|: /|NN /|NN dir|NN changes|NNS direction-|NN turn|NN /|NN /|NN right|NN next|JJ time|NN rotate|VB (|( -|: angle|NN )|) ;|: /|NN /|NN rotate|VB to|TO the|DT left|NN }|) /|NN /|NN end|NN rotation|NN call|NN /|NN /|NN while|IN loop|NN to|TO count|VB down|RB number|NN of|IN seconds|NNS /|NN /|NN using|VBG a|DT timer|NN while|IN (|( [|NN timer|NN ]|NN <|NN time|NN )|) {|( /|NN /|NN command|NN to|TO go|VB forward|RB is|VBZ given|VBN goForward|NN =|SYM 1|CD ;|: /|NN /|NN call|NN to|TO forward|RB cruise|NN function|NN ;|: /|NN /|NN straight|JJ cruise|NN forCruz|NN (|( 5|CD ,|, 5|CD )|) ;|: }|) /|NN /|NN end|NN timer|NN while|IN loop|NN }|) /|NN /|NN end|NN distance|NN from|IN nest|NN while|IN loop|NN /|NN /|NN if|IN ant|NN is|VBZ approaching|VBG the|DT desired|VBN distance|NN ,|, /|NN /|NN double|JJ back|RB (|( at|IN angle|NN )|) to|TO explore|VB more|JJR !|. if|IN (|( ant|NN 's|POS distance|NN from|IN nest|NN =|SYM =|SYM distance|NN -|: some|DT small|JJ constant|JJ )|) {|( rotate|VB (|( 135|CD )|) ;|: }|) /|NN /|NN end|NN if|IN /|NN /|NN Avoid|NNP leaving|VBG nest|NN territory|NN else|RB if|IN (|( nestmate|NN pheromones|NNS IP|NNP <|NN very|RB low|JJ threshold|NN )|) {|( while|IN (|( [|NN short|JJ timer|NN ]|NN )|) {|( forCruz|NN (|( 5|CD )|) ;|: /|NN /|NN explore|VBP a|DT bit|NN further|JJ }|) /|NN /|NN end|NN while|IN rotate|VB (|( 45|CD )|) ;|: }|) /|NN /|NN end|NN if|IN }|) /|NN /|NN end|NN if|IN (|( distance|NN from|IN nest|NN <|NN distance|NN )|) }|) /|NN /|NN end|NN explore|VB 
Nest|NNP patrollers|NNS will|MD only|RB call|VB this|DT behavior|NN for|IN a|DT short|JJ distance|NN before|IN returning|VBG to|TO the|DT nest|NN to|TO idle|VB for|IN a|DT few|JJ minutes|NNS and|CC exit|NN again|RB .|. 
Trail|NNP patrollers|NNS will|MD go|VB much|JJ further|RBR ,|, until|IN food|NN sources|NNS are|VBP found|VBN ,|, and|CC will|MD then|RB orient|NN towards|IN the|DT nest|NN and|CC create|VB trails|NNS for|IN the|DT foragers|NNS to|TO follow|VB .|. 
A|DT general|JJ site|NN of|IN food|NN is|VBZ all|DT that|IN the|DT patroller|NN need|VBP find|VB ;|: the|DT foragers|NNS will|MD dig|VB through|IN the|DT sand|NN for|IN the|DT food|NN .|. 
Code|NNP for|IN the|DT patrolling|NN behavior|NN might|MD look|VB like|IN this|DT (|( note|NN that|DT part|NN is|VBZ on|IN a|DT schema|NN basis|NN )|) :|: 

/|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN PATROLLING|NNP /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN Main|NNP patrolling|NN behavior|NN function|NN .|. /|NN /|NN Includes|VBZ nest|NN patrolling|NN ,|, trail|NN patrolling|NN and|CC the|DT /|NN /|NN stimulation|NN and|CC thresholds|NNS to|TO initiate|VB and|CC switch|VB between|IN /|NN /|NN the|DT two|CD .|. /|NN /|NN Nest|NNP Patrolling|NNP /|NN /|NN Patrollers|NNP '|POS first|JJ job|NN of|IN the|DT day|NN :|: exit|NN the|DT nest|NN and|CC /|NN /|NN explore|VBP the|DT nest|NN mound|NN ,|, taking|VBG measurements|NNS .|. void|NN nestPatrol|NN (|( )|) {|( while|IN (|( photo|NN _|NN IP|NNP >|NN [|NN light|JJ at|IN sunrise|NN ]|NN &|CC &|CC temp|NN _|NN IP|NNP <|NN 52|CD degrees|NNS Celsius|NNP )|) {|( nestExit|NN (|( )|) ;|: /|NN /|NN Nest|NNP mounds|NNS are|VBP generally|RB up|IN to|TO 1|CD m|NN across|IN /|NN /|NN Thus|RB ,|, explore|VB in|IN a|DT 50|CD cm|NN radius|JJ (|( Gordon|NNP ,|, 6|CD )|) explore|VB (|( 50|CD ,|, 120|CD )|) ;|: [|NN schema|NN ]|NN {|( rotate|VB (|( nestOrient|NN (|( )|) )|) ;|: forCruz|NN (|( 5|CD )|) ;|: nestEnter|NN (|( )|) ;|: }|) wait|VBP a|DT short|JJ time|NN }|) /|NN /|NN end|NN if|IN }|) /|NN /|NN end|NN nestPatrol|NN /|NN /|NN Trail|NNP Patrolling|NNP /|NN /|NN Patrollers|NNP exit|NN nest|NN and|CC attempt|NN to|TO find|VB food|NN .|. Once|RB food|NN /|NN /|NN is|VBZ found|VBN ,|, they|PRP mark|VBP a|DT trail|NN leading|VBG back|RB to|TO it|PRP while|IN /|NN /|NN taking|VBG the|DT most|RBS efficient|JJ route|NN home|NN .|. void|NN trailPatrol|NN (|( )|) {|( while|IN (|( photo|NN _|NN IP|NNP >|NN [|NN light|JJ at|IN sunrise|NN ]|NN &|CC &|CC temp|NN _|NN IP|NNP <|NN 52|CD degrees|NNS Celsius|NNP )|) {|( nestExit|NN (|( )|) ;|: /|NN /|NN Explore|NNP no|RB further|RB than|IN about|IN 15|CD m|NN from|IN nest|NN ,|, for|IN no|DT /|NN /|NN more|JJR than|IN 20|CD minutes|NNS if|IN (|( food|NN _|NN IP|NNP >|NN some|DT low|JJ threshold|NN )|) {|( findFood|NN (|( )|) ;|: if|IN (|( food|NN _|NN detect|VB )|) {|( [|NN schema|NN ]|NN {|( rotate|VB (|( nestOrient|NN (|( )|) )|) ;|: forCruz|NN (|( 5|CD )|) ;|: spray|NN “|NN successful|JJ patroller|NN ”|NN pheromone|NN nestEnter|NN (|( )|) ;|: }|) wait|VBP a|DT short|JJ time|NN }|) }|) else|RB {|( explore|VB (|( 1500|CD ,|, 20|CD *|NN 60|CD )|) ;|: [|NN schema|NN ]|NN {|( rotate|VB (|( nestOrient|NN (|( )|) )|) ;|: forCruz|NN (|( 5|CD )|) ;|: nestEnter|NN (|( )|) ;|: }|) wait|VBP a|DT short|JJ time|NN }|) }|) /|NN /|NN end|NN if|IN }|) /|NN /|NN end|NN trailPatrol|NN 
For|IN the|DT task-switching|JJ in|IN the|DT patrolling|NN behavior|NN ,|, assume|VBP some|DT variable|JJ “|NN age|NN ”|NN that|IN Antie|NNP has|VBZ been|VBN keeping|VBG track|NN of|IN using|VBG the|DT CPU|NNP ’|NN s|VBZ clock|NN pulses|NNS to|TO track|VB the|DT time|NN since|IN its|PRP$ last|JJ bootup|NN .|. 
The|DT integers|NNS nestpatrol|NN _|NN age|NN and|CC trailpatrol|NN _|NN age|NN will|MD represent|VB the|DT ages|NNS at|IN which|WDT it|PRP is|VBZ appropriate|JJ to|TO switch|VB to|TO these|DT tasks|NNS .|. 

/|NN /|NN PATROLLING|NNP /|NN /|NN Task-switching|NNP hierarchy|NN for|IN the|DT two|CD types|NNS of|IN patrolling|NN void|NN patrol|NN (|( )|) {|( while|IN (|( age|NN >|NN nestpatrol|NN _|NN age|NN &|CC &|CC age|NN <|NN trailpatrol|NN _|NN age|NN )|) {|( nestPatrol|NN (|( )|) ;|: }|) while|IN (|( age|NN >|NN trailpatrol|NN _|NN age|NN &|CC &|CC age|NN <|NN forage|NN _|NN age|NN )|) {|( trailPatrol|NN (|( )|) ;|: }|) }|) 
The|DT final|JJ behavior|NN ,|, foraging|VBG ,|, will|MD involve|VB one|CD extra|JJ subroutine|NN that|WDT will|MD employ|VB an|DT algorithm|NN designed|VBN by|IN R.|NN 
Andrew|NNP Russell|NNP to|TO localize|NN an|DT object|VBP through|IN sand|NN based|VBN on|IN a|DT chemical|NN plume|NN .|. 
This|DT will|MD emulate|VB the|DT digging|NN that|IN foragers|NNS must|MD often|RB do|VB in|IN order|NN to|TO locate|VB seeds|NNS ,|, and|CC will|MD enable|VB Antie|NNP to|TO accurately|RB retrieve|VB seeds|NNS for|IN its|PRP$ host|NN nest|NN .|. 
This|DT algorithm|NN will|MD keep|VB track|NN of|IN the|DT last|JJ two|CD intensities|NNS of|IN the|DT desired|VBN chemical|NN input|NN and|CC compare|VB them|PRP .|. 
It|PRP would|MD also|RB keep|VB track|NN of|IN whether|IN the|DT last|JJ rotation|NN was|VBD clockwise|NN or|CC counter-clockwise|JJ .|. 
The|DT code|NN for|IN this|DT ,|, adapted|VBN from|IN Russell|NNP ’|NN s|VBZ paper|NN ,|, might|MD look|VB like|IN this|DT :|: 

/|NN /|NN Hex-path|NNP search|NN /|NN /|NN Localizes|NNP an|DT object|VBP through|IN sand|NN using|VBG chemical|NN detection|NN void|NN hexSearch|NN (|( )|) {|( double|JJ intense1|NN =|SYM inensity|NN at|IN n-1|NN ;|: double|JJ intense2|NN =|SYM intensity|NN at|IN n-2|NN ;|: while|IN (|( nothing|NN in|IN grippers|NNS )|) {|( if|IN (|( (|( (|( intense2|NN >|NN intense|JJ 1|CD )|) &|CC &|CC last|JJ rotation|NN was|VBD counterclockwise|NN )|) ||NN ||NN (|( (|( (|( intense2|NN <|NN intense1|NN )|) &|CC &|CC last|JJ rotation|NN was|VBD clockwise|NN )|) )|) {|( rotate|VB (|( -|: 60|CD )|) ;|: while|IN (|( [|NN short|JJ timer|NN ]|NN )|) {|( forCruz|NN (|( 5|CD )|) ;|: }|) }|) /|NN /|NN end|NN if|IN else|RB {|( rotate|VB (|( 60|CD )|) ;|: while|IN (|( [|NN short|JJ timer|NN ]|NN )|) {|( forCruz|NN (|( 5|CD )|) ;|: }|) /|NN /|NN end|NN while|IN }|) /|NN /|NN end|NN else|RB }|) /|NN /|NN end|NN while|IN }|) /|NN /|NN end|NN hexSearch|NN 
Foragers|NNP will|MD follow|VB trails|NNS marked|VBN by|IN patrollers|NNS to|TO their|PRP$ conclusion|NN before|IN collecting|VBG food|NN to|TO bring|VB back|RB to|TO the|DT nest|NN ,|, even|RB if|IN more|JJR tantalizing|VBG food|NN presents|VBZ itself|PRP in|IN their|PRP$ path|NN (|( Gordon|NNP ,|, 47|CD )|) .|. 
To|TO address|VB this|DT ,|, a|DT strict|JJ subsumption|NN hierarchy|NN will|MD make|VB sure|JJ that|IN the|DT foragers|NNS do|VBP not|RB stop|VB to|TO collect|VB food|NN too|RB soon|RB .|. 
The|DT code|NN might|MD look|VB like|IN this|DT :|: 

/|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN FORAGING|NNP /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN Main|NNP foraging|VBG behavior|NN function|NN .|. /|NN /|NN Foragers|NNP will|MD exit|VB the|DT nest|NN upon|IN activation|NN and|CC follow|VB /|NN /|NN a|DT trail|NN laid|VBN by|IN the|DT patrollers|NNS .|. Upon|IN completion|NN of|IN the|DT /|NN /|NN trail-following|JJ ,|, will|MD locate|VB and|CC grip|NN food|NN ,|, returning|VBG /|NN /|NN to|TO the|DT nest|NN .|. Boolean|NNP forage|NN _|NN today|NN represents|VBZ Antie|NNP ’|NN s|VBZ /|NN /|NN activation|NN status|NN for|IN each|DT day|NN once|RB it|PRP has|VBZ switched|VBN to|TO /|NN /|NN the|DT foraging|VBG behavior|NN .|. void|NN forage|NN (|( )|) {|( /|NN /|NN Wait|NN for|IN a|DT successful|JJ patroller|NN to|TO return|VB .|. if|IN (|( sucpat|NN _|NN detect|VB )|) forage|NN _|NN today|NN =|SYM true|JJ ;|: while|IN (|( forage|NN _|NN today|NN &|CC &|CC temp|NN _|NN IP|NNP <|NN 52|CD )|) {|( nestExit|NN (|( )|) ;|: trailFollow|NN (|( )|) ;|: /|NN /|NN Follow|VB successful|JJ patroller|NN trail|NN .|. /|NN /|NN Note|NN that|IN this|DT is|VBZ NOT|NNP a|DT schema|NN basis|NN ,|, which|WDT would|MD /|NN /|NN cause|VB Antie|NNP to|TO stop|VB and|CC retrieve|VB food|NN encountered|VBD en|IN /|NN /|NN route|NN .|. /|NN /|NN When|WRB end|NN of|IN plume|NN is|VBZ reached|VBN ,|, retrieve|VB food|NN .|. while|IN (|( !|. food|NN _|NN detect|VB )|) {|( /|NN /|NN while|IN food|NN has|VBZ not|RB yet|RB been|VBN found|VBN ,|, continue|VB searching|VBG /|NN /|NN and|CC identifying|VBG found|VBN objects|NNS hexSearch|NN (|( )|) ;|: objID|NN (|( )|) ;|: }|) /|NN /|NN Once|RB that|DT loop|NN has|VBZ been|VBN broken|VBN ,|, return|NN to|TO nest|NN [|NN schema|NN ]|NN {|( /|NN /|NN grip|NN food|NN and|CC return|NN to|TO nest|NN grip|NN (|( )|) ;|: rotate|VB (|( nestOrient|NN (|( )|) )|) ;|: forCruz|NN (|( 5|CD )|) ;|: nestEnter|NN (|( )|) ;|: }|) /|NN /|NN release|NN food|NN just|RB inside|IN nest|NN entrance|NN release|NN (|( )|) ;|: }|) /|NN /|NN end|NN while|IN }|) /|NN /|NN end|NN forage|NN 
Of|IN course|NN ,|, what|WP makes|VBZ Antie|NNP an|DT innovative|JJ robot|NN is|VBZ the|DT task-switching|JJ between|IN these|DT larger|JJR behaviors|NNS .|. 
Because|IN the|DT midden|NN work|NN behavior|NN is|VBZ Antie|NNP ’|NN s|VBZ initial|JJ default|NN behavior|NN ,|, I|PRP will|MD not|RB address|VB task|NN switching|VBG to|TO midden|NN work|NN .|. 
Workers|NNS probably|RB switch|VB to|TO patrolling|NN based|VBN on|IN their|PRP$ perceived|VBN life|NN expectancy|NN and|CC as|IN a|DT function|NN of|IN a|DT gene|NN whose|WP$ expression|NN changes|NNS between|IN young|JJ and|CC old|JJ ants|NNS ,|, and|CC this|DT is|VBZ easily|RB emulated|VBN using|VBG a|DT clock|NN pulse|NN counter|NN in|IN Antie|NNP ’|NN s|VBZ CPU|NNP that|WDT will|MD count|VB its|PRP$ “|NN age|NN ”|NN since|IN last|JJ boot|NN .|. 
To|TO remind|VB the|DT reader|NN ,|, this|DT technique|NN was|VBD implemented|VBN earlier|RBR in|IN this|DT proposal|NN to|TO create|VB the|DT limited|JJ task-switching|JJ between|IN nest|NN patrolling|NN and|CC trail|NN patrolling|NN .|. 
The|DT switch|NN from|IN patrolling|NN to|TO foraging|VBG has|VBZ been|VBN modeled|VBN as|IN a|DT function|NN of|IN successful|JJ foragers|NNS ’|NN returns|NNS with|IN great|JJ accuracy|NN by|IN Schafer|NNP ,|, et|CC al|NN (|( 2006|CD )|) ,|, and|CC evidence|NN from|IN experiments|NNS in|IN which|WDT successful|JJ foragers|NNS were|VBD removed|VBN before|IN reentry|NN to|TO the|DT nest|NN does|VBZ support|NN the|DT theory|NN that|IN returning|VBG successful|JJ foragers|NNS have|VBP an|DT effect|NN on|IN the|DT activation|NN of|IN new|JJ foragers|NNS (|( Gordon|NNP ,|, 2002|CD )|) .|. 
Activated|NNP foragers|NNS form|VBP a|DT queue|NN to|TO exit|VB the|DT nest|NN and|CC exit|NN at|IN a|DT steady|JJ rate|NN .|. 
According|VBG to|TO Schafer|NNP ’|NN s|VBZ ,|, et|CC al.|NN model|NN of|IN forager|NN activation|NN ,|, every|DT time|NN a|DT successful|JJ forager|NN returns|NNS and|CC no|DT foragers|NNS are|VBP currently|RB in|IN line|NN to|TO exit|VB ,|, a|DT fraction|NN (|( modeled|VBD at|IN 0.0035|CD )|) of|IN inactive|JJ foragers|NNS joins|VBZ the|DT queue|NN .|. 
For|IN the|DT purposes|NNS of|IN modeling|NN Antie|NNP ,|, I|PRP will|MD assume|VB that|IN the|DT switches|NNS between|IN these|DT behaviors|NNS are|VBP permanent|JJ ,|, irreversible|JJ and|CC partly|RB a|DT function|NN of|IN age|NN ,|, with|IN new|JJ foragers|NNS being|VBG activated|VBN by|IN returning|VBG successful|JJ foragers|NNS .|. 
The|DT code|NN to|TO model|VB this|DT task-switching|JJ might|MD look|VB something|NN like|IN this|DT :|: 

/|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN TASK-SWITCHING|NNP /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN /|NN Main|NNP function|NN of|IN Antie|NNP ’|NN s|VBZ software|NN .|. Examines|NNP the|DT task-|NN /|NN /|NN switching|VBG criteria|NNS and|CC determines|VBZ when|WRB Antie|NNP will|MD perform|VB /|NN /|NN what|WP behavior|NN .|. Int|NNP “|NN age|NN ”|NN is|VBZ an|DT integer|NN representing|VBG the|DT /|NN /|NN time|NN since|IN Antie|NNP ’|NN s|VBZ last|JJ boot|NN ,|, corresponding|JJ to|TO the|DT age|NN /|NN /|NN of|IN an|DT ant|NN being|VBG simulated|JJ .|. Int|NNP nestpatrol|NN _|NN age|NN refers|VBZ to|TO the|DT /|NN /|NN starting|VBG age|NN at|IN which|WDT Antie|NNP will|MD begin|VB to|TO nest|NN patrol|NN ;|: /|NN /|NN forage|NN _|NN age|NN refers|VBZ to|TO the|DT starting|VBG age|NN at|IN which|WDT Antie|NNP may|MD be|VB /|NN /|NN activated|VBN to|TO forage|NN .|. This|DT would|MD correspond|VB to|TO the|DT change|NN in|IN /|NN /|NN gene|NN expression|NN described|VBN by|IN Gordon|NNP (|( 2002|CD )|) .|. main|JJ (|( )|) {|( /|NN /|NN default|NN to|TO midden|NN work|NN while|IN (|( age|NN <|NN nestpatrol|NN _|NN age|NN )|) {|( midden|NN (|( )|) ;|: }|) /|NN /|NN end|NN while|IN /|NN /|NN switch|NN to|TO patrolling|NN behavior|NN based|VBN on|IN age|NN while|IN (|( nestpatrol|NN _|NN age|NN <|NN age|NN &|CC &|CC age|NN <|NN forage|NN _|NN ave|NN )|) {|( patrol|NN (|( )|) ;|: }|) /|NN /|NN end|NN while|IN /|NN /|NN switch|NN to|TO foraging|VBG as|IN a|DT function|NN of|IN time|NN ,|, but|CC /|NN /|NN remain|VB inactive|JJ until|IN stimulated|VBN by|IN returning|VBG /|NN /|NN successful|JJ foragers|NNS /|NN /|NN Assume|VB that|IN inactive|JJ foragers|NNS will|MD not|RB smell|NN different|JJ /|NN /|NN from|IN patrollers|NNS ,|, which|WDT was|VBD their|PRP$ last|JJ task|NN ,|, because|IN /|NN /|NN they|PRP have|VBP not|RB yet|RB spent|VBD sufficient|JJ time|NN in|IN the|DT sun|NN .|. if|IN (|( sucfor|NN _|NN detect|VB at|IN time|NN n-1|NN =|SYM =|SYM false|JJ &|CC &|CC sucfor|NN _|NN detect|VB at|IN time|NN n|NN =|SYM =|SYM 1|CD )|) {|( 0.0035|CD probability|NN :|: forage|NN _|NN active|JJ =|SYM true|JJ ;|: }|) while|IN (|( age|NN >|NN forage|NN _|NN age|NN &|CC &|CC forage|NN _|NN active|JJ )|) {|( forage|NN (|( )|) ;|: }|) }|) /|NN /|NN end|NN main|JJ 
Conclusion|NNP Antie|NNP will|MD be|VB a|DT fully|RB autonomous|JJ ,|, situated|VBN and|CC embodied|VBN agent|NN ,|, infiltrating|VBG a|DT red|JJ harvester|NN ant|NN colony|NN and|CC providing|VBG valuable|JJ information|NN not|RB only|RB about|IN the|DT hypothesized|VBN rules|NNS of|IN these|DT ants|NNS ’|NN behaviors|NNS and|CC their|PRP$ task-switching|JJ thresholds|NNS ,|, but|CC also|RB about|IN the|DT combination|NN of|IN complex|JJ behaviors|NNS into|IN a|DT single|JJ autonomous|JJ system|NN with|IN the|DT ability|NN to|TO switch|VB between|IN behaviors|NNS as|IN necessary|JJ .|. 
Biomimetic|NNP robots|NNS have|VBP long|RB been|VBN a|DT rich|JJ source|NN of|IN information|NN for|IN both|DT biologists|NNS and|CC robotics|NNS engineers|NNS ,|, and|CC complex|JJ robots|NNS that|WDT can|MD switch|VB tasks|NNS as|IN the|DT situation|NN demands|NNS and|CC communicate|VB information|NN about|IN current|JJ tasks|NNS could|MD be|VB useful|JJ for|IN further|JJ studies|NNS of|IN complex|JJ robot|NN behaviors|NNS as|RB well|RB as|IN for|IN the|DT obvious|JJ practical|JJ applications|NNS of|IN robot|NN swarms|NNS ,|, such|JJ as|IN on|IN the|DT battlefield|NN and|CC standard|JJ building|NN maintenance|NN .|. 

REFERENCES|NNP Braitenberg|NNP ,|, V.|NN Vehicles|NNPS :|: Experiments|NNS in|IN Synthetic|NNP Psychology|NNP .|. MIT|NNP Press|NNP :|: Cambridge|NNP ,|, MA|NNP ,|, 1984|CD .|. 
Gordon|NNP ,|, D.M.|NN ,|, &|CC Greene|NNP ,|, M.J.|NN Cuticular|NNP hydrocarbons|NNS inform|VB task|NN decisions|NNS .|. Nature|NNP 32|CD (|( 2003|CD )|) .|. 
Gordon|NNP ,|, D.M.|NN The|DT regulation|NN of|IN foraging|VBG activity|NN in|IN red|JJ harvester|NN ant|NN colonies|NNS .|. American|NNP Naturalist|NNP 159|CD ,|, 509|CD -|: 518|CD (|( 2002|CD )|) .|. 
Gordon|NNP ,|, Deborah|NNP .|. Ants|NNP at|IN Work|NN :|: How|WRB an|DT Insect|NNP Society|NNP is|VBZ Organized|NNP .|. Norton|NNP :|: New|NNP York|NNP ,|, NY|NNP ,|, 2000|CD .|. 
Gordon|NNP ,|, D.M.|NN The|DT organization|NN of|IN work|NN in|IN social|JJ insect|NN colonies|NNS .|. Nature|NNP 380|CD ,|, 121|CD -|: 124|CD (|( 1996|CD )|) .|. 
Greene|NNP ,|, M.J.|NN ,|, &|CC Gordon|NNP ,|, D.M.|NN Interaction|NNP rate|NN informs|VBZ harvester|NN ant|NN task|NN decisions|NNS .|. Behavioral|NNP Ecology|NNP :|: Advance|NNP Access|NNP ,|, published|VBD January|NNP 22|CD ,|, 2007|CD .|. 
Halloy|NNP ,|, J.|NN ,|, Sempo|NNP ,|, G.|NN ,|, Caprari|NNP ,|, G.|NN ,|, Rivault|NNP ,|, C.|NN ,|, Asadpour|NNP ,|, M.|NN ,|, Tache|NNP ,|, F.|NN ,|, Said|VBD ,|, I.|NN ,|, Durier|NNP ,|, V.|NN ,|, Canonge|NNP ,|, S.|NN ,|, Ame|NNP ,|, J.M.|NN ,|, Detrain|NNP ,|, C.|NN ,|, Correl|NNP ,|, N.|NN ,|, Matrinoli|NNP ,|, A.|NN ,|, Mondala|NNP ,|, F.|NN ,|, Siegwart|NNP ,|, R.|NN ,|, &|CC Deneubourg|NNP ,|, J.L.|NN Social|NNP integration|NN of|IN robots|NNS into|IN groups|NNS of|IN cockroaches|NNS to|TO control|VB self-organized|JJ choices|NNS .|. Science|NNP 318|CD ,|, 1155|CD -|: 1158|CD (|( 2007|CD )|) .|. 
Holldobler|NNP ,|, B.|NN ,|, &|CC Wilson|NNP ,|, E.O.|NN (|( 1990|CD )|) .|. The|DT ants|NNS .|. Berlin|NNP :|: Springer-|NNP Verlag|NNP .|. As|IN cited|VBD in|IN Webb|NNP ,|, B.|NN Robots|NNP ,|, crickets|NNS and|CC ants|NNS :|: models|NNS of|IN neural|NN control|NN of|IN chemotaxis|NNS and|CC phonotaxis|NNS .|. Neural|NNP Networks|NNP 11|CD ,|, 1479|CD -|: 1496|CD (|( 1998|CD )|) .|. 
Ingram|NNP ,|, K.K.|NN ,|, Oefner|NNP ,|, P.|NN ,|, &|CC Gordon|NNP ,|, D.M.|NN Task-specific|NNP expression|NN of|IN the|DT foraging|VBG gene|NN in|IN harvester|NN ants|NNS .|. Molecular|NNP Ecology|NNP 14|CD ,|, 813|CD -|: 818|CD (|( 2005|CD )|) .|. 
Ishida|NNP ,|, H.|NN ,|, Nakamoto|NNP ,|, T.|NN ,|, Moriizumi|NNP ,|, T.|NN ,|, Kikas|NNP ,|, T.|NN ,|, &|CC Janata|NNP ,|, J.|NN Biol|NNP .|. Bull|NNP 200|CD ,|, 222|CD -|: 226|CD (|( 2001|CD )|) .|. 
Labhart|NNP ,|, T.|NN ,|, &|CC Meyer|NNP ,|, E.P.|NN Neural|NNP mechanisms|NNS in|IN insect|NN navigation|NN :|: polarization|NN compass|NNS and|CC odometer|NN .|. Current|NNP Opinion|NNP in|IN Neurobiology|NNP 12|CD ,|, 707|CD -|: 714|CD (|( 2002|CD )|) .|. 
Lambrinos|NNP ,|, D.|NN ,|, Moller|NNP ,|, R.|NN ,|, Labhart|NNP ,|, T.|NN ,|, Pfeifer|NNP ,|, R.|NN ,|, &|CC Wehner|NNP ,|, Rudiger|NNP .|. A|DT mobile|JJ robot|NN employing|VBG insect|NN strategies|NNS for|IN navigation|NN .|. Robotics|NNP and|CC Autonomous|NNP Systems|NNPS 30|CD ,|, 39|CD -|: 64|CD (|( 2000|CD )|) .|. 
Moron|NNP ,|, D.|NN ,|, Witek|NNP ,|, M.|NN ,|, &|CC Woychiechowski|NNP ,|, M.|NN ,|, Division|NNP of|IN labor|NN among|IN workers|NNS with|IN different|JJ life|NN expectancy|NN in|IN the|DT ant|NN Myrmica|NNP scabrinodis|NNS .|. Association|NNP for|IN the|DT Study|NNP of|IN Animal|NNP Behavior|NNP (|( 2007|CD )|) ,|, doi|FW :|: 10.1016|CD /|NN j|NN .|. anbehav.2007.06|NN .005|CD .|. 
Peterson|NNP ,|, R.R.|NN ,|, Schubert|NNP ,|, D.W.|NN ,|, &|CC Cholakis|NNP ,|, P.N.|NN "|'' Tactile|NNP sensors|NNS for|IN robot|NN gripper|NN and|CC the|DT like|JJ .|. "|'' U.S.|NNP Patent|NNP 4|CD ,|, 492,949|CD .|. 8|CD January|NNP 1985|CD .|. 
Russell|NNP ,|, R.A.|NN Chemical|NNP source|NN location|NN and|CC the|DT RoboMole|NNP project|NN .|. Intelligent|NNP Robotics|NNP Research|NNP Centre|NNP ,|, Monash|NNP University|NNP ,|, Clayton|NNP ,|, Australia|NNP .|. Contact|NN :|: andy|NN .|. russell|NN @|IN eng|NN .|. monash|NN .|. edu|NN .|. au|NN 
Russel|NNP ,|, R.A.|NN ,|, Bab-|NNP Hadiashar|NNP ,|, A.|NN ,|, Shepherd|NNP ,|, R.L.|NN ,|, &|CC Wallace|NNP ,|, G.G.|NN A|DT comparison|NN of|IN reactive|JJ robot|NN chemotaxis|NNS algorithms|NNS .|. Robotics|NNP and|CC Autonomous|NNP Systems|NNPS 45|CD ,|, 83|CD -|: 97|CD (|( 2003|CD )|) .|. 
Schafer|NNP ,|, R.J.|NN ,|, Holmes|NNP ,|, S.|NN ,|, &|CC Gordon|NNP ,|, D.M.|NN Forager|NNP activation|NN and|CC food|NN availability|NN in|IN harvester|NN ants|NNS .|. Animal|NNP Behavior|NNP 71|CD ,|, 815|CD -|: 822|CD (|( 2006|CD )|) .|. 
Webb|NNP ,|, B.|NN Robots|NNP ,|, crickets|NNS and|CC ants|NNS :|: models|NNS of|IN neural|NN control|NN of|IN chemotaxis|NNS and|CC phonotaxis|NNS .|. Neural|NNP Networks|NNP 11|CD ,|, 1479|CD -|: 1496|CD (|( 1998|CD )|) .|. 
