powered by NetLogo
You must first choose the number of agents who are then located randomly on the square cellular lattice of dimensions 50 x 50. The number of agents cannot be greater than the spaces on the lattice that are available (2500=50 x 50 in this case) and as the density gets greater there is less space available for them to move.
The attributes of each agent that are defined by the two colours, Red and Green, are also chosen randomly but the population of agents is divide equally between these colours. Then you must choose the proportion of agents of the same attribute that any agent would want to be surrounded by as their immediate neighbours if they were happy to stay put. As this proportion gets less then there is more chance the agent will move to a vacant cell to escape its neighbours are of the wrong persuasion – the different attribute or in this case a different colour.
This is all there is. Having set all these parameters as sliders, then you need to click the setup button and then after the lattice fills with the agents, if you click the Go button the system examine the degree to which each neighbour is happy with its surrounding neighbours and the unravelling begins. Enjoy.
Read our chapter where this model is explained in the context of complexity theory.