MCB419 logo  




Homework

MCB 419 Homework 6 (Spring 2008)


Questions appearing in red are to be answered in the hw06.txt file.

When you've finished the assignment, email your responses to as a plain text file, and attach a copy of your project file. Email to mcb419@gmail.com with 'hw06' in the Subject line.

The homework is due by 11:59PM on Tue, Feb 26.


Edge-following behavior

EdgeFollow

EdgeFollow
Spatial boundaries (edges) can serve an informational cue.

In this project, you'll develop a 'brain' for a cockroach-inspired bot. The goal is to consume the food 'crumbs' that tend to collect near obstacles and near the edges of the arena. This week, the food bits do not generate any long-range visual or chemical cues, so kinesis and taxis strategies will not be useful for guiding the bot to the food. Instead, your bot will need to use tactile cues from its antennae to stay close to the edges, where it is more likely to encounter food bits.

Functionality already provided:

  • There are a total of 40 food crumbs. When the simulation is 'reset', the crumbs will be randomly redistributed near the edges. The 'scattering' algorithm takes some time to run...eventually all the crumbs will settle near an edge.
  • When the bot is 'reset', it will be placed either in the upper-left or the lower-right quadrant of the playfield. The heading will be randomized.
  • Whenever the bot's body overlaps a food crumb, the crumb is consumed and the 'crumb counter' is incremented by 1.
  • The simulation will stop automatically when the elapsed time reaches 70 seconds (same as last week).


Your assignment

Develop controller code that allows your bot to consume as many food crumbs as possible in 70 seconds (note: an average of 20 should be easy to obtain; 30 or more is good; above 35 is great). You are free to make the controller as complex as necessary to solve the task, subject to the following restrictions.

programming requirements/restrictions

  • You cannot use the bot's x, y, or heading variables in your controller code.
  • You cannot use the commands forward by and turn by directly in your code. Instead, you must set the bot's speed and turnAngle variables.
  • The doMovement script should only be called ONCE per clock tick.
  • Do not use the bounce function.

Questions

1. What strategy, if any, did you use to get your bot to explore both of the two central obstacles, as well as along the arena edges?

2. Does your bot have any sense of 'where it is' in the arena? If so, how did you implement it? If not, outline the steps that you think would be necessary to add this capability. Do you think a 'sense of place' would enhance foraging efficiency?
(remember: you're not allowed to access the bot's x, y, or heading variables directly, but you're free to create your own variables)

3. Does your bot rely on inputs from both antennae? What if your bot 'lost' one of its antennae? Would it still be able to forage efficiently?

4. For your final controller design, record the total number of crumbs collected on each of FOUR CONSECUTIVE simulation runs (70 s):
(note: report results from 4 consecutive runs, not your 4 best runs; an average of 20 should be easy to obtain; 30 or more is good; above 35 is great)

5. What were the most challenging aspects of developing an efficient foraging algorithm?

 


Copyright © Mark E. Nelson, University of Illinois at Urbana-Champaign, 2005-2008. All rights reserved.