Here’s a brief note on NetLogo, which can be described as a multi-agent programmable modelling environment. It is widely used by teachers, students and researchers to model and study complex systems by creating simulations and ‘playing’ with them.
Optimisation is inherent in nature. We have seen the key aspects of optimisation in previous editions of OSFY. Another interesting phenomenon is called emergent behaviour, which could be natural or artificial. Swarms of ants, schools of fish, flocks of birds, etc, are some of the natural examples of emergent behaviour. The increased complexity of routing air traffic is considered to be artificial emergent behaviour. Studying these complex behaviours using numerical techniques is not easy. Hence, an agent based simulation platform called NetLogo is used to understand such phenomena.
Introducing NetLogo
NetLogo is GNU GPL licensed free software, designed by Uri Wilensky, director of Northwestern University, in 1999. It is a JVM based cross-platform multi-agent simulation platform. NetLogo doesn’t require coding knowledge or any other prerequisites. It is designed for a broad audience. So anyone from secondary school students to graduates can make use of this software to study their field of interest.
Installation
Installation of NetLogo in Ubuntu 14.04 is easy. First, download the NetLogo package from http://ccl.northwestern.edu/netlogo/. I have a 64-bit Linux computer, so I have downloaded the package accordingly. For NetLogo version 6.0.1, memory size of 197 MB is required. The downloaded file is compressed and must be extracted in the home directory (preferably in the opt folder). Once extracted, you are ready to use NetLogo on your computer. In the NetLogo directory, double-click on the NetLogo executable to open the GUI of the software.
Particle swarm optimisation (PSO) in NetLogo
PSO is a nature inspired swarming theory based algorithm invented by Kennedy and Eberhart in the 1990s. Flocks of birds migrating from place to place in search of food and shelter are the basis for this algorithm. Fortunately, NetLogo has inbuilt model libraries where many models like PSO are readily available. The model demonstrates how the true optimum value 1 is found for various parameter settings like landscape smoothness (structure of valleys and hills), population size (number of birds), etc.
The NetLogo interface is shown in Figure 1. Figure 3 shows the PSO model file available in its library. Figure 2 shows the PSO finding its true value in 30 ticks. Figure 4 shows the same attained in 22 ticks. Note that fewer ticks are observed for a population of 10. Figures 5 and 6 show the above-mentioned initial and final results.