In previous videos, we talked about how to build a formal model of complex problem solving in networks by combining a model for complex problems that we called NK Space and a model for individual agents that made some basic assumptions about how people navigate that NK Space, and how they use information from neighbors and their social network to make decisions as they're solving these problems. So what we're going to look at today, is how to use NetLogo to explore that model in two different network structures. And we call this a computational experiment because we take the same basic set up, the same model for NK Space, the same model for individual behavior and we look at it under two conditions. What we have set up right here is a ring network. So it's called a ring because every person is connected just to one node on either side of them. And we're also going to look at a very densely connected network in which every agent in the network is connected to nearly every other agent in the network. That looks like this. And you can see from here, from all the network ties, that everybody can observe what everybody else is doing. So before we get started, I just want to talk you through what we have set up here on the model. We have some variables for the NK Space. If you recall, we've got N, which is the number of features in the problem that agents are trying to solve. And we have K, which is a map of how complex the problem is. And if you recall from the previous videos, any K of 2 or higher, is considered a pretty complex problem because it means that you can't change any feature without impacting any other feature. You've got that interdependency that makes problems so difficult. We also have some network set of variables here. We can set the number of agents. I've just got it set to 40 now, but you get the same basic results if you use 10 agents or 100 agents. And we've got the degree which determines how agents are connected. So this is set to two, which means every agent has two neighbors. We're going to set it all the way up to 40 for a fully connected network. And what we've got to basically fixed that is a ring lattice. So if I set this just four here, you'll recognize this from some of our previous videos where we looked at different network structures. We also have over here, some plots that will let us watch what's going on in the model as it unfolds. Here, we track the average score. So this is the average quality for each solution that's being used by all the agents. And remember, even though they're all connected, they can all see what each other is doing. Each agent is coming up with their own solutions to the complex problem. And we have here a plot the tracks how many unique solutions that are in the network. Now, of course that's going to start off at the number of agents. But quickly as people start to observe what others are doing and adopt those solutions, we'll see that the number of unique solutions drops. Finally, we have our typical Setup, One Step and Go buttons that we have on nearly all the NetLogo models. There is one additional feature I want to mention here. This enables the NK Space analysis which allows us to know what the best score is and we map that to one and then the worst score is zero. You can turn this off if you want to play with different variables or if you have a very slow computer. If you set N or K very high, sometimes it can lock up a typical home computer. So just keep that in mind as you're trying this out for yourself. So we're going to start to look at the model now in the network. So we've got this ring lattice setup here. So we're going to just run at One Step, which means that in One Step, each agent either looked around their neighborhood to see if they could find a better solution or if they couldn't find a better solution, they explored the solution landscape to see if they could come up with a better solution on their own. And the colors here indicate the quality of the solution for each agent. We see here, over here, there are some pretty pale light red colors. Meaning, they have an okay solution. Over here we have a very dark colored node. That means, that node has a pretty good solution. And as we run this one more step, we're going to see that each agent on either side of that node is going to adopt that solution because it means it's better than the ones they're holding. And if you watch, as I hit this 'One Step' button, you can actually see that solution spread throughout the network. And as we do that, you can see the number of unique solutions drop as different agents start adopting the same solutions and the average score going up as this really great solution diffuses throughout the network. I'm going to hit the 'Go' button here just to run it all the way. And what it does, is it runs until every agent either has the same solution as all the neighbors around them and can't find any better solution. So that basically means, there's nothing more for them to do at this point and the model stops. We can see that the number of unique solutions has dropped to zero. And in this case, things are looking pretty good. This network found the best possible solution to their complex problem. So what we're going to do to see how the ring lattice performs in this model, we're just going to run it a few times to see what happens. So I'm just going to hit the 'Setup' button, then the 'Go' button, and I'll get out of the way. Now this time they got stuck about halfway. Now the reason they get stuck, is because everybody has the same solution, which means nobody else can learn anything from neighbors. But, they're on what we called a local maximum, which means they can't find any better solution just by changing one or two features of their problem. So at this point, we're going to set it up again and run it again and see what happens. Okay. Once again, the ring network found the best possible solution. We're just going to do that a couple more times to try to get a sense of whether it's really commence. So here again, they found about a middle of the road solution. That's actually pretty good. We're going to run it again. And once again, they found the best possible solution. So what we see is that the ring network, where there's not really a lot of communication, people can only talk to the agents on either side of them. The ring network tends to find really good solutions. Not every time, but quite frequently they find the best solution. So now what we're going to do, we're going to increase the degree. And remember, degree just refers to how many neighbors each node has. And we set it up to 38 which is nearly a fully connected network. You can see here it's very dense. Remember the lines indicate connections between nodes. We're going to run it again. We're going to see how the solution is. So now what we observe, first of all, is that the model finishes very quickly. Immediately the number of unique solutions in the network drops to zero. And that's because everybody adopts the best solution that they can see. And since everybody is connected to everybody, that means people are hurting together. Everybody in the network is adopting the same solution to the problem. And they're also getting stuck in a local maximum. But that has a very low score. So the fully connected network, very quickly, spreads information which can seem advantageous, but it leads the agents and the network to converge on a sub optimal solution very quickly and then they can't find anything better. Now, let's run this a few more times because it could have just been random chance. And we want to get a feel for how the fully connected network does. So okay, this time they found a pretty good solution. Again, you see that they converged on that shared solution very quickly. It's not the best, but it's pretty good. We're going to keep running it and see if the fully connected network ever finds the best possible solution. Once again, they converged on a local maximum very quickly. We are going to run it again. Here, they did find the best solution so it can happen sometimes with a fully connected network. And here again, they converged on a local maximum. That's not very good. Once again, they get stuck on a local maximum. That's not very good. And once again, they get stuck on the local maximum. That's not very good. So what we can see here, is that network structure makes a huge difference in how groups solve complex problems. And what's going on, is that a fully connected network even though it improves communication in the sense that it lets everybody talk to everybody and solutions can diffuse through the network very quickly, it also creates hurting dynamics that cause the group to converge on these local maximum where they get stuck. Every now and then, we saw the fully connected network find the best solution, but not nearly as frequently as the ring lattice. If you recall, what happened in the ring lattice was that, agents in the network were only connected to a few other neighbors. Which means that, people on this side of the network can be exploring one set of solutions while people on this side of the network, can be exploring another type of solution. That preserves the diversity within the network. In fact, it's because information transfer is slower, that this network does as well as it does. By slowing down the spread of information, we're preserving the diversity of solutions in the network so that the best solution can ultimately be found.