We're now going to move on to a different kind of topic in Cognitive Science. I think it's an important area of cognitive science but it's one that depending on what kind of approach to cognitive science you're hearing, it doesn't always come up in the textbooks. Often, cognitive science is modeled on an individual basis. That is the idea is, you have the lone human mind thinking about solving a problem, or making a judgment, or identifying an image. What you're trying to do is get some computational insight, on how that process occurs. There are different kinds of cognitive processes that don't involve the operation of a single human mind, but the operation of two or more human minds making decisions in the presence of each other. In later discussion, we're going to be talking about an area of study called Game Theory, which explores many ways in which people or thinking agents can make decisions in the presence of other deciding agents. But what I want to show you today is one particular example. This is just a beautiful example, have an object to think with. Getting you starting to think about what happens when thinking agents are making decisions on mass. In this case, in fairly large numbers, not just two or three, but in fairly large numbers, and how the results of that kind of thinking can be quite interesting and worth modeling computationally in their own way. Basically, what I'm just going to do is go through this example, and ask you to think about what this example means and what kinds of lessons you can and can't draw from. The example I'm going to show is one from the Game theorist and Economist, Thomas Schelling. Actually he won the Nobel Prize in Economics some years ago. This is from a terrific book that he wrote called Micromotives and Macrobehavior. You'll see why a title like that is appropriate to the example that we're going to be talking about because people have individual motives. The result is a massive multi-person behavior that might not even be reflective of the motives of the individuals involved. This is a very famous model that Thomas Schelling came up with to illuminate the process of neighborhood formation. How do neighborhoods form? To give you an example of what I'm talking about, I grew up in Manhattan in New York, and when I was growing up downtown in Manhattan, there weren't many neighborhoods. I mean, Manhattan is full of neighborhoods. If you look on a locals guide to Manhattan, you'll see descriptions of all different kinds of neighborhoods. These two neighborhoods that I'm showing photos of here are famous neighborhoods in the history of Manhattan. One is called Little Italy, and it was historically the region of Manhattan, where many Italian immigrants came to live and so it was primarily Italian neighborhood in Manhattan. Much of the clarity of these kinds of neighborhood definitions has been reduced in the time since I grew up, but you might find this area still being called Little Italy. Next to Little Italy is Chinatown, area where Chinese immigrants would come to stay and live in New York. These neighborhoods served a purpose for the people coming to America. That is, they could live with or near relatives. Their neighborhoods would have restaurants, and movies, and services that were reminiscent to or familiar to them from their country of origin. It was easier to get jobs and so forth. So there are many good things about neighborhoods. There are also more difficult sides of neighborhoods in a place like Manhattan. The boundaries between neighborhoods can be sources of friction, where people interact and as well as being inclusive places. They can also sometimes seem like exclusive places when somebody feels they're not welcome in this neighborhood. So neighborhood is a complex phenomenon. It's neither necessarily a good thing or a bad thing, but it is a human phenomenon in city formation. How did these places form? There was a weird thing when I was growing up, which was, I don't know if this location is still there. But in between Little Italy and Chinatown, there was one block in particular, I vividly remember seeing this, where the Little Italy neighborhood ended midway down this block or part of the way down this block and Chinatown began. When I looked at this block, it almost seemed as though somebody had drawn a line down the middle of the street, where all the Italian restaurants and shops are going to be on this side, and all the Chinese restaurants and shops are going to be on this side, and it almost looked as though an artificial boundary had been set up. Of course no such boundary have ever been drawn. Nobody ordered people to live on one side of the line or the other, the lines seemed to spontaneously form. That's the kind of phenomenon that Schelling was interested in, is how do people aggregate themselves into neighborhoods, and in the case of this particular block that I'm referring to is very vividly marked. The distinction between one neighborhood and another. Again, as I said, there were no city ordinances or anything determining that people have to live on one side of the line or the other, it seemed to be something that people in general decided to do and to live with. Schelling decided to model this computationally. True to form, when you're modeling a situation like this, you try to get insight from if possible, the very simplest kind of model. So I'm going to show you the kind of simple model that Schelling had in mind. Let's call it a town. The town, I've drawn it as a 10-by-10 array. Think of each of those squares as a family home. So I've drawn it as dark gray, and light gray. But for the purposes of discussion, you can think of them as red and blue. So each cell in the grid can be red or blue or in this case white or unoccupied. So looking at this 10-by-10 neighborhood. Not neighborhood, it's 10-by-10 town. There's a hundreds families in here. That top row, if you looking across that top row, there is a light gray family. This house is empty, the second one. The third one is a dark gray family. The next is a light gray family. Again, you can think of them as red and blue. What are these red and blue standing for? It could be a lot of things. It could be ethnicity, it could be religion, it could be politics, it could be language. In different cities and under different situations, there are boundaries between neighborhoods that are based on those kinds of classifications. The people over here speak this language and the people over there speak that language. The people over here are adherence of one religion, the people over here adherence of another religion. So red and blue are in this case, just stand-ins and matches with Little Italy and Chinatown. They're stand-ins for some kind of marker that people use to distinguish themselves in that presumably they care about for whatever reason. So the model here is going to be this 10-by-10 city, with fewer than 100 families because in this case what I've done is had 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, there are 12 empty sites here. So there are 12 unoccupied homes and then there are 44 red families and 44 blue families, and they've been arranged at random at the beginning of this little experiment. So we have a town which in principle could fit a 100 families. 88 families are living there, 44 of them are red families, 44 of them are blue families and there are 12 unoccupied sites, 12 homes that don't have families living in them right now. Now, here's what we're going to do. We're going to say, suppose that each house, each occupant or family if you like, has this particular preference, they're either going to be happy or unhappy in the place that they're living. Without loss of generality, let's say, we're dealing with a red family. So the red family will be content, they'll be okay if in the eight neighbors around them, the three at the top, three at the bottom, and then one on either side, in the eight surrounding neighbors in the cardinal directions and diagonally- Each red family wants to have at least four red neighbors. If the red family does not have at least four red neighbors, they will be unsatisfied. Similarly, each blue family wants to have at least four blue neighbors among the eight surrounding it. If they don't have four blue neighbors among their surroundings, they'll be unhappy. Now, one thing to note before we even go any further is that, think about this now just push a little bit to think about the human case of this. Neither the reds nor the blues think of themselves as particularly bigoted here. The reds and blues are basically saying, "look, I'm happy if I have four red neighbors and four blue neighbors. I'm okay with that. I just want to live in a place where there are at least four neighbors that are familiar to me." So they would not save themselves unbigoted, they would just say, I have this preference that at least half of my immediate neighbors are like me. Both the reds and the blues feel this way. Now, here's the way we're going to do this. Repeat the following procedure. Just look through the current grid, and find a "dissatisfied" cell, a family that's currently unhappy with it's surroundings. In the case that I just mentioned, it would be a red family with fewer than four red neighbors, or a blue family with fewer than four blue neighbors. Find such an unhappy family, and move them at random to one empty cell. Just pick an empty cell at random, and they're just going to say, I'm" going to move anywhere." So they pick up and move to an empty home someplace else. That's basically it. You keep doing that, you move the "dissatisfied" cell to a randomly chosen empty cell. You keep doing that until there are no more "dissatisfied" cells. Perceivably, in some versions of this simulation, it might go on forever. In practice, in many experiments, it is not go on forever, it actually stabilizes within a relatively small number of moves. So remember, we're choosing a "dissatisfied" cell and moving it to a random unoccupied cell. We just do this until hopefully we find that there are no more "dissatisfied" cells. This is a simulation I ran. Now, look at the left here, that's the initial situation, where people are pretty much scattered around at random. Each cell wants to have at least four neighbors like it. It wouldn't be unhappy with eight neighbors like it, or seven, or six, or five, but it needs at least four. Both the reds and blues feel this way. After a surprisingly small number of random moves to empty cells, you end up with very well-defined neighborhoods almost like Little Italy in Chinatown. I don't know how many iterations I needed to get from the left situation to the right situation, but it was in the low 100. In other words, after maybe a few 100 moves, we went from the left to the right. I should also mention that the way I set up this simulation is that, we're not on a flat grid, we're on a torus. So the right column is actually adjacent to the left column. In other words, houses in the rightmost column are just to the left of houses in the left column. You can think of it as wrapped around this way, and houses in the top row are adjacent to the houses in the bottom row. So you can think of it as wrapped around this way too. So actually this is a town on a torus, but if you made the situation very large that there might be other ways of dealing with the little complications that occur at the edges. In any event, you see what happened within a relatively small number of iterations. We went from a pretty randomly distributed city to a city with homogeneous and barely marked neighborhoods, almost like the boundary between Little Italy in Chinatown. Schelling makes the argument. Now, again these are very simple decisions that individuals are making. If you ask them beforehand, if you were to say to them beforehand, do you want to live in a city with such homogeneous neighborhoods? Wouldn't it be nice to have a little more mixing between the neighborhoods? All the individuals might say, "yes, I want that. I'm not happy with the pure neighborhood situation on the right here. I just wanted something locally comfortable for me, but I'm not happy the way the city turned out." This is the crucial point, is that there is decision-making. We individuals here, individual families made decisions about where they wanted to live. In the process of doing that collectively, they were contributing to a large-scale massive decision about the organization of the city and it may run counter to their desires. Their local decisions may run counter to their global desires. This is not the only version of this simulation you could run. For example, I took a similar random setting at the beginning, and ran a bunch of steps in which now each occupant wants a lot of diversity. So each occupant does not want more than four or fewer than one occupied self sites like itself. So in other words, reds are happy, they are content if they have one, two, three, or four red neighbors. But they don't want five, six, or seven, and similarly with blues. What you end up here with things that maybe you don't get the good site of neighborhoods anymore. It this looks like a pretty spread out arrangement. So unlike the situation with Little Italy in Chinatown, I don't really see any marked neighborhoods here that mark off the reds from the blues. So maybe that's not the best situation either. On the other hand, there's still another variant of this that we could try, where here we have medium gray occupants. Think of this as bilinguals. If you want to think of the the reds and blues as different languages. Medium grays speak both the red language and the blue language, and they count as neighbors for either red or blue. Now, count either red or blue as acceptable neighbors for them. Then, you end up with a modest number of bilingual or medium gray occupants. You end up with a city that looks like it does have neighborhoods in it, but there are neighborhoods that are not quite as clearly marked as in the first case. As I said, there are many more variations of this. This is a simple computational model. Does it get at all the complexity of actual human decision-making? Obviously not. There are all kinds of holes you could poke in this. When people move, they don't just pick up and move at random, they move to some place where they think they're going to be happier. People might have conflicting desires. People might have desires that change over time. So maybe early on when they move their content to be in a neighborhood with lots of folks like themselves, but over time they get bored with that and would like to be in neighborhoods with more types of neighbors than just themselves. All kinds of variations could be played with this. But still there are large themes to take from Schelling's experiment, which are what I want to focus on now. First again, the idea of modeling cognition beyond the individual, looking at decisions that get made in the presence of other decision-makers, and what happens when group either two people, or three people, or in a case like Schelling simulation. Many people are making decisions and they're all making decisions simultaneously, and what can result from a situation like that. Second, the idea of emergent collective behavior is very important idea in computer science in general, where the formation of neighborhoods could be seen as what's called an emergent phenomenon. It's a phenomenon that wasn't programmed into the situation directly. Nobody had the idea of programming this simulation in order to form neighborhoods. Then, neighborhoods formed by virtue of the individual decision-making of the occupants of the various houses. So neighborhood formation in this case is what you would call an emergent phenomenon. There's no place to immediately spotted in the design of the program or the design of the simulation itself. You have to run the simulation and see what behavior emerges. Finally, I'll just use this as a prelude to talking about other topics in multiple decision-making focusing on game theory.