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 )_) ._. 
