Hello, this is Tak Igusa again. And here I'm going to show how agent this small link can be used to work with fairly complicated networks. In the next few slides I'm going to show some of the properties of these networks. There will also be some code associated with these networks in the model. And, while this not about coding, I thought I would just show you that there is code associated with each property of the network. Here on this slide, we see parents and those parents are coupled through the parent network as shown here between agent one and agent two. Next, I show how parents can be used to generate children. In this case, we see that the parents here, agents one and two, are linked to the child, as shown here as agent five. On this slide, I show additional network elements. Here we include parent two to the child five, and we also allow child five to become a parent as well, pairing with ages six. Next, I will show the control panel for the agent based model, and then I will actually demonstrate the usage of the model. So the control panel is very basic, and I will go through each buttons starting from the top. First is the setup button which initializes the agent based model. The linear model is just for the visualization to spread the agents out so that the network can be seen more easily. The slider designated as num-turtles controls the number of agents that will be in the model. Here, it is shown to be set at 53 agents. Next is the button initialize-health-habits. These are the same health habits that we discussed in an earlier lecture. We have only two choices, healthy behaviors or unhealthy behaviors. Beneath the initialize health habits button are controls that actually controls the habits of each agent in the model. The toggle healthy button will toggle between healthy and unhealthy habits. And the two toggle button designates which agent you wish to control. This will become more clear when I demonstrate the model. Next is the go button. This is a button which generates the rewards for each agent and assigns healthy or unhealthy behaviors according to the behavior that gives the most reward points. Underneath the goal button is the percent initially healthy slider. And this gives the initial percentage of agents who are adopting healthy habits. And the final button choose a switch between 1 and 0. 1 designates an obesogenic environment, and 0 designates the non-obesogenic environment. So I will show a demonstration of the model next. In the assignments, you will see a link to this model shown on the screen. So we will go through all of the buttons on the control panel. First, you will setup the model. So you will see agents in the model and the number of the agents will be the same as indicated by the num-turtles slider. Before I select the initialize health habits button, let's consider the percent of initially healthy agents and also the environment. So we will choose for this example, the non-obesogenic environment, and a percent, initially healthy, of 20%. Now, I'm ready to initialize the model. So you see here the background representing the non-obesigenic environment. And also the 53 agents of which about 20% are healthy. Next, we will run the model and then the agents will adapt their behaviors according to the reward structure described in the previous lecture. To do this we just have to select to the go button. You may have notice that the number of agents adopting unhealthy habits has decreased. This is because of the dual effect of the Nano BC Genetic Environment, and also because of the peer effect. If I hit the go button again then we should expect the number of agents with unhealthy eating habit to decrease even further, and that is indeed the case. And this is primarily because of the peer effect. So you see here that there are only two agents remaining that have unhealthy eating habits. And they are surrounded by peers all with healthy eating habits. So again, the peer effect. They dominate and cause these two agents to change and adopt healthy eating habits after I push the go button one more time. Now, I will rerun the model, but this time we will try some of the other buttons in our control panel. For sake of clarity, let's reduce the number of turtles to 10, and then we will set up an environment that is obesogenic and 50% healthy. So now, I will hit the setup button to initialize the model with these new parameters. Next, I will set the initialize-health-habits button. Then, to make the model slightly more easier to see, I will hit the layout button. I hit the layout button twice, now you see that the agents adjust themselves so that they are slightly more spread apart, but the network structure is still the same. Next I will use the toggle healthy button and I will change some of the behaviors of these agents. So for example, agent two is currently healthy and I will change that behavior to unhealthy. And similarly, I will change the agent five behavior from unhealthy to healthy. So first, we'll work on agent two. Next, I will work on agent 5. Now I will run the model using this set of ten agents, by hitting the go button. So here you will see that the peer effect seems to have a dominating influence, even though the agents are embedded in an obesogenic environment. And we would expect that when I hit the go button one more time that last agent on the top, agent three, will change from unhealthy to healthy behavior. You will be able to manipulate this model and try different parameters on your own through the assignments, and in this assignments the link to this model will be shown.