Session 4: Examples & References

Behaviour & Agency

A system begins to feel like it has behaviour when its actions depend on its current state, its environment or the actions of other elements.

The rules can be extremely simple.

While looking through these examples, ask:

Generative Design P_2_2: agents, paths and systems

Selected agent and system examples from Generative Design P_2_2

Selected P_2_2 examples from Generative Design.

The P_2_2 section of Generative Design / Generative Gestaltung is one of the most useful practical references for this session.

Instead of concentrating on grids and static variation, these examples introduce elements that move, respond, accumulate and interact.

The series progresses through several different ideas.

P_2_2_1: a simple wandering agent

The first examples describe what the code itself calls a “stupid agent”.

The agent has:

The resulting drawing is not designed line by line.

It is the history of the agent’s movement.

P_2_2_2: more directed behaviour

The next examples introduce additional logic.

Movement can depend on:

The agent still follows relatively simple rules, but its behaviour becomes more structured.

P_2_2_3: connected agents

Several points change independently but remain connected as one form.

The individual movements are simple, while their relationship produces an evolving larger shape.

This introduces an important idea:

An element can have its own behaviour while still belonging to a larger system.

P_2_2_4: diffusion aggregation

New elements are placed according to their relationship with elements that already exist.

A global branching structure gradually emerges from many local proximity decisions.

The final form is not drawn in advance.

P_2_2_5: circle packing

New circles are added wherever space is available without overlapping existing circles.

The system gradually fills the available area.

Here the environment itself changes as the system develops.

Each new circle changes what is possible for the next one.

P_2_2_6: linked pendulums and traces

Several linked oscillating elements move at related speeds and lengths.

Their movement produces paths over time.

The final image is a trace of the system’s behaviour.

Look for

Across the P_2_2 series, identify:

Do not only look at the final images.

Open the code and ask:

Which rule is responsible for which behaviour?

Try this

Choose one P_2_2 example.

Before changing anything, identify:

  1. What is the agent or active element?
  2. What state does it store?
  3. What changes every frame?
  4. What conditions affect its behaviour?
  5. Where does randomness enter?
  6. What produces the visible trace?

Then change one behavioural relationship rather than redesigning the whole program.

For example:

Keep the movement, but change the boundary response.

Or:

Keep the agent, but change when it leaves a mark.

Or:

Keep the system, but change what it responds to.

References

Braitenberg Vehicles: simple systems, apparent intention

Diagram of simple Braitenberg vehicles using sensors and motors

Valentino Braitenberg, Vehicles: Experiments in Synthetic Psychology.

In Vehicles, Valentino Braitenberg imagines a series of extremely simple machines.

A basic vehicle might contain:

Changing only the relationship between these components can produce very different behaviours.

A sensor might increase the speed of the motor on the same side.

Or it might control the opposite motor.

The vehicle may then appear to:

The mechanism remains simple.

What changes is how we interpret its behaviour.

Look for

Questions

This question will return later when working with AI systems.

Try this

Imagine an element with two values:

left sensor
right sensor

and two possible actions:

turn left
turn right

Invent different relationships between sensing and action.

For example:

object close on left → turn right

Then reverse the rule.

What kind of behaviour appears?

References

Steering and response

A useful way to think about a simple agent is:

state
  ↓
sense
  ↓
decide
  ↓
act
  ↓
new state

The element does not need to be intelligent.

It only needs a relationship between its current situation and what happens next.

For example:

Attraction

target is to the right
↓
turn right

Repulsion

object is close
↓
move away

Boundary response

edge reached
↓
change direction

Following

another element is ahead
↓
move toward it

Wandering

occasionally change direction

These behaviours can be combined.

A system can therefore become more complex without introducing a completely new mechanism.

The complexity can come from several simple rules operating at the same time.

Craig Reynolds: Boids

Craig Reynolds boids flocking simulation showing many agents moving collectively

Craig Reynolds, Boids, 1986.

Craig Reynolds developed the Boids model to simulate coordinated group movement such as flocks of birds and schools of fish.

Instead of programming the path of every individual bird, each boid responds only to nearby neighbours.

The classic model uses three local steering behaviours.

Separation

Avoid crowding nearby neighbours.

too close → move away

Alignment

Move toward the average heading of nearby neighbours.

neighbours moving this way → turn toward that direction

Cohesion

Move toward the average position of nearby neighbours.

group is over there → move toward group

None of these rules describes a flock.

The flock appears when many agents follow the rules simultaneously.

The important relationship is:

local rules → interactions → global behaviour

Look for

Questions

Try this

Do not begin by implementing the complete Boids algorithm.

Start with one relationship.

For example:

Several elements move independently. If two become too close, they move apart.

Observe the result.

Then add another rule.

They also gradually align their direction.

What changes?

The aim is to understand how several local relationships combine, not to copy a finished flocking implementation.

References

Conway’s Game of Life: behaviour without moving agents

Conway's Game of Life showing cells evolving through several generations

Conway’s Game of Life.

Conway’s Game of Life is a cellular automaton developed by mathematician John Conway in 1970.

The system consists of a grid of cells.

Each cell can be:

alive

or:

dead

A cell does not move.

Instead, its next state depends on the number of living neighbouring cells.

The standard rules can be summarised as:

These local rules are applied repeatedly across the whole grid.

From them emerge:

Look for

Questions

Try this

Imagine a simpler version with only two rules.

For example:

if exactly one neighbour is active → activate
otherwise → deactivate

Draw several generations manually on graph paper.

What kind of behaviour appears?

The point is not to reproduce the Game of Life exactly.

The point is to see how local state changes can produce global dynamics.

References

Feedback

A response becomes feedback when the result of an action changes what can happen next.

A simple response might be:

mouse moves
↓
circle follows

A feedback loop might be:

agent moves
↓
agent leaves a trail
↓
trail changes the environment
↓
agent senses the trail
↓
agent changes direction
↓
new trail

The system is now partly responding to its own history.

Feedback can produce:

Positive feedback

A change reinforces itself.

more agents
↓
more attraction
↓
more agents gather
↓
even more attraction

Negative feedback

A change reduces itself.

too dense
↓
agents move apart
↓
density decreases

Many interesting systems combine both.

Questions

Jean Tinguely: the machine has character

Jean Tinguely Meta-Matic drawing machine producing a drawing

Jean Tinguely, Méta-Matic drawing machines, 1959.

Jean Tinguely’s Méta-Matics were machines that produced drawings.

But their importance is not simply that machines could draw.

Traditional machines are often associated with:

Tinguely’s machines introduced:

The machine becomes expressive precisely because it does not behave like a perfect technical instrument.

Tinguely used the term Méta-Matic for machines that could themselves produce artworks.

This complicates the relationship between:

artist → machine → participant → drawing

Look for

Questions

Try this

Take a perfectly functional digital drawing tool.

Add one limitation.

For example:

Do not add many effects.

Add one behavioural characteristic and see whether the tool begins to feel different.

References

Behaviour, trace and drawing

Movement can become visible when the system leaves a trace.

rule
↓
behaviour
↓
movement
↓
trace
↓
drawing

This produces an important shift.

Instead of designing:

What should the drawing look like?

design:

What should the system do?

The final image becomes evidence of the process that created it.

A trace can record:

Two runs of the same behavioural system may therefore produce different drawings while still clearly belonging to the same family.

This is the connection to the drawing machine exercise.

→ Drawing machine references

Five ingredients of behaviour

When building or analysing a behavioural system, it can help to separate five ingredients.

1. State

What does the element currently know or remember?

For example:

position
velocity
direction
age
energy
previous state

State describes the current condition of the system.

2. Perception

What information can affect the element?

For example:

canvas boundary
mouse position
distance to another element
neighbouring cells
existing trail
sound
time

Perception does not need to be realistic sensing.

It simply means information available to the rule.

3. Rule

How is that information interpreted?

For example:

if distance < 50 → move away

or:

if edge reached → reverse velocity

The rule connects perception with action.

4. Action

What can the element change?

For example:

move
rotate
accelerate
stop
draw
change state
create another element
remove itself

5. Feedback

How do those actions affect future conditions?

For example:

draw trail
↓
trail changes environment
↓
future movement changes

These five ingredients do not need to appear equally in every system.

A very simple behaviour may only use a few.

From movement to behaviour

It can help to compare several levels of complexity.

Movement

x = x + 1

The value changes.

Response

if edge reached → reverse direction

The change depends on a condition.

Behaviour

move
↓
sense
↓
respond
↓
update
↓
repeat

Several relationships operate over time.

Collective behaviour

many agents
+
local relationships
↓
emergent global pattern

The larger structure is not explicitly drawn.

It emerges from interaction.

Things to investigate

When you encounter an agent-based, interactive or behavioural system, try to reverse-engineer it.

Ask:

  1. What is the smallest behaving element?
  2. What state does it store?
  3. What can it sense?
  4. What rules connect sensing to action?
  5. What changes every frame?
  6. What is deterministic?
  7. What is probabilistic?
  8. How does it respond to boundaries?
  9. Does it interact with other agents?
  10. Does it change its environment?
  11. Does the changed environment affect future behaviour?
  12. Is there feedback?
  13. Does it leave a trace?
  14. What global behaviour emerges from the local rules?
  15. Would changing one small rule produce a very different system?
  16. Why do we describe the behaviour as purposeful, expressive or intelligent?

The goal is not simply to create more complicated movement.

The goal is to understand how relationships between state, sensing, rules and feedback create behaviour.

→ Drawing machine references
→ Notes on this session
→ Back to Session 4