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


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