![]() |
|
HomeworkMCB 419 Homework 1 (Spring 2009)Your first NetLogo simulation! Your main task for this assignment is to create a simple simulation similar to the one found on the 'Demo' tab. You will write Netlogo code to create a variable number of agents and have them execute one of two simple movement patterns ('circle' or 'wander'). If you have time and want an extra challenge, you can add a third movement pattern ('square'), which is a bit trickier to implement. Specific guidelines for the simulation can be found on the 'Specs' tab. After creating and debugging your simulation, you will use it to answer some questions found on the 'Assignment' tab, along with some questions about this week's readings. When you've finished the assignment, email your responses and a copy of your NetLogo simulation file to mcb419@gmail.com with 'hw01' in the Subject line. Here is a NetLogo file that you can download to help get you started: hw01_template.nlogo This assignment is due by 11:59PM (midnight) on Tue, Jan 27. Specific Design Requirements/Guidelinesbuilding the user interface
button functionality
bot behaviors
(Note: 'square' is a bit trickier to implement than 'circle' or 'wander'; you'll need to explore the Netlogo documentation to find the additional functions that you need; if you can't figure it out, don't worry... it's truly optional.) AssignmentYou can access a copy of the assignment file HERE, or copy and paste from the text below.
======================================================================
MCB 419 Homework 1 (Spring 2009)
When you've finished answering all the questions, email a copy
of this file (hw01.txt) with your responses as PLAIN TEXT in
the main body of the email message, and attach a copy of your
Netlogo simulation file (e.g. hw01.nlogo).
Email to mcb419@gmail.com with 'hw01' in the Subject line.
======================================================================
1. When a bot is 'wandering', approximately how many ticks does
it take to move across the entire world (from one edge to the
opposite edge?)
2. a) If a bot turns by 10 degrees on each tick when it is 'circling',
how many ticks are required to complete a full circle?
b) if the bot moves forward by 1 unit on each tick, how far would
it travel in the time needed to complete a full circle?
c) what is the predicted diameter of the resulting circle?
d) does that agree with the diameter that you observe when you
run the simulation?
3. Which of the movement patterns that you implemented is most
efficient at 'exploring' the world? Why?
4. Modify the 'wander' behavior so that the bot turns by a random
angle between -180 and +180 on each tick. Rerun the simulation
for a single bot. How does the behavior change, relative to the
original 'wander' behavior?
5. Modify the 'wander' behavior so that the bot turns by a random
angle between -5 and +20 on each tick. Describe the behavior.
6. Change the 'wander' behavior back to it's original values (random
angle between -10 and +10). Click the 'Settings...' button and
UNCHECK 'World wraps horizontally' and 'World wraps vertically'.
Rerun the simulation. Describe the behavior.
7. Set the num-bots slider to 1, click 'setup', then click 'go'.
While the simulation is running, change the value of the
'num-bots' slider. What happens? Change the value of the
'behavior' chooser... what happens? Why does the simulation
respond to one user-interface element, but not the other?
8. Hawking thinks that continued evolution of intelligence may
eventually shift from biological life forms to self-replicating
electromechanical "life" forms. What do you think of that idea?
9. According to the article by Crist, what observations prompted
Darwin to conclude that earthworms exhibit some degree of
intelligence? How does this fit with your own personal ideas
about what qualifies as intelligence? Are worms 'smart'?
======================================================================
END OF THE ASSIGNMENT
======================================================================
SolutionThis is just one possible solution. You can download the full NetLogo file (hw01_solution.nlogo), or just look at the code below. |