Stems, an Experiment in Self Organizing Construction
Architects say a major challenge with the next generation of massive buildings is creating the machines that can do the job. These structures are too large to be constructed by a traditional crew with hand tools. They need the construction equivalent of a sewing machine, something that can stay on the leading edge of the structure, and then push itself on top of its last stage, to start the next stage.
That’s what I had in mind for this project. I wanted to create a set of simple agents that would interact to create building-like structures. But instead of the building machines following a rigid plan, I imagine machines that obey simple predetermined rules for behavior, that interact as they build, creating an architecture that could not be predicted by understanding the machines themselves.
At first I imagined two agents: The relationship between the two agents is sort of like a bush and a gardner with a trimmer. Multiple bush-agents follow a simple growing path of laying out the parts of the structure. The other agent navigates the structure, trimming some parts, and augmenting others. Unlike some gardener’s at Disney, it would follow simple rules about how to navigate the bush, where to trim, and where to add more bush-agents.
I abandoned the second gardner agent, for a simpler one agent scenario: the stem.
A stem is a chunk of building material that grows and splits to form building-like structures. A stem is a solid three dimensional rectangle. Of it’s six sides, four are interesting:
1. foot
2. head
3. face
4. left.
Each stem is assigned a generation number when created. A new stem inherits it’s parent’s generation plus one, except for "grow up", as explained below.
A stem has a simple life cycle:
1. After it is created, it waits a fixed amount of time before it attempts to grow.
2. When it is time to grow, it does one of the following “growth options”:
Grow up: If it is touching another stem, ignoring it’s parent that created it, and it’s siblings. If so, grow upward regardless of your orientation.
Grow from head: If your generation number is not divisible by 3.
Grow from face and left: If your generation number is 3.
Do not grow: if your generation is Nine.
3. At this point, the stem stays static and never grows again.
That’s all the behavior that a stem has. Here are more details on the four growth options.
Grow up: Creates a new stem above itself. This is the only grow option that assigns the new stem's generation to one.
Grow from head: Create a new stem with the same orientation as it’s self.
Grow from face and left: Create two new stems perpendicular to itself. The stem that grows foot from parents face should have it’s face pointing toward the parents foot. The other new stem should grow foot from the parents left, and face in toward the other new stem. Its left side should point down toward it’s parents foot.
Do not grow: The stem does nothing at all.
The software that implements these rules starts out by dropping two, three or four stems at random locations near each other and starts them growing. Once the initial stems are placed, there are no more random choices, the rest are completely deterministic.
After no more growth, it resets with new randomly placed stems. It also resets after 500 stems have been created.
If you watch for a while, you sometimes see several blocks with no additional growth, other times you see a simple repeating pattern, like a zipper, and still other times you get a complex mesh that seems to get more complex as it gets taller.
Keystrokes of interest:
Esc – quit.
L – turn off the lighting
B – Blend mode. This used to have a transparent effect, but for some reason it just turns everything white.
Enjoy!
David Lotts
dlotts@pobox.com