MCB 419 Homework 8 (Spring 2009)

Honeybee foraging

In this assignment, you'll explore a honeybee-inspired scenario in which ASSOCIATIVE LEARNING can be used to improve foraging efficiency.

To complete this assignment, you will need to modify code in the following template file: hw08_template.nlogo

Answer the questions found on the 'Assignment' tab and email your responses along with a copy of the netlogo file to mcb419@gmail.com with 'hw08' in the Subject line.

This assignment is due by 11:59PM (midnight) on Tue, Apr 7.

Specific Design Requirements/Guidelines

Controller design hints

Your bee should select the color of the next flower that it wants to visit, based on its experience with the nectar rewards from different flower colors. This will require that you implement a simple form of associative learning. You don't necessarily need to use the full mathematical expressions that we discussed in class, as long as you implement a color-selection model that is based on experience.

Bot properties

Your bot has an internal variable called chosen-color that can be set to orange or blue. The bee will automatically fly to the nearest flower of the chosen color. You do not need to implement any form of taxis to approach the flower (there are no left and right color sensors in this model.)

The bot has an 'energy' variable that accumulates the nectar rewards from all the flowers it has visited. NOTE THAT IN THIS SIMULATION, NECTAR REWARDS CAN HAVE NEGATIVE VALUES.


You cannot use a timer to predict when the rewards will change. In this simulation, the switch occurs every 100 ticks, but you should not use this information directly in your bee controller code. Instead, your bee should sample nectar rewards from different flowers to decide which color is best at any particular point in time.


You can access a copy of the assignment file HERE, or copy and paste from the text below.

MCB 419 Homework 8 (Spring 2009)

When you've finished answering all the questions, email a copy 
of this file (hw08.txt) along with your NetLogo file (hw08.nlogo)


1. For the 'orange', 'blue', and 'random' controllers, record the
bee's energy at the end of 600 ticks on 5 consecutive trials and
report the average value across these 5 trials for each controller.

2. Following the guidelines on the 'specs' tab, implement a 
learning algorithm that allows the bee to associate flower color
with expected nectar reward. Tune your code to maximize the 
energy collected per trial. For your final controller design, 
record the bee's energy at the end of 600 ticks on 5 consecutive 
trials and report the average value across these 5 trials. 
(Target value should be an average energy greater than 400.)

3. Briefly describe how you implemented the 'learning' and 
'memory' components of your algorithm. 

4. In this assignment you (hopefully) demonstrated that in a
changing environment, a controller design that incorporates
learning and memory can achieve better performance than a
'hardwired' design.  Beyond improving foraging efficiency, 
in what other ways could 'learning and memory' capabilities
provide a competitive advantage in the real world?



This is just one possible solution. You can download the full NetLogo file (hw08_solution.nlogo), or just look at the code below.