[MUSIC] Let's have a look at another model from our simulation software called NetLogo. NetLogo is a software that's freely accessible, developed by Uri Wilensky in Northwestern University and you can download and look at it here. And I want to walk you through another very seminal model, which is called Sugarscape. And Sugarscape is described in this very important book, a pioneering book, that got many people hooked on the idea of ageless modeling by Joshua Epstein and Robert Axtell called Growing Artificial Societies. So, all right, let's check our Sugarscape. So we start by opening up the models library, which is here in the files. And in the models library, there are a bunch of models. To explore on the social science we find another folder here called sugarscape, okay, so let's go to this one. So it's part of NetLogo. And, well, you see the interface here, and we can do set up, but we don't really know what's going on. So what you do is you go to the second tab. So, there are three windows, there are three tabs. Interface, that's what we see here, that where we explore the simulation. Information and code. But in code you can actually change the coordinates. It's a pretty readable code. There are explanations here and here says set color to red, set shape to circle, okay? So it's really, it's just like English language actually the code. Very similar to that. So, but we first want to know what's going on so you go to this info tab to the second tab and we can read what's going on. What is it? This first model in the NetLogo Sugascape suite implements Epstein & Axtell's Sugarscape Immediate Growback model, as described in chapter two of their book Growing Artificial Societies, Science from the Bottom Up. It simulates a population with limited, spatially distributed resources available. That's a reasonable assumption. So there are limited spatial distributed resources available. For example, if you look for resources in agricultural society or you look for minerals, for oil, and you see how that actually then influences the society that emerges from that, how it works. Each patch contains some sugar, the maximum amount of which is predetermined. At each tick, okay, so we have patches and we have tick. So the patches are basically the blocks of the environment. And the ticks is the time that keeps on going. So tick is a period. Time and a patch is a space, location and space. So each of them has sugar and what did it say? At each tick, each patch grows back fully to have the maximum amount of sugar which is predetermined. The amount of sugar a patch currently contains is indicated by its color, the darker the yellow, the more sugar. Okay, so we have actually darker yellow up here and lower yellow here. So we basically have two hills of sugar, you can think of these as two hills, right? With more sugar, two sugar hills here, two sugarscapes. At setup, agents are placed at random within the world. Each agent can only see a certain distance horizontally and vertically. At each tick each agent will move to the nearest unoccupied location within their vision range with the most sugar. Okay, so each agent can see horizontally and vertically and then moves to the next location which has the most sugar and collects all the sugar that's there. If this current location has as much or more sugar than any unoccupied location it can see, it will stay put. That makes sense. So they're basically sugar maximizing agents and wherever they can see they go if there's more sugar, and if not, they just keep on staying there. Agents also use and thus lose a certain amount of sugar each tick, each period of time, based on their metabolism rate. If an agent runs out of sugar, it dies. That's also reasonable. How to use it. Set the initial population slider before pressing setup. This determines the number of agents in the world. Initial populations slider, okay, so initial population we have 400 agents here. Before we press set up and then we press set up, we could probably change that to 1,000 agents who might be a little much, so let's keep it at 400 that's what they recommend at set up and start with that. Proceeded to populate the world with agents and import the sugar map data. Go will run the simulation continuously, while go once will run one tick. Okay, so let's see what happens. We go once, we see the agents moving and we go once again and we see the agents moving again. And they seem to be moving towards the sugar, which makes sense. Some of them already stay put, because they're happy with the sugar that they have and they cannot see any more sugar. Well, we see some things. We see the population, we started off with 400 it's actually decreasing while some of them die on the way. And if we keep on going we can also accelerate that and we keep on going a little fast, we go 100, 120, 140 ticks. So, we can automate that. We see, well, the population will stabilize at about 250. And we see here is how the wealth is distributed within these 250, right? [LAUGH] So, all the wealth is basically sugar, the amount of sugar that each one has. And we see there's quite an amount of agents with little sugar and very few agents with a lot of sugar. So here on the horizontal xx, you can see the amount of sugar and upwards vertically is the number of agents. And you can see kind of like four income groups, right? Why do you think these four income groups emerged in our model? Okay, these are these four terraces, right? So nobody moves here anymore. So these, they're kind of like stuck at the edge here that means they go to the most sugar. They cannot see further, they don't actually, they won't move further because that's how far they get. And then they're happy here. And we have these four terraces one, two, three, four. And that's where they find their stable space. All right, let's explore it a little bit more and the information that says what else to do. The visualization chooser gives different visualization options and may be changed while the go button is pressed, okay. So the visualization chooser, the visualization chooser is here. So we can start again and we can visualize the ages by vision. So they have different visions, and what does it mean? It means, the agents with the longest vision will be darkest. Similarly, color agents by metabolism, the ones with the lowest metabolism will be darkest. That means the ones that can see furthest and the ones that need less sugar, who are highly efficient agents, high productive sugar converting machines, they are darker. So by vision you can see some of them are darker and some of them are lighter. And by metabolism and the same thing if you do the set up. And that's one of the benefits of agent based modeling, that each agent can have different characteristics we don't need to give them all of them one average characteristics, we can have this diversity which leads to interesting, emergent phenomena just like the diversity we have similar in real societies, okay. So let's run it again, we go once and we see our population decreasing. We see also that actually the ones who disappear are more the lighter ones. They're the ones that don't have a great vision because well, now a lot of them disappeared, because well, they kind of like get stuck, they cannot see further with a little, yeah, they're pretty blind and unfortunately, that's how far they get. We again have our wealth distribution emerging, we can do the same for metabolism to our set up, and we see as well the lighter ones are the ones that have to go first. Our population is decreasing here. And interesting, our average vision is actually increasing. So at the beginning we have an average vision of 3.5, and that is increasing. Try to watch that the same the metabolism, we have a metabolism of 2.6 or 7 at the beginning. It's decreasing. Right now at 2.2 after 13 periods of times, if we keep on going, yes, we see the vision increasing slightly, and the metabolism decreasing. What's happening here? It's evolution. [LAUGH] We evolve, our society it's the survival of the fittest, the ones with the best vision and with the lowest metabolism survive. And on average, as the inefficient agents kind of get moved out of the market, what we have is on average, a higher vision. So we started with 3.5 and end with 3.8, 3.9 of vision and we started with the metabolism of 2.7, and we ended with 2. So, yes, on average, our society gets fitter, we evolve our society.