Cellular Automata: Part 2

Here's a revision of last week's cellular automaton example, this time with simple graphical content (faces) and a different scheme for computing cell state. Think of it as Hollywood Squares meets Programming 101.

Click on any of the faces in the movie below. The number that appears in the upper left corner of the cell will change. The attitude of the face and its neighbors will change. Every time a cell changes the entire grid is updated, so changes ripple through the system.

The logic is very simple. Each cell is assigned a number representing its weight or influence in the system. When you click on a cell two things happen: first, the weight of that cell increases by one; then all cells in the table recalculate their values. If a cell's neighbor to left or right has a higher weight, the weight of the neighboring cell is further increased by one. If any cell acquires a weight greater than 10 it resets to zero. The graphic displayed in each cell has four states: "Asleep", "Alert", "Looking Left", and "Looking Right". "looking Left" or "Looking Right" come up if the left or righthand neighbor outweighs the present cell. The cell displays the "Alert" state if its weight is higher than its neighbors, and displays "Asleep" if it is equal to its neighbors.

Because this logic ripples through the system, the state of a cell at any moment depends on a complex intersection of conditions. Once again demonstrating how even the simplest of principles can get very confusing when it is applied independently or recursively to many agents.

Unlike last week's examples, which scanned cells above and below as well as left and right, this implementation only checks lateral neighbors. The first and last cells of the table are treated as special cases since each has only one neighbor.


University of Baltimore Logo

Copyright © 2002 School of Information Arts and Technologies