Emergence, Week 2

Paul Grobstein's picture

Welcome to the on-line forum associated with the Biology 361 = Computer Science 361 at Bryn Mawr College. Its a way to keep conversations going between course meetings, and to do so in a way that makes our conversations available to other who may in turn have interesting thoughts to contribute to them. Leave whatever thoughts in progress you think might be useful to others, see what other people are thinking, and add thoughts that that in turn generates in you.

As always, you can leave whatever thoughts occurred to you this week. But if you need something to get you started ...

The Game of Life shows that indeed simple things interacting in simple ways can yield surprisingly complex outcomes. And Langton's Ant shows that things we think of as complex may in fact emerge from simple interactions of simple things. What other simple interactions of simple things might surprise us? What things we think of as complex might turn out to be simple things interacting in simple ways? Is there a new way of thinking about science here? of doing science?  Compare and contrast some model from the Netlogo library with Langton's Ant on Serendip ... does either better help make sense of emergence, and if so why?

jguillen's picture

Langston's Ant and Random Balls

  A couple of things from our last discussion struck me as very interesting. Langston's Exhibit, which at first seemed to be a relatively easy system and later on confused us by its path and the introduction of barriers, ended up highlighting an important idea-that what seems complex can arise from relatively simple interactions. It was very interesting trying to figure out the number and types of rules that were operating the system. After learning that there were simply two rules, we were able to see that this system contained an entity that was basically interacting in a very simple way and that even when a barrier was introduced the entity still kept on moving because it was simply operating in accordance to two rules. Now, an interesting question came out of the ant's movement. We asked if there was an internal goal in the entity and whether or not there needs to be a representation of the goal in the entity. What we seemed to conclude was that the entity was not learning and that it was just following two basic rules. Therefore, it seems that there does not need to be learning or a goal involved in a system in order for there to be complexity in a system. Something as simple as two rules can result in the emergence of complexity. Relatively simple interactions across different levels of organization give rise to what we consider as complex.

I decided to continue exploring this idea of interactions and complexity by looking at a model on Netlogo. I decided to look at the Random Balls Model, which simulates a frictionless billboard table. There are green balls that bounce off the walls, but not each other and which can be controlled in terms of their speed and number. In addition, the model includes a center of mass drawn in white and whose movement is traced by a red line. Without the red line, the pattern of motion is not as obvious. The gravity ball is pulled in the direction that contains most of the moving balls. If the number of balls in the box is increased, the gravity ball moves much less and seems to stay in the same general area. Its movement is now much smaller and the outlined red line path is significantly smaller than if you have less number of balls. Conversely, decreasing the number of balls significantly to about 13 results in much greater movement of the white gravity ball. With less number of balls, it seems that it is much easier for all of them to move to one corner than it is when there are 800 balls moving. Pressing setup changes the position of the green balls. If you change the set-up, but keep the number of balls the same, you get a different trajectory and pattern for the gravity ball. This means that there are many motion possibilities for the gravity ball even with the same number of starting balls. I would have liked to control the movement of the balls to one direction to see how this would affect the motion of the center ball, but I was unable to do so.

In both of these models, there is a sense of constant random change. The possibilities of both models seem endless. However, it seems like there is more predictability in this model than in the Ant's Exhibit because no matter how many balls there are or how fast the balls are moving, the movement of the gravity ball remains in the center of the square. In this sense, I found the Random Balls model to be missing the element of "surprise". In the Ant's Exhibit, the movement of the entity could be drastically modified with the introduction of a barrier. However, what this model and Langston's Ant Exhibit both illustrate is that the gravity ball and the entity (in Langston's Ant Exhibit) do not need to learn or have a goal in order to move or respond to the conditions. They are both simply following basic rules, which results in something that looks more complicated than it really is.

Sahitya P.'s picture

Mimicry and Langton's Ant

The model I choose to look at was Mimicry. One type of mimicry known as Batesian mimicry is the situation where a harmless species evolves to looks similar to a different species which isn't harmless in order to avoid a common predator. One example of Batesian mimicry is depicted by monarchs and viceroys. They are very similar in coloring even though they are different species, one is a butterfly while the other is a moth. The monarch butterflies are unpalatable to birds and so the birds avoid the monarchs based on coloring. The viceroy moths avoid being eaten if they are similar in color to the monarchs.

The model demonstrates how this complex behavior might have evolved. It begins with 450 monarchs and viceroys. The monarchs are represented by the letter "x" and are colored red, while the viceroys are represented by the letter "o" and colored blue. There are also 75 birds, the common predator to the monarchs and viceroys. When a bird encounters a monarch or a viceroy it eats the butterfly or moth unless it remembers that the butterfly is unpalatable. As the butterflies/moths are eaten they are regenerated based on how many butterflies/moths already exist,the carrying capacity is 225. When a butterfly/moth reproduces there is the chance that it could result in a mutant which has different coloring.

The model allows you to varry how long a bird retains the memory that a particular color is unedible and it allows you to vary the number of memories a bird can hold at one time. In addition the mutation rate of the butterflies and moths offspring can be varied.

This model is similar to the Langton's Ant model because it shows how complex behavior such as mimicry culd have arisen from simple interactions between the birds, butterflies and moths. Both the Langton's Anot model and the Mimicry model at first seems to need complex explanations for the behavior demonstrated but in fact the behaviour can be accounted for in terms of simple interations between simple things. The organisms in both only require a simple set of instructions and the ability to respond to and change their environment. The main difference bewteen the two models is that the Mimicry model is not completely predictable and deterministic because the mutations introduce randomness into the model.

kdilliplan's picture

The Game of Life, Ants and Oil Percolation

            After fooling around with the MIT version of the Game of Life and Langton’s Ant, I made a few observations and answered a few questions I had from the first time I looked at the models.  To begin with, yes, the ant can build a road in a direction other than the one we saw in class.  The road has the same appearance, but it can build it heading down/left, down/right, up/left and up/right, and with a simple application of road blocks, it can build them in all four possible directions in the same run.  My other, somewhat trivial question was whether I could beat the record of five-cell beginning state in the Game of Life and create a beginning state that created a longer sequence of seemingly random shapes.  I ultimately created a nine-cell pattern that ran for a minute and 40 seconds before settling into a set of repeating patters.  The original five-cell pattern only lasted 37 seconds.

            After playing with the models we’d looked at in class, I went on to exploring the NetLogo models.  I’m taking a class on soils right now, and so I looked at the oil percolation model because I thought it would tie in nicely.  In this model, you set the porosity of the soil as a percent, and then allow the “oil” to move through it.  The “oil” can move downward diagonally to the left or right or move nowhere at all, depending on the porosity of the soil and the associated probability.  At a porosity of 65.0% or lower, the “oil” will eventually stop percolating, but at any porosity above 65.0%, the “oil” will percolate indefinitely. 

            Based on these three models, I’ve noticed a few patterns.  There seem to be three basic operations any of these models can exhibit: continuous random change, finite patterns of change, or complete extinction.  The more complex the system, the more combinations of patterns can be seen.  For example, the Game of Life showed patterns that began with random change and then lapsed into either finite patterns or complete extinction.  With the percolation model, no finite patterns developed.  There was either continual random change or eventual extinction.  I think a defining characteristic of systems that can exhibit all three patterns is the ability to modify (as opposed to merely respond to) the environment.  The Game of Life and Langton’s Ant both modify the environment, while the oil percolation model does not.  The Game of Life and Langton’s Ant show lots of different and surprising outcomes, but the percolation model either runs continually or stops.  There is also the issue of probability and randomness.  We agreed as a group to leave off talking about randomness until later, but after playing around with these models, I am especially curious as to what its role is.

Marwa's picture

Langton's Ant and Wave Machine

I looked at the Wave Machine model on Netlogo. http://ccl.northwestern.edu/netlogo/models/run.cgi?WaveMachine.821.558 The model basically shows wave motion inside a square frame. A rectangular green area represents a plate that moves up and down, and the area surrounding it (made up of lines of turtles) move up and down based on its motion, creating a wave. The wave bounces from the sides too. It looks like a relatively complicated spring-like motion when seen in 3D. It is actually a set of simple rules. The frame is made up of turtles, each connected to its four surrounding neighbors. The green plate moves in sinusoidal motion, up and down, and it pulls its neighbors with that motion. They in turn pull their neighbors up or down. When the motion reaches the edge, it is reflected back towards the center. And that creates the model of a wave.


The user can change the amplitude of the wave, the amount of friction and the level of stiffness, which is the force exerted on a turtle based on the deflection between the turtle and its neighbors. The user can also change the position of the driver and the frequency with which it moves up and down. The 2D view is not as informative as the 3D.


Similarly, the Langton's Ant was made up of two very simple rules and that led to a model that looked more complicated. In both cases, we get an interesting result from a set of simple things interacting in simple ways. I think the Langton's Ant gives rise to more “surprising” result than the wave machine. Given the rules, it is easier to figure out what the wave machine would do than the Langton's ant.


EMR's picture

Ants and Termites

I looked at Langton's Ant (the NetLogo version, which is called Vants for Virtual Ants) and also the NetLogo model Termites. Vants is fundamentally the same as the Langton's Ant model we examined in class, although the details are a bit different. The NetLogo version does not give you the ability to generate 'roadblocks,' but it does allow you to run multiple ants at once (up to 16) and to run ants in reverse. Also, the ants are not always started on the same heading (pointed in the same direction), so different runs can give slightly different rersults. I found the interactions between multiple ants very interesting- as well as the standard 'roadbuilding,' another pattern emerges wherein one ant 'discovers' the base of a road being built by another, and quickly moves straight down the road and interrupts the roadbuilder. One of the two then moves quickly back along the side of the road, and the other (hard to tell which is which) proceeds to 'erase' the road, moving back along it and reverting all the changed cells. The 'reverse' function makes the ant or ants follow the standard rules but with 'forward' and 'backward' reversed, which gives the same sort of 'erasing,' although not confined to roads. The reversal option demonstrates how the model is deterministic, as the ants eventually all end up back at the origin in a plain field, but then proceed through 'time=0.' You can go back and forth through t=0 and see that the patterns on either side of t=0 are always the same. That is, the pattern moving forward from the origin is always the same, as is that moving in reverse from the origin, but they are not the same as each other. This model demonstartes how simple interactions can lead to the complex 'roadbuilding' pattern.

The Termites model generates a field with colored patches or 'woodchips' randomly distributed throughout at a user-determined density, and a randomly distributed user-determined number of 'termites.' The termites 'wiggle' at random, and when they encounter a woodchip they pick it up, wiggle until they find another woodchip with an empty space adjacent, and set it down in the empty space. Regardless of the initial number of termites or density of woodchips, the termites deterministically end up moving the woodchips into a single large pile (although it can take a long time). Again, a set of simple interactions give rise to a surprisingly deterministic, organized result.

I found that the user controls for the Vants model gave more interesting results than those for the Termites model. However, I liked the more real-world scenario of the Termites model. It helped that the termites are actually intended to look like termites (or at least insects) while the ants were simply portrayed as triangles, but appearance is simply a nice touch, not a necessity for understanding the models.

ssv's picture

Virus on a Network vs. Langton's Ant

I looked at the Virus on a Network model.  The model cycles through an infection of a few computers on a network, to a somewhat mass infection, to then virus-resistant computers and finally some susceptible computers are left afterwards, but the virus is gone (from my scope of the model).  I assume the virus was dealt with on the resistant computers (virus scanned & quarantined).  The model runs as follows:  Every infected computer tries to infect its neighbors.  All of the susceptible computers have a varied chance of receiving the virus controlled by the user.  It has been noted in the model description (provided by NetLogo) that infected nodes don’t always notice when they are infected.  The description analogizes that with the possibility that the virus software hasn’t made its (perhaps) weekly check yet.  If found, the computer also has a “recovery chance”.  


I’ve tried a few variants of running the model.  Even when running up the number of computers that have the virus initially and the spread chance raised, eventually with time, all of the computers get the virus removed and even more computers are resistant compared to the results of other trials.  This model when compared to Langton’s Ant model share some of the same characteristics:  simple interactions yield great results (i.e. Langton--the ant has 4 required instructions to obey →(which yields) complex results and that one almost “constant” line, …Virus--the computers are infected-humans/computers eventually check for viruses-the process of being fixed occurs-then they proceed to be resistant).  The difference with both of the models consists of the user being able to draw/erase roadblocks on the Ant model for it to work around.  I consider this to be different than the virus model because I can’t pause the virus model and construct a new virus; however, I also think that the draw/erase roadblock could also possibly be compared to one of the variables in the virus model.  I think the appealing feature in the Ant model is the roadblock feature because it introduces human input into the program.  It’s interesting to see how much we can “throw it off”, meaning delay its processes.  The virus model is appealing to me as a whole as a computer science major.  Visualizing networks and the devices that interact with them fascinates me, including how when making virus conditions particularly horrible, the network still sustains itself over time.  


Given from our two ideas of how we’re exploring emergence, the Ant model relates to those ideas because even with its simple interactions, it at first surprised us when it made a line after finding a pattern and when broken down isn’t really “complicated” at all.  Both models are simple and surprising because initially it seems as both models wouldn’t “solve themselves” (i.e. the ant wouldn’t have made that line pattern and the computers on the network would still have a copy of the virus somewhere), but according to some trials of both of these models, saying they won’t do what they intend to do (follow the instructions) is false.  I’m not sure what conclusions to pull because I think there could be a bigger picture that I’m missing, but both models are fairly simple in execution but yield “big” results.  We could perhaps inquire that looking at these models (comparing data/analyzing) on a larger scale (for instance the size of a university’s computer network) could yield almost the same results, just with a different size of the model and time spent executing its directive.