Child of Urban Suite - Structure from Randomness 1

No preview image

3 collaborators

Image001 Sharona T Levy (Author)
79107734_n00-1 Seth Tisue (Author)


(This model has yet to be categorized with any tags)
Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 4.0beta8 • Viewed 351 times • Downloaded 20 times • Run 1 time
Download the 'Child of Urban Suite - Structure from Randomness 1' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


$Id: Urban Suite - Structure from Randomness 1.nlogo 37529 2008-01-03 20:38:02Z craig $


This model demonstrates the concept of "structure from randomness". In particular, it is an implementation of the model described in the book "Cities and Complexity" by Michael Batty, on pages 43-45. For analysis and discussion beyond that provided with this model, the reader is encouraged to refer to this text.

The basic idea here is demonstrating how structured formations can easily from completely random initial data, through a simple process.


Each grid cell is initialized to have an activity value of either 1 or -1, at random.

Each tick of the model, the cell takes on a new activity value, which is the average of the activity values from its Von Neumann neighborhood (that is, itself and its 4 neighbors) from the previous step.

If KEEP-ADDING-RANDOMNESS? is switched on, then randomness is continually added to the model.


Press the SETUP button to initialize the grid squares.

Press the GO button to run the model. Press the GO ONCE button to run the model just a single tick.

If KEEP-ADDING-RANDOMNESS? is switched on, then at each time step either -1 or 1 is added to the value of each grid cell.

The ACTIVITY DISTRIBUTION shows the distribution of different activity levels present in the set of all grid cells.


First, with KEEP-ADDING-RANDOMNESS? switched OFF, notice how structural formations grow and shrink, when starting from the pure random noise. If you run the model long enough, it will converge to a steady equilibrium state (somewhere quite close to zero). However, in between the time of random noise and converged uniformity, there are structures that remain stable for considerable time periods.

When KEEP-ADDING-RANDOMNESS? is switched ON, it is slightly more difficult to discern stable structural patterns, though they are still evident. Some areas tend to stay darker, and some areas tend to stay lighter.


Let the model run for a while with KEEP-ADDING-RANDOMNESS? switched ON, then turn it off and watch the ACTIVITY DISTRIBUTION plot as the model continues to run. What happens to the left and right tail? Then turn the KEEP-ADDING-RANDOMNESS? switch back on, and watch the plot. Can you explain the changes in shape of the distribution?


Extend the model by adding agents that move around on the grid, searching for high activity cells. Have them leave trails behind them using the PEN-DOWN NetLogo primitive. How does the structure of their movement patterns relate to the underlying structure of cell activity?


Notice how simple it is to create a distribution plot in NetLogo, using lists. Look at the UPDATE-PLOT procedure in the Procedures tab. It simply resets the plot pen (to clear the plot), and then sorts the activity values of each of the patches from greatest to least, and then plots them each.


This model is related to all of the other models in the "Urban Suite".

In particular, it is related to "Urban Suite - Structure from Randomness 2", which is another model demonstrating the same concept.


This model is based on pages 43-45 of the book "Cities and Complexity" by Michael Batty.

Thanks to Seth Tisue and Forrest Stonedahl for their work on this model.

The Urban Suite models were developed as part of the Procedural Modeling of Cities project, under the sponsorship of NSF ITR award 0326542, Electronic Arts & Maxis.

Please see the project web site ( ) for more information.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

patches-own [new-activity activity]

to setup
  ask patches [ set activity one-of [-1 1] ]
  set-plot-x-range 0 count patches

to recolor  ;; patch procedure
  set pcolor 9.9 * activity

to go
  ask patches [ set new-activity (activity + sum [activity] of neighbors4) / 5 ]
  if (keep-adding-randomness?)
    ask patches [ set new-activity (new-activity + one-of [1 -1] ) ]
  ask patches [ set activity new-activity ]

to recolor-patches
  let scale max [abs activity] of patches
  ask patches [ set pcolor 5 + 4.9 * activity / scale ]

to update-plot
  foreach reverse sort [activity] of patches
    [ plot ? ]

There is only one version of this model, created about 14 years ago by Sharona T Levy.

Attached files

No files

Parent: Urban Suite - Structure from Randomness 1

This model does not have any descendants.

Graph of models related to 'Child of Urban Suite - Structure from Randomness 1'