 Good morning students. Let's jump right in with our very first model What I'd ask you like do what I'd like to ask you to do is to come on in take a seat and Let's follow the rules The first rule let's position yourself in a circle with your classmates So there's one classmate immediately to your left and another immediately to your right And then you can choose to either start the simulation sitting down or Standing up All right good. Looks like all of you have chosen to sit down. Let's go on and look at the next rule Each time the instructor claps I'm making noise with my hands. You're going to do one of the following Either if you are seated which all of you are now then you're going to look to your right I'm going to turn and look over your right shoulder to the person who's sitting on your right If and this IFF stands for if and only if it's computer term for if and only if the person on your right is standing up Then you're going to count to five Silently in your head one two three four five and then you're going to stand up On the other hand if you are standing You're going to count to five And then you're going to sit down Right now since we've all chosen to be a certain way before our simulation even starts We have all adopted what we will call Initial conditions initial conditions are basically the situation the conditions that we are all are all in before the simulation begins And I see here that you've all chosen to start by sitting down So our initial conditions right now that all of our participants here are starting by being seated Let's see what happens when we actually execute the rules in our model All right, is everybody ready? I'm about to make a clapping sound everybody apply the rules here. We go three two one Okay, I don't think much has happened. Let's try that again three two one Hmm what's happening here three two one Notice these initial conditions don't seem to lead to very much interesting behavior What's happening here? Well, everybody's sitting down. Is everybody applying the rules? Well, if you remember what the rules are Right now everyone is seated so everyone is seated looking to their right and I'm guessing that none of you see anybody standing up so You don't have to do anything. You were just well Staying seated. How about we try a different initial condition? Everybody stand up. Let's see what happens there. Come on. Come on Stand up. Yep up you two over there on the right stand up All right, everybody's standing now good. Oh wait. Nope. There's one more of you. All right now We're all standing up Everybody ready to apply the rules again. Think about what your rules gonna be I'm going to clap my hands and Everybody's gonna need to apply that rule. Are we ready one two three? Okay, good looks like something happened. Let's try it again. Let's apply the rule ready one two three Okay, ready one two three I Think I'm beginning to see a little bit of a pattern here. Let's try this one more time ready one two three Okay, something different happened, but then we went back and everything's staying sort of the same again. What's going on? I know let's try this. Let's try a different initial condition Everybody sit down except for yeah, you over there. How about we have one person start standing up and everybody else will sit down Let's see if that changes things All right, there we have it one of you standing up now Let's see if we can execute our rules everybody think about and remember There's two rules one set of rules for when you're standing up and one set of rules for when you're sitting down Everybody ready to execute those rules All right, let's see what happens on the count of three ready one two three Ready one two three One two three One two three One two three one two three Anybody seeing a pattern here? I think you can run the pattern without my synchronization Maybe you can do it without me actually putting the clap in place. Let's see here I'm not going to clap all clap once and then we can see if we can keep going go ahead. Let's do it and Hey There we go Anybody who recognizes pattern? Ever seen this before? I bet you have if you've ever been to a stadium maybe a ballgame here in Durham, North Carolina We have the Durham Bulls and this will happen at least once if not a couple times during the game Where you look to your right and you see somebody if they stand up and go And then they sit back down. What do you do you stand up and go? And then you sit back down and this creates a Phenomenon that we use in crowds known as the wave and why is it called the wave? Well, if you think about it, it looks a lot like what happens at the ocean when the water Rises up and then it falls back down again and it rises up and it falls back down again And when does it do that? Well, it does that When the water next to it rises up and falls down So we've created our first model and this model using very simple rules gives us an overall behavior that looks a little bit like something We call a wave What happens if we start with instead of just one person standing up we have two people standing up maybe on opposite sides Let's try that two people standing up Can you think about what you think is going to happen here? All right, let's check it out Seems like we get the wave but the wave is occurring in two different places and because we're sitting in a circle The wave continues to go around and round actually both waves now that there are two of them continues to go around and round that circle But let me ask you about another set of initial conditions. What if we get more complex? Let's try something a little bit different. All right, here we go I see that every well will say all the odd people are standing up and all the even people are sitting down Let's go ahead and Execute our process again here. Everybody follow the rules on the sound of the clap ready one two three go Let's do it again one two three go This behavior is looking a little bit different one two three go All right, let's see what happens if I just let you kind of run the process Ah Interesting if I step back and look at this I can kind of see the waves moving around in a circle But if I look more closely at any individual one of you There seems to be this up down up down up down up down up down There's a little bit different than what we've seen before. Let's try one more set of initial conditions Everybody gets to stand choose whether they're standing up or sitting down Let's pick that randomly and see what happens Well that sort of went as expected about half of you are standing up in fact exactly half of you are standing up six of you and half of you are sitting down six of you and Well now we have some groups We sort of have three of you that are standing up in a group next to each other and two of you that are Standing up in a group next to each other and another one of you that's sort of standing up by yourself So before we start here think what do you think is going to happen? What do you think this is going to look like? All right, we ran out we have an idea, but what we think it's gonna look like let's go ahead and apply the rules Remember there's six of you standing up right now. Let's see what happens Hmm. It seems to be there are only three people standing up right now What happened? Let's try that again. Let's rethink that let's everybody try that again. I want to see make sure everybody's applying the rules That's what's what happens in this first step everybody ready, okay? So there were six people standing up, but now we see that there are only three people Or only three waves that have managed to survive the rules and continue to go So if this is really representing a wave, do you think we're capturing all the information about the wave? So we started with a bunch of different initial conditions, but we always apply the same rules And even though we applied the same rules with the different initial conditions We've got sort of different kinds of behavior. Let's talk about the kind of behavior. We saw what patterns Do we see in our overall circle each individual had some rules, but the overall circle showed some patterns What was that first pattern there? Well, when we were all sitting down Nothing happened. We just kind of remained sitting down Why because when you looked around and saw no one standing there was no reason to stand up at least according to the rules So this idea when you have a pattern That basically repeats itself where there is no change even though there's potential in the rules for change We call this a steady state the state the condition everybody is in stays the same It's steady. We have a steady state pattern. So when we started at the beginning everybody seated. We had a steady state pattern However, when we started with everybody standing up There was a little bit of motion that was in there where we sat down and then after everybody's sitting down We went back to a steady state pattern when you're looking for patterns in science We'll often look for situations where we reach the steady state and the time when you're Moving around before you get to steady state that one step where everybody's standing up and then everybody sat down That's what we call transient behavior t-r-a-n-s-i-e-n-t transient behavior that space before you reach a consistent pattern like a steady state pattern What else did we see? Well, we also saw the wave we saw this sort of motion that repeated itself over time But where somebody stood up and then they sat back down in the person next to them stood up And they sat back down in the next person stood up and that looked a little bit like the form of a wave Moving around the circle What else did we see? How else would we describe those other things? What happens when everybody was up and everybody was down? What happened when half of us were up and half of us were down? When we had that situation instead of it looking like a wave You can also look at it as a up down up down up down up down up down up down sort of a flashing behavior Or what we would call Oscillatory behavior and oscillation something that changes between one state and goes back to another state And this case the entire pattern goes from All these shall we say the odd people standing up and then the even people standing up and then all the odd people Standing up and all the even people standing up So that's another kind of behavior steady state everything stays the same We might have something like the wave where things are moving around we can see them We could have oscillations where things move up and then they return to a state and then they return to the state again So we're beginning to see some Overall patterns or overall behavior from this simple set of rules So let's talk about the parts what we The pieces that were necessary to create this model First of all there were the individual agents in this case you students You were each sort of individuals the individual agents could be something some individual person that's acting some Particle that's acting maybe a rock maybe something that represents a molecule Maybe some kind of animal or perhaps it might even be a place a sort of place in space It's interacting but the key idea is there's something that has some rules for interacting with the other Some things and these some things we're going to call agents for our agent model Each of our agents in this model has some states in this case to Binary being the word for two Okay, so this is up there are binary states The two states here were standing or sitting we didn't distinguish between things like scratching my head or wearing a certain color clothing And even though some of you might have looked a little different those weren't important for our model The only two important parts for our model with were whether you were standing up or whether you were sitting down Okay, we started with some initial states. You either had to be standing up or sitting down at the beginning of the model Okay, and here's another thing that we talked about our boundaries Notice with this model. We all sat in a circle So everybody had somebody to the right and everybody had somebody to the left looking at them and because we connected that circle It made it pretty easy. However, what would have happened if I had you all sit in a straight line? Well, if you were on a straight line then the person who was Sitting on the far left would have nobody looking at them Nobody following them for their rules and the person sitting at the far right Would have to need some special rules. What do they do? They have nobody on their right to look at so how would they behave? And we would have to give them some special set of rules for how they would behave Would they always stand up when they always sit down would they make something up? Those would create our boundary conditions, which are going to be very important for the behavior over model One of the things about our rules our rules basically governed how we behaved based on The states or the conditions that our neighbors were in we looked at the person to our right We could have looked at the person on our left But in this case we didn't care so much about them all we cared about is the one neighbor on our right and a little bit About ourselves if we were sitting down we did something different than if we were standing up So the rules were subject to the states of ourselves the agents we were and of our neighbors the agents that were close to us and Then what do we do? We apply the rules clap. We applied the rules again Clap we applied the rules again clap the term for repeatedly applying these rules and notice Synchronized synchronized men that we all did it at the same time Reason why I wanted to have you count to five before you applied the rules is because if you looked at the person at their right And they were faster than you and making their decision and they had already sat down or already stood up Then that would change what choice you would make so in order to synchronize us all together I had you make your decisions and Then I gave you sort of five seconds of time to stay in the same state before you changed So that there wasn't sort of a confusion about which state you were in while your neighbor was making their choice and applying their rules That synchronization is particularly important if you're going to build an effective model and the term we're using for this is an iteration An iteration is one application of the rules where all the agents apply the rules and Then once we're done with that we can repeat that process I clap my hands again everybody applies the rules again, and that would be an iteration Now it turns out our first little model here is an example of something. It's called a cellular Automata cellular well comes from the same sort of ideas of biological cell our agents can be considered cells if it's sort of a Describe as a place in space and automata or something that automatically repeats our process that automatically iterates So our little model here and or the wave that we all learned when we were or we may have looked seen before when we were at a ball game Okay, our Recorded this some information about them written by Stephen Wolfram in a big thick book called a new kind of science Which we'll be referring to quite a bit as we talk about models Okay in his model he describes sort of a generic a more general version of this system that creates the way So we're gonna recreate his model Okay, and we're gonna start with defining our agents in this case our agents are gonna be individual grid boxes in a row each with two neighbors hmm You're gonna need some graph paper go ahead and find yourself a piece of graph paper and When you do let's continue So for this model, I'm gonna ask you to identify the first row The first row of Grid boxes across the top of your piece of graph paper You don't necessarily have to box them out. I'm just drawing them here. Okay, and our agents in this particular case Our agents are gonna be each of these individual grid boxes for example This grid box here in red would be an individual agent in my new system Note that each of my agents has two neighbors and in the neighbor that's immediately to the right and in the neighbor That's immediately to the left actually maybe I should draw it like this immediately to the right and immediately to the left Each of our agents is going to have one of two States this is going to be a binary system. So the two states could either be on or off We could think about something as being on or something being off We could think about it as a computer does where it's a one or a zero or we could think about it with a color situation Where we fill one in this black and the other one is white now We're gonna have to decide which one is going to be sort of the on or the off or the black or the white in this particular case Let's go ahead with the black color being off as if we turn something off the lights off and the white color being on Once we've established these states. We will want a set of initial conditions On an initial row of however many cells there are in this case It says 50 cells, but you might have a different number of cells across the your row of paper Okay, but we'll have to decide whether or not we're going to start with some with what our initial states are whether We're going to be on or off and then we'll want to work with us the patterns from there Well, let's go ahead and create some initial conditions in our first row In our first row of grid boxes And one of the things you might come to realize here is that even though we have this idea of there being two states a state That's on In which case we're indicating by a white box and a state that's off that we're indicating by a black box The problem with that is that how do we indicate a box that we haven't decided on yet because it's on or it's empty So actually what we're going to do here is we're going to indicate on the condition of being on Well, let's start with the condition of being off the condition is being off We're going to fill in the box with a dark color, so it's been turned off Okay, maybe I'll turn this one off But if I want to indicate the condition of one being on I have to somehow indicate that I've decided that that one's on So I'm going to do that by maybe putting sort of a little sketching a little round circle in there That indicates that it's on and that I've decided that it's on Okay, but that it's not unlike the ones to the right here that I haven't decided on yet I'll have I'll know that that that I've actually dealt with that one So we're kind of dealing with three states the state of being on the state of being off and the state of I haven't decided yet Because it's just a blank piece of paper. Let's go ahead and finish creating a Series here and I'm going to ask you to actually at least for the first few of these To create them so it looks a little bit like mine as it'll make it easier for the next part of the demonstration So let's go ahead and fill in just a few more of these boxes with some somewhat random initial conditions And now I have it done nowhere near 50. In fact, I've done about 5 10 15 maybe 16 or so we're going to stop there because that should be good enough for our purposes right now as Was our case for our initial model where we were all standing and sitting There are lots of possibilities for initial conditions for this model We could all start with them all on we could start with them all off We could start with a single cell on or a single cell off and all the others the other way We could start with some sort of pattern on off on off on off on off as we tried Or we could start with some sort of random distribution, which is what we've just created Okay, the next thing we have to discuss is the boundary conditions how do you handle the ends of the of the line of the row in This case we're going to make our boundary conditions Just like the boundary conditions conditions we had when we were sitting in a circle the boxes at the left and right ends are Considered to be neighbors as if the row was arranged in a circle. Let's look at that what that means on our graph paper So what that means is that this box over here on the far left Which doesn't have a neighbor to its left? We're going to consider it being connected to the box over here on the far right Which doesn't have a neighbor on its right? So the two of them are going to be end up being neighbors to each other We're going to make these connected boundary conditions now the thing about connected boundary conditions Is they make it really easy for the model to behave and so that it's the same everywhere that every single thing has a neighbor? However, there's a problem with that kind of modeling in the sense that those kind of boundary conditions Don't exist as frequently in real physical systems Yes There are some physical systems if we're modeling the entire earth if you go to the right side of the earth and keep going if you Keep going and keep going eventually you come all the way back around again So that works for systems that are circular, but very often we're not looking at systems that are full Fully global at a global scale and might go from one side of a continent to the other side of a continent Or from one side of a city to another side of a city if we're thinking about places in space So in this case, we're going to do it to simplify our model But they're going to be other times when we're going to want to make boundary conditions that are a little bit more complex and we'll have to Work with the rules to determine what we do in the boundary and they are very important to how our models behave for this model in iteration is going to be Another row each successive row is laid out below the previous iteration Maintaining a record of the states in the vertical space So before where we had one state and I clap my hands and everything changed and then I clap my hands and everything changed We were keeping track of iterations in time But unless you took pictures at everything at the time step We wouldn't necessarily know what had happened in the past in this case We're going to organize our iterations in space that the first row is going to be Well our initial conditions, but the second row will record our application of rules So each of the little grid boxes will be represented by a column that the grid box in the very middle And all the ones below it will represent that same grid at just different steps in the process for example This grid that I'm going to mark in purple here If we look at that grid if we look at the boxes that are below it Each of these successive boxes below it will represent the state of that grid after each application of rules So the first one is the state of that grid upon the initial conditions The second one is after one of application of rules after the second application after the third application After the fourth application so first application the second third Fourth and then usually we represent the initial conditions with a zero Okay, so did the initial state corresponds with time zero or zero steps having been Executed so each of our successive rows is going to be one application of our rules or one iteration So what are the rules here they are rules The state of a new box is determined from the current box And it's two nearest neighbors, so I'm going to look at what state I am on my honor off I'm going to look to my right. I'm going to look to my left Okay, and that will help determine what my new state will be Let's see here eight to two to third possible combinations each determines one of the two states So let's talk about what this means so If I'm a box So let's consider the condition of our little box one here a purple box number one. We notice purple box number one is A later version of the box. It's right above it box zero which we notice is on at the beginning of this Is on as an initial condition and then there's also a box To the upper left and to the right basically the box to the left and right of box zero One of which is on and the other which is off Let's go ahead and Replicate that on the next page so we can talk about what's happening So here's box number one and here's box number zero that's on and the box to the left of it Which is also on and the box to the right of it, which is off Okay, and we want to figure out what box number one is going to be and it needs to look at each of those three boxes now There are many possible combinations well by many I mean eight possible combinations of Things that could come from these boxes. There are two possibilities for the box on the left Two possibilities for the box on the left There's two possibilities for the box in the middle and there's two possibilities for the box on the right two times two times two is Equal to eight two to the third or eight possible combinations of boxes That we could have to determine our state Let's see if we can figure out what all those possible combinations are take a moment and see if you can think about What each of them is so what combinations did you get? Let's see here It's possible that all of them could be off off off That would look something like this where they were all filled in all filled in and all filled in okay That's one possible combination of boxes another one might be off Off and then on where the two boxes on the left are off But the one on the right is on What else here off? on off In this case our box in the middle is on and the ones on the right and left are off Or we can have off on and on Turn the one left off and the other two are on Well, that's four of our eight and Notice in all four of those the left hand box was off Now I'm going to do a similar set of patterns But this case where four conditions where the left most box is on so we have on off off on off me the middle one is off We have on on And finally we have on all three of them Well before when we had our simple version of the wave all we cared about was our condition of Ourselves whether we were standing or sitting down and the person to our right in fact when we were sitting down We didn't really mean when we were standing up We didn't even care about the person to our right when we were standing up We immediately sat back down again However when we're sitting down we looked to the right and saw whether they were standing up and that meant that we stood up So that was just a couple of things to look at well for each of these We now have eight different possible things that we could see when we observe ourselves in our neighbors And for each of those things we can create or make up a rule That determines What we're going to do next So let's create some rules For each of these states I'm going to start with one here. We're going to say that when we start with all three of them off let's leave it off and Then let's say when we have this second situation here off off on let's turn it on We'll make this one on We'll make this one off Notice I'm choosing these somewhat arbitrarily here Okay, that's just an example what we're doing is figuring out all the possible combinations And what we will do when we see those combinations that make this last one on I made a lot of them off here And we'll make that last one go off now There isn't a particular logic to this choice here, but I've simply done is come up with a possible Way of Well a set of rules there are eight rules here when I seek state number one here where everything's off Then I'm going to stay off myself if I see state number two Well, then I'm going to make a different choice if I see state number three so on and so forth I'm going to make a different choice. Let's go back and see What this means? Well, let's actually look for what this means for our condition for box number one here If you look we have off I mean, I'm sorry on on and off. Where is that on? On and off well, we've decided to make that one a condition where we're going to Remain on if we see that condition we're going to remain on so let me go to my graph paper and For that grid right there. We've determined that based on this on on and off We're going to remain on Okay, well, let's look at the grid. That's a mealy to the right of that this one right here All right from there. I see on off and off Well according to my set of rules. What does on off off tell me to do? Let's see here on off off that tells me to Turn off. So I'm going to apply for this one I'm going to apply the rules based on the three things that were above me Let me do that for the one that's next to it now This one has three that are above it all three of them are off And if I go and look at my rules for everything off it says Stay off. All right. Let's repeat that process for just a few more of these steps I'll do it slowly here that you can watch. You should be able to figure it out by yourself and Do well, let's fill out some of this in both directions All right now I've encountered a difficulty or a difference here now I've reached the far right side But hopefully you already know what to how to handle that far right side in this particular case I need a rule of three things. I'm going to use the green color here to sort help me out So I'm trying to figure out what's happening in this spot right here Well to do that I need to know the one that's directly above me and the one that's to the left and the one that's to the right Well, which one is to the right well according to our battery conditions The one to the right is the one that's way over here on the far left because they're connected to each other So now to figure out my state for this one here on the right in green I look at the ones above it. It looks like it's off Off and then the one way over here is also off So all three of those are off and I know that off off off also gives me off Notice using a different color is another way to sort of keep track of things here Okay So similarly if I go all the way over here to the left side What does it have for neighbors? Well, it has the one that's on the far right, which is off Let's do this in blue Okay, this one is Off The one that's in the middle right above it is off and the one to the right of that is off So all three of those are off. So this one of the far left is also going to be off And if I keep going here, I should be able to complete the rest of this I know that off off on gives me On I know that the alternating one gives me on So now after completing all of these pieces, I have now Created a row that represents my first iteration. We have a new set of states Some of them are off. Some of them are on and that is our first iteration Which I can see if yours matches mine. Maybe you can see some mistakes. I hope not But maybe you can find hopefully you can understand how the process works so now Steven Wolfram in studying this system realized that This one group of eight different ways to interpret it could be considered a set of rules or actually That's what he called the rules for one of his possibilities And he said well, there's lots and lots and lots of combinations of these in fact there are two hundred and fifty six Or two to the eighth Possible combinations of these rules. How did he get that? Well, he recognized for each Combination of boxes there was one choice for whether you turn it on or turn it off For example with off off and off you could have either turned it on or off So there were two choices for that one two choices for the next one two choices for each of these and if you multiply two Eight times you get two to the eighth hour, which is equal to two hundred and fifty six So there are two hundred and fifty six possible combinations of these Interpretations here and that's what he would call a rule. So he said there were two hundred and fifty six types of Rules that corresponded with just this one simple little Model well from also said there's got to be a way of keeping track of these rules To sort of so we can sort of talk about the same rules and understand what they are for example One of these rules is the wave that you are talking about Well, how do we know we could name all of them? But that's 256 different names and he wanted to keep track of these in a slightly different way So he decided to use a numbering system for keeping track of these and this numbering system Takes into account the whole idea of binary counting the idea the same idea as What is used for computers when computers do their thinking a binary counting system some of you may be familiar with this If not, this might be the first time you're going to see it So for example what roll from said is he decided to put things in the same order that we've put him here where the first Kind of switch was off off off the second one was off off on the third one was off on off and so on and so forth And what he did for each of those he said okay for each of those I'm going to assign a zero or a one and the whole combination of all those zeros and ones We'll make an eight digit number But an eight digit number that only has zeros and ones for example. He took his first one right here and he said this is a Zero because it was off. You see how I have it off over here And he took the second one here and he made that the next digit and he said that that's a one And then he take this third one here And that was also one This one that's right here is a zero One that's next to it is a zero This one is a zero This one is a one and this one is a Zero So the binary code number this is in binary. It's all in zeros and ones For this particular rule is zero one zero zero zero one one zero However, we're human beings. We tend to do stuff in Groups of tens in the decimal system Which is what you learn when you're in kindergarten in first grade in your first learning how to count and why? Well, because we have ten fingers and that makes it easier to sort of group things in chunks of ten well There is a way to translate this big long binary number zero one zero zero zero one one zero into Decimals in your decimal system. You'll remember that first you can count up from zero to nine, but if you had a number that was something like 328 You'll notice that the first digit is your ones digit that you have eight ones And your second digit is your tens digit you have two tens which is 20 and your third digit is your hundreds digit And you have three a hundred so three hundred twenty eight Notice the ones the tens and the hundreds these are all in base ten that your first digit was Ten to the zero with power your second digit was ten to the first power and your third digit was ten to the second power And notice your fourth digit would be ten to the third power or thousands and so on and so forth that each of your digits in this system goes up by a factor of Ten Well in our binary system each digit in the binary system goes up by a factor of two our first digit in The binary system let's create some space here right at our first digit in the binary system is just like in the decimal system That's our ones place. So in here, that's the number of ones we have However, instead of going up by a factor of ten in our binary system We're going to go up by a factor of two the second digit is our twos place So in this case I have zero ones, but I have one two The third digit is two to the second power or our four's place Then our eighths place are 16ths place are 30 seconds place Some of you might recall two and two are four four and four are eight It's a song about an inch worm eight and eight are sixteen sixteen and sixteen or thirty-two Basically as a song about a little inch we're measuring things well after thirty-two thirty-two times two is sixty-four and Sixty-four times two is to hunt is a hundred and twenty-eight Okay, well, let's see here So if that's how many pieces there are each of those represents how many Groups of each thing you have in the first case for there are a number here if we want to convert it into decimals We do it this way. We have zero ones that's zero. We have one two So that's plus two. We have one four. So that's plus four. We don't have any eights or sixteen or thirty seconds But we do have a sixty-four and we don't have any a hundred and twenty-eight Okay, so what I've done is I've Coded I've taken my offs and ons and offs and ons and offs and ons And I've taken all the ons and made them into ones and all the offs and made them into zeros There's my ones and zeros But once I put them all in this order like this I can convert that into a decimal value by keeping track by giving them each an amount That's a binary amount in this case. I have a 64 I have a four and a two when I add 64 plus 4 plus 2 that gives me plus 4 plus 2 That's going to give me 68 a total value of 70 and according to Wolfram's convention This rule that we've used right here is rule 70 So here's my challenge for you Which rule is the rule that we've already seen which rule is the wave Pause the lesson and see if you can figure it out Before I give you the answer. So let's think about what the rules of the wave said First of all the rules of the wave said if you were sitting down Then you look to the person out and you're right, but if you were standing up Well, then you sat back down. Let's start with the ideas of if you were standing up We're gonna consider standing up to be on so again Up is on Well, which of these are we the person who's in the middle? We're looking at our neighbors in which case are the ones that we're standing up Well in these four cases are all the cases where we were standing up and the rule for that when we were standing up was to Sit down So in all the cases where we started standing up We now turn ourselves off or sit down That there came the case where we were sitting down But we looked to our right and we saw somebody standing up here I am sitting down and I look to my right and there's somebody standing up There's another case where I'm sitting down here It is where I'm sitting down and I look to my right and I see somebody standing up Well, what do I do in that case in those cases? We were told to Stand up Okay, finally what was the last condition? Well these other conditions I'm sitting down, but I look to my right and somebody's already down. Well, it didn't say to do anything there So if I'm not doing anything, I guess I'm just staying in the same seated position or the same off position So now according to Wolfram's rules here and again We got to make sure these are in the same order as Wolfram has them in which this is how This is the order the off off off off off on if you want to record that order it might be a good idea Okay, so let's go ahead and look and give these a number This is zero Again, but this number here is the one in the far left and then we'll keep going. This is the one then zero zero and Then zero one zero zero Okay, there's all our eight digits and so our Wolfram code is zero zero one zero zero zero one zero But that's kind of confusing and we're not used to that. So let's convert that into decimal How do we convert that in a decimal? We recognize the places here's my ones place. Here's my twos place for eight sixteen Thirty-two. I really only care about the places where I have a value of one I have one two and one thirty-two thirty-two plus two is equal to thirty-four so rule thirty-four is the wave or at least the wave as We created it rule thirty-four the wave So let's go back and look at that sort of original model. We were working with Here we have my first row my initial conditions and I calculated the second row for that sort of first iteration You see any patterns here? It's kind of messy. It's all sorts of different colors Maybe it would work better if I colored them all in black But it's gonna be kind of hard to see those at least until I do a bunch of different rows to see if there is Any sort of relationship? I mean we could watch when people are standing up and sitting down and standing up and sitting down in patterns But now there should be some patterns we might be able to see in space But it's gonna be kind of hard to see those patterns here until we've done a lot of work and This is one of the ideas behind computer modeling. Well, we have we've done this process But why don't we ask the computer to do the process for us if the computer can do the process for us and Show us what this looks like. Maybe we can work with the computer to see the overall patterns in the system One place you can explore these patterns is in the book a new kind of science by Stephen Wolfram But another place we can do it is Through a program that will be provided to you in net logo Here's a called Wolfram shell CA dot n logo. It's a little hard to read there Wolfram shell CA dot n logo Let's go take a look at that program When you open up the wall from shell CA file in net logo, you should see something like this You should see a few buttons on the side that say set up draw reset and go and you should see a blank screen With tix equals zero on the top In order to run this the first thing you're going to do is you're going to click on the button that says set up Nothing will really happen with set up except that you'll see a thin white line across the top Okay, in that case that thin white line is going to represent sort of our off conditions Black will represent our haven't decided yet and then we're going to use red to represent the on conditions in this case It's a little bit different. The red is going to be on and the black and the white is going to be off In order for me to create the initial conditions. I'm going to click on draw What that'll do is it'll highlight the draw and then I can click on individual pixels If I hold on the pixels they'll go off and on but I can click on them And if it's a red pixel, I can turn it off if it's a white pixel I can turn it on by clicking and so you can create a set of initial conditions along that top row if you would like you could potentially recreate the initial conditions from our The initial conditions from our example from before if you wanted to check but I'm going to create sort of a Set of somewhat random initial conditions once I'm done drawing those initial conditions I can click off to turn off the draw which means I will not confuse it by changing things in the middle of the process Okay So now let's put in one of our rules. Let's go first with that rule number 70 rule number 70 Okay from our example before if I remember correctly So there's a little slider here that allows you to slide and oh it could goes all the way up to 255 from 0 To 255 representing all those possible rules that Wolfram talked about where 0 is 0 0 0 0 0 0 and 255 is 1 1 1 1 1 1 1 Notice if you add up all the different possibilities if you add up 1 plus 2 plus 4 plus 8 plus 16 32 64 128 the number you get is 255 So let's go ahead and slide this slider Until it hits rule 70. We're going to leave on the horizontal wrap That's the whether or not our boundary condition is attached on the right and the left Okay And you'll notice when we put in rule 70 it says generic world mapping here's rule 70 And it gives us the numbers for rule 70 notice these are kind of in reverse order It's actually has the off off off down at the bottom and the on on on up at the top That's kind of the flipped over from how we wrote it before but it gives us our binary representation of rule 70 Now I'm going to do this. I'm going to go ahead and hit go and when I hit go what I should see is a repeated application of the rule And in this case these is a repeated application of the rules for rule 70 Okay, and notice We see some sort of patterns that exist in here Okay, you'll see these sort of long stripes that are sort of developed. You'll see some little Dots well look what happened. It looks like we're getting what we would call oscillations We go from on to off to on I mean, sorry, yeah on to off to on to off to on to off to on to off making this kind of little Checkerboard almost pattern Okay, you'll also see that there is some of what we will call transient behavior where we get into a pattern later on But early on in the pattern we actually see That there are some changes Okay, let's go ahead and put in what was the rule number that we just got for our Wave what was the rule number? We just got for wave if I remember that was rule 34 So to do rule 34 I'm gonna have to slide to hit rule 34. Oops And then I'm going to hit Reset I believe and when you hit reset what that will do is it will keep the same initial conditions But it'll apply rule 34 and now on a hit go Now how does this represent? the wave Well, if you think about it if you remember what we saw when we had Groups of people standing up and sitting down whenever there was a row of people That row disappeared in that first row, but then everything moved a little bit to one side Okay, in this case if the person's looking to one side looking to the right Well, here's a sliding. This is makes sense to me Well, what it's saying is that the little front of what you're doing is moving in one direction Okay, this might be a little counterintuitive because it looks like it might be sliding in the opposite direction to what we were thinking about Okay, but the idea here is that it in space Well in time we saw this little thing that would move up and then it would move around Well, that's what's happening here is that as we go further down Any place that of something that was standing up the person who was next to them is now standing up and that creates this sort of diagonal line So what kind of patterns might we see next? Can we find steady-state patterns? Well, what does steady-state pattern look like? Well, if we think about it if each line looks exactly the same as the line before it That would be what we would consider steady-state What would cyclical pattern or an oscillatory pattern be in other words What would happen if we went from one state to another state and back and forth again? Perhaps that's the term we should have used earlier a cyclical pattern growing patterns Symmetric patterns localized structure self-similarity moving local structure. What are all these patterns we're looking for? I have no idea So what's next? Explore, hopefully you have an understanding about how these patterns are getting generated But there are 256 rules and some of them have some very interesting Patterns that come out of them so poke around explore look a little bit and pretty soon You'll have an assignment that'll ask you to explore this with just a little more purpose