Menu
See all NewsEngineering News
Education

Students Use NetLogo to Model Traffic, Religion

The Introduction to Agent-based Modeling course teaches students to create models of complex systems

A visitor listens to the music that graduate student Connor Bain (left) composed with NetLogo.A visitor listens to the music that graduate student Connor Bain (left) composed with NetLogo.

Few things are more frustrating than being stuck in stop-and-go traffic on a major highway. Drivers often ask themselves: Did I pick the right lane? Is that lane going faster than mine? Should I move over or stay put?

Jacob Bruce, a student in Northwestern’s spring 2016 Introduction to Agent-based Modeling course, might finally have an answer to those maddening questions. If the car next to you is moving faster than the car in front of you, then yes, switch lanes.

By using the agent-based programming language NetLogo, Bruce modeled multiple traffic jams to discover that the impatient, lane-switching driver actually does get ahead. The slowest driver, by far, was the one that picked a lane and stuck with it no matter what.

“Some drivers switch lanes as soon as they get impatient with the car in front of them,” said Bruce, a BS/MS student in electrical engineering. “It seems like more work, but they do end up going faster.”

Bruce’s model was just one of the course’s final projects presented Monday in the Willens Wing Atrium. Students used agent-based modeling to explore an array of questions, including how disease spreads, how lines move at a grocery store, and how superstitions proliferate.

Uri WilenskyThe annual course is taught by Uri Wilensky, professor of computer science and learning sciences, who created NetLogo, the most widely used agent-based programming language and modeling environment in the world. With NetLogo, users divide phenomena into different agents and give the agents properties and rules that control their behaviors and interactions. The user can then run a simulation, in which agents move and follow their rules to demonstrate how the system grows and changes over time.

Students spent half the quarter learning how to create agent-based models and the second half of the class building a model of their choice.

“It’s amazing how you can build a big, complex system using very simple rules,” Bruce said. “And you can literally watch how it all plays out. Instead of using guesswork, you can run the model to form more concrete assumptions.”

A graduate student in learning sciences, Connor Bain used NetLogo to create something a little less expected: his own music. By making each instrumentalist an agent, Bain created three drummers that could West African drumming music. He assigned simple rules to each drummer and enjoyed how the rhythm evolved.

“Many people don’t know that NetLogo comes with a sound extension pre-installed,” said Bain, who is advised by Wilensky. “I used it to watch and hear the drumming patterns evolve, split, and mutate over time.”

Naomi Yael Gutstein, a junior studying computer science, created a religion model, which demonstrated how people’s values change within Judaism. She assigned different agents various values, such as curiosity, openness, spirituality, and range of involvement. After running the model, she found that most people gravitated toward the extreme liberal or conservative ends of the religion as the middle shrunk — a trend that she believes can be applied to other religious and political groups.

“In computer science, sometimes we get so focused on the code that we lose sight of the human element,” Gutstein said. “Modeling human behavior allows us to play with that connection between computer science and humanity.”