Random Walks with code blocks for StarLogo Nova

Posted August 30, 2016 by turtle
Screen shot of SLNova code for wiggle walk

Original author

Project GUTS

Resource type

Content area

Use type

Tools

Tags

Summary of Directions (Note:  For complete instructions with screen shots of the relevant code blocks, see the Printable Instructions attached  below): 

  1. Start a new StarLogo Nova project with a single agent.
  2. Make the agent walk in a straight line.  Do people, molecules, etc move in straight lines? Why or why not?
  3. Now we want to add some wiggle to the walk. We can do this by using the ‘right degs’ or ‘left degs’ block before we move forward 1 step.
  4. Describe the Random function in terms of the roll of a single die. Use the random function to add some randomness to the agent’s walk.
  5. What happens when we tell the agent to walk now?  Track the movement of the agent over time using the ’pen down ‘block.

Challenge 1: make an almost straight line

Challenge 2: make crazy scribbles

Challenge 3: add a slider to set the amount of ‘wiggling’ of the turtles.

Discussion Questions:

  • What differences do you see?
  • How could the different wiggle sizes be used in a model?
  • When might it be useful to have different wiggle sizes?
Log in or register to view attachments and related links, and/or join the discussion