How Does Netlogo Work

NetLogo uses the ask command to give commands to turtles, patches, and links. All code to be run by turtles must be located in a turtle “context”. You can establish a turtle context in any of three ways: In a button, by choosing “Turtles” from the popup menu.

forward number. The turtle moves forward by number steps, one step at a time. (If number is negative, the turtle moves backward.) fd 10 is equivalent to repeat 10 [ jump 1 ] .

  1. You can use the create-<breed> format to create new turtles of a specific custom breed such as create-dogs 100 or create-buildings 5 [ set color gray ] .
  2. Only the observer can create new turtles. You cannot use this primitive within an ask primitive.
David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest