And we're back! So [were you able to figure out], were you able to figure out the three rules of behavior that govern this model? Let's take another look at our picture. So this is another murmuration of Starlings, as this bird, particular flock of birds is known. And it just amazes me how intricate this pattern of behavior can be, And [how], it really intrigues me how three little rules can create such complex dynamics. As what you saw in the model and as what you saw in the video earlier. So let's explore this a little more. So this model of bird behavior is often called the Boids model, was created by Craig Reynolds and published at a SIGGRAPH conference, which is a famous computer science graphics conference in 1987. And in fact the model and the representation of the bird flocking behavior that you saw helped Craig Reynolds win an Oscar, actually, in 1998. He won the Academy's scientific and technical award in recognition of his pioneering contribution to the development of three dimensional animation for motion picture production. And in fact the Boids model the flocking model was actually used in the 1992 feature film "Batman Returns" to generate the swarm of bats that march through the streets of Gotham city. Of course it wasn't quite the same model, you know based upon this model essentially And you know, let's take a step back. So this model actually can answer help you answer a number of different questions. It can help you answer how birds fly. It can answer or at least provide proof of existence as to why there may or may not be a central leader controlling the birds flocking. It can help you understand like do the birds actually need to know where they are every time in order to make their decision about how to move next. And we can explore whether or not you need a deterministic process to create these patterns of behavior. And whether or not the birds can act solely on local information or whether or not there needs to be global information driving the patterns of behavior So let's go back and explore the model a little bit and see which of these questions we can start to answer. So as I mentioned there are three basic rules to the flocking model. And if you think about what a flock is [right] It's a group of birds that stay close to each other they head roughly in the same direction and of course they don't crash into each other which is important. And in fact that basically describes the three set of rules to describe the flocking model. So each bird is making a decision based upon it's local neighborhood. It looks around to see who's in the neighborhood. That's controlled by the vision slider of the model, that says how far away from an individual bird I'm gonna look and in that group it identifies all the other birds and it calls those birds it's flock mates. Now in the basis of those flock mates, it tries to make certain decisions about how its going to move. One thing it does is it tries to align itself with the heading of those other birds. In other words it takes a step such that its heading is close to the mean heading of all the birds that are it's flock mates. This allows the birds to move roughly in the same direction. Now that would be great by itself, but it doesn't get the birds to kind of form close knit groups. So in fact to do that you need the cohere rule The cohere rule says, once you kind of aligned yourself with your neighbors around you, you should also take a small step in the direction that the center of that mass of birds is. That allows you to slowly keep the birds, a certain group of flock mates closer and closer together. Now of course you don't want them to get too close. So that's governed by the separate rule. The separate rule says that if you look like you are going to crash into another bird you should move away. And that rule basically over rides the other rules in many cases So if you put all these three rules together and we let the model run, we essentially get our beautiful flock patterns that we see. Now you can play around with this yourself you can see what would happen for instance if I were to turn off that align rule. For instance in this run of the simulation I've turned the align rule off. And if I speed the model a little bit so you can see what happens at the end. You can see that even as I run the model for very long periods of time, no flocks really ever appear. And that's because of course there's nothing that keeps the birds from moving in the same direction. So you just kind of fly over and around each other. This is even with the cohere rule of course turned on and the separate rule turned on. So they are not bumping into each other and they are trying to get closer to each other but because of the fact that they are not aligning their headings, they never really stay flock mates with the same group of individuals for very long. So we can turn the align rule back on. Back to 5 degrees which is where it was. And we can turn the cohere rule off. And now if we restart the model and we run it for a long period of time we actually do start to see some flocks. But unfortunately the these flocks are kind of spread out, they are going in different directions, they kind of separate and split apart and thats because nothing's keeping them coherently together at all within the system. Finally, we can turn the cohere rule back on and we can turn the separate rule off and restart the system, then run it for a long period of time. And again, we do get these flocks but these flocks are different from the kind of flocks we've seen before because they are kind of on top of each other the birds are basically running into each other. They don't have those elegant patterns of behavior that we see. And so the point of all this is of course that these three simple rules can in fact generate patterns of behavior that are very similar to what we see in real birds, but the problem is you have to have these rules aligned in very similar ways in order to get them to work out. Right. And it takes some time to think about what those rules might be. That in fact is what we are going to explore in the rest of this course as we talk about what are the simple rules that guide the behaviors and patterns of behavior that will exist around us, and how can we create models that show off those simple rules. Thanks!