Hello. Welcome back to lecture about agent-based modeling. In the first section of this lecture we talked about basic concepts of agent-based modeling and now we want to talk about why agent-based modeling and what does agent-based modeling provide us. Which make it so interesting I would say as a public health expert or in any type of simulation that have complex nature. So let's just go through a list of major reasons to the question of why agent-based modeling? I want to start first with the idea of being able to have autonomous behavior. What does it mean is that, we can have agents that have individuality. Each agent can decide by its own and behave in its own way that the agent wants. You can think of a range of dom all the way to intelligent agents design. In dom phrase we can have agents that are only doing hard-wired encoded behaviors and on the intelligent part agents are able to learn, they're able to adapt. The point is that we could have a variety of autonomous behavior which leads us to the second point which is heterogeneity. We know that by nature human population and their behavior are heterogeneous. I'm different from the person next to me, or from my brother, my sister, my coworker. Agent-based model is naturally able to mirror the same heterogeneity in the simulation world. We are also able to have adaptive behavior. By adaptive behavior, I mean behavior that can be changed, is not only one type of behavior that agent keeps doing. Could be as simple as conditional behavior changes based on the location of the agent, based on the state of the agent. For example, if you remember our previous example of the school children, if you're at the school do this sort of activity, eat this type of food. It could be in term of learning and agents can learn from different experiences and different states that they've been. They can also learn from their interaction with other agents. Another way of having adaptive behavior is through imitation. Agents can imitate what other agents are doing. We also can have the idea of evolution. The whole population of agents can evolve. Even as the population evolve throughout time, we can have different rules and different procedures being run by the whole population. We also have the ability of incorporating geographical information. It's just a very powerful and important aspect of agent-based models. It's just so common to see many of agent-based model that come with some sort of a commercial map like Google Map or Bing Maps or Free and Open Maps. Most of agent-based modeling tools are all able to embed some GIS information. You can have a variety of complexity in your model, embedded in your model for example, different layers of geographical data, census data, population data. They are usually very rich at that from that angle. Similarly, we also have social network structures and the agents can be connected to each other. Sometimes we refer to those as links between the agents. This is referring to the same ideas in reality, it could be different relation for example friendship relations, family relations, co-workers relations and we could practically have any type of theory that we have in social network analysis including for example different network structures. For example, we can have structures, we can have networks that follow power law distribution. What does it mean is that there are a limited number of nodes, limited number of agents in our population that have much more connection to other agents. You could think of them as opinion leaders. Agent-based model rarely reach on that level. Moving forward we get to the probably most important aspect of every agent-based model, which is the idea of emergence and having a button up simulation. What make agent-based modeling really interesting is that when we use them for complex system, they are naturally so complex that we actually don't know what's going on in these systems. It's just very hard to model this type of behavior at the very top level. We know some stuff at the individual level, but nothing actually more. It's just the power of agent-based model that can help us to focus on the parts that we understand, and invest on the individual level, and make it as accurate as possible, and then see how the complexity arises and how the non-linearity actually that we see all the time in every human system out there then arises in agent-based population. As an example you can take evacuation. So just for a second think of a big room, a big hallway that there are like hundreds of people inside that room. Think of how you can simulate the way that if an emergency happened inside the room, how people will go outside. So probably the simple rule for every individual is just find the closest exit, move out as soon as you can. But you can also identify that it's very hard to predict the patterns of the population at the top level. For instance, if what happens, if you only close one of the exit doors, one of the doors is blocked, it's just a tiny modification of the whole system. But it dramatically changed the entire system, is not the same system and it's not the same pattern anymore. So I just want to also show you the idea of emergence because it's so important using a couple of examples. Two of the the last one predator prey model and traffic jam. Both of them come pre-installed with the NetLogo software. One of the tools that are available for developing agent-based model. So I'm going to show you one of them the predator prey. I'm going to ask you to go and do the same procedure to open and run the third element here which is traffic jams and see how actually the idea of emergence is happening. So this is the example that I was talking about, the Wolves Sheep Simple file that comes pre-installed with the NetLogo package, and I'm going to talk about this more in the tutorial later. But for now, what I just want to cover is that as you notice, we have two types of agents here, sheep and wolves. You can also think of grass as agents, but it doesn't matter. The logic behind this whole model as you can predict from any predator-prey model is that sheep just eat grass and gain energy, and they reproduce by that. As they move around, there is movement cause and they lose energy. After it comes below a certain threshold, they die. Similarly, wolf also gain energy from sheep and they also reproduce. They are connected to each other in this way, and there is a growth rates for grass. Let's just see what happens. For a second, I just want to ask you again to think of the patterns that you expect to see in terms of the population of sheep and wolves, and also the population of grass in terms of the number of this greenness scores. So do you expect that it just constantly go up or there is a slope that is just goes down? What do you expect for the number of those different agents? So let me just show you what happens, and let me just make it a bit slower. You can see that the number of sheeps just go down as the amount of grass actually becomes less and less. Let me just also make it faster, and as you expect, the number of sheep goes down, and then grass becomes more available, then sheep goes up. As the number of sheep goes up, the number of wolves also goes up. Let me just make it a bit faster. So you can see that it's not linear at all. That's the whole idea that I just showed you. Is just so non-linear. It's just very hard to predict, and it's just very counter-intuitive. As you can see, the amount of grass then goes up. Then as the number of sheep are at the down, very down, the number of wolves also decrease, and then again the pattern reversed and the number of sheep go up here. Let me just make it faster. You can see that it's just very non-linear pattern. It's very hard to predict. It's not a linear shape, is just very similar to a Sina Shape. That's exactly what my point of emergency. You see that actually although we have simple components of this model, but the pattern that you see at the top level is very complex. So another element that I just want to identify as the answer to the question of why agent-based models is thinking of agent-based models as computational mini-labs. In so many cases, it's not possible in terms of budget, in terms of time to go and do the same study in real world, it's not feasible. You can think of agent-based model are models as biological labs or chemistry labs, and it just makes some studies possible that they are not possible at all in a real environment. It just provide us with some in-silico as we tend to call it, simulation, computational simulation. For instance, just think of a big metropolitan area, big city that its mayor or the city council of one study, what would be the effects of adding an extra light rail train to the city. You can see that there is a huge investment involved and if you want to do it through a classic methods, some of them don't work, and the whole project can take multiple years in order to analyze over the outcome of the whole investment. But agent-based modeling could potentially answer many of these questions. For example, the questions like, how much the usage of public transportation would be changing? Or how much more physical activity would be seen in the whole city as the people go to trainers tops? Questions like that can be addressed and answered by the agent-based modeling technique. Also, agent-based modeling can be used for evaluating particular interventions. For instance, if you want to have intervention and you want to identify what agents or what individuals in the population, for example a city, what individuals are the best candidates for targeting so that they will have the highest amount of diffusion? For example, if intervention is about obesity, what would be the best targets to have so that the diffusion of your intervention is highest throughout the whole network? That could be answered for by agent-based modeling probably. You can also use agent-based modeling for studying outcomes of different policies. Hot topic that you keep hearing these days is just having tags on unhealthy food. For example, SSB tax that refers to sugar-sweetened beverages. It just seems a very hard question to answer, whether it's just a good idea to add tags, whether it's effective or not. By using agent-based modeling, we can address some of the concerns. Moving forward, agent-based modeling can also help us by guiding us for data collection. It might be not only for simulating, but also for just guidance of what do we need to do. For example, in our schoolchildren example, agent-based modeling can be used to identify which children at school we need to identify for whole intervention. So agent-based modeling can be used for determining what individuals should be used for data collection at the very beginning level. One other very powerful aspect of agent-based models that is probably by their reach and embedded graphical representation is just the ability to communicate. Agent-based models are very good for training. For example, other people public audience or practitioners. They can be also used very effectively to communicate to policymakers, different stake holders to just let them understand what's the dynamic of the whole system. In the area of public health that is probably the more interesting part for us now, agent-based models are able to capture effects of complex social interactions, and they are able to address individual behaviors. For example, for the first case, we are referring to capture effects of complex social interactions. We might have a question that, what happened if we have a school closure? What happens to availability of health workers during an epidemic? Agent-based modeling can be used to simulate the same situation. For addressing individual behaviors, agent-based modeling can be used for instance, if you have a question like, what would be the effect of having obese friends? What would be their effect on me, agent-based model can be used to answer that. The other question that, agent-based model can be used for that is they can capture effects of individually targeted interventions. For example, simulating vaccinating family members. I just want to also show you an example of a real agent-based model, that has been proposed for one of the important areas in the public health domain, an example of simulation of smoking. Here you can see the overall architecture of the agent-based model that was designed, in that specific agent-based model, the question that this agent-based model was trying to answer was that, how much social norms are affecting the smoking behavior of people. When for example, a smoke-free initiative starts at the campus, inside the city or any area of interest. Here you can see that classic theories of social sciences that norms are first identified, and then people adapt to them and then they go to compliance phase, is mapped to the same ideas in a smoking, as the number of cigarettes change and then at the end probably we have quitting, and in order to make it possible to actually build an agent-based model, a numerical range is mapped to the same idea, such that two thresholds are determining where actually the agent is located. Then a set of factors are defined for the agents including personal factors and social elements are also considered, and I've been trying to identify those important aspects of environment that might affect the smoking behavior of agents. So you can see that, a very hard problem in public health, could be probably address by agent-based modeling, and by that problem I mean, simulating a smoking behaviors that we know it's just very hard. It's just make it harder when we think of the idea of addiction. In obesity, I just hope that what you learned so far during this course, is that we just hopefully learned that obesity is not a matter of only one cause or one factor. It's not only a matter of a food intake or physical activity or healthy or unhealthy food or tags or I don't know it's not a matter of only one of them. It's just a complex combination of all of them. By this fairly long introduction, I was trying to convince you hopefully that agent-based modeling can be a very powerful candidate and tool for tackling these sort of problems. But I also want to recognize some of the challenges that do exist regarding to agent-based modeling usage, and first one is defining roles. It might seem that, building and developing an agent-based model is fairly easy I would say, you can spend a short amount of time, learn how to build an agent-based model. In some cases you don't even need to know coding or programming. You can just drag and drop some elements in a environment and you have agent-based model. But, the tricky part is that, you need to have a very good understanding of your system. For example, if obesity is studied, you need to know some biological aspects of a human body. How much energy intake would be converted to extra fat. You need to know the literature for example. So you need to have some expertise in your system, so it could be challenging, and an other side, some human behaviors are very hard to quantify, because they are soft elements, just a very hard to contrast them. The other challenge is data availability. Sometimes we don't have the data for parameters that we need. Probably some way of tackling those issues is just by idea of calibration. Sometimes in agent-based model we tried to change the parameter values, such that at the end we see like realistic patterns, which brings us to the next point, which is sensitivity. It's just also very common that most of the time when you see a rigorous study that has been done by using of agent-based modeling, you also see that there is a sensitivity analysis just next to that.. Also to make sure that you have the right model and the model is right, we need to verify and validate our model, which is probably similar to any other type of modeling technique. For doing that, probably the easiest and best way is just comparing that the whole simulation to real data. But in some cases is not available, it could be like logical check. For example, in schoolchildren case, we shouldn't have a school kids or agents that go to the school during the night time. If you have that, it just shows that there is problem with our system. So by logical check, I mean these type of checks or system.