NetLogo for the Web

NetLogo is an interesting and unique computing language, because unlike most other languages, it was created with education in mind. Early in its evolution, a precursor to NetLogo, called Logo, was used to control a robotic turtle that dragged a pen over paper to create an image on the paper based on predetermined steps. 

NetLogo retained this idea and language, and so the main objects in NetLogo are “turtles” that now live in a virtual world. The turtle and its world are displayed to the user by the NetLogo software’s GUI. 

Because of these features, NetLogo is well-suited for student play, physical simulations, and generating images. Because they often model scientific principles, complete NetLogo implementations are often referred to as “models.” In our courses, we’ll utilized features of NetLogoWeb, an online version of NetLogo, to allow NetLogo models to be embedded right here on Code For Your Kids and executed in real time. While their features do vary slightly, NetLogo and NetLogoWeb are identical for our purposes, so we’ll still refer to these web-based programs as “NetLogo models.” In later courses, we’ll describe how teachers can get started using NetLogo off of the web, too. 


In the NetLogo model below, push the “press to start” button. Then use the other buttons and sliders to control the turtle in the virtual world. Examine the Command Center, NetLogo Code, and Model Info tabs.

Before marking this module complete, try using the buttons and sliders to draw a square with side lengths of 8 units using the turtle. Can you make other polygons? What about a circle?