Part II — Behaviour-based robotics · Chapter 6

Behaviours, arbitration and the subsumption architecture

~35 min read3 interactive widgets3 plates

In this chapter

  1. Behaviour-based control
  2. What is a behaviour?
  3. Behaviour coordination: arbitration and fusion
  4. Arbitration and its implementations
  5. Finite state automata: an example and an assessment
  6. The subsumption architecture
  7. Competences and layers
  8. Properties of the subsumption architecture
  9. Augmented FSMs and Genghis
  10. Summary and final observations
  11. Check your understanding

1. Behaviour-based control

Four statements define the field:

The lectures give a list of examples, which is worth reading slowly because it spans a much wider range of abstraction than students expect:

Avoid objectsFind path
Follow wallRecharge
Find objectHide from the light
Track personAggregate with your team
Build map
Key idea

"Build map" and "aggregate with your team" are in the same list as "avoid objects". That is deliberate: behaviours can be designed at a variety of levels of detail or description. A behaviour is not by definition a reflex — it is whatever unit your architecture treats as a composable module.

2. What is a behaviour?

Chapter 1 left this as an open question ("how would you define a behaviour or an action?"). Here is the course answer, in four clauses:

ClauseStatement
PurposeBehaviours achieve and/or maintain particular goals (e.g. homing, wall-following)
DurationBehaviours are time-extended, not instantaneous: they take some time to achieve and maintain their goals
ConnectivityBehaviours can take inputs from sensors and also from other behaviours, and can send outputs to actuators and to other behaviours
CompositionWe can create networks of behaviours that interact with each other

And the one-line contrast to memorise: behaviours are more complex than actions.

Four observations

  1. Behaviours can be designed at a variety of levels of detail or description (level of abstraction).
  2. Parallel execution and distributed control are often required.
  3. The network of behaviours can store states and can be used to construct a model of the world. It can store history and look ahead into the future.
  4. Behaviours are usually designed so that they operate on compatible time-scales.
For the exam — the observation students forget

Observation 3 is the answer to the most common misconception about behaviour-based robotics. It is not "reactive control with a nicer name": a network of behaviours can store state, build a world model, keep history and look ahead. What behaviour-based robotics rejects is not representation as such, but a single central symbolic model that everything must go through. Keep this distinction sharp — it is exactly what separates rows 2 and 3 of the architecture table in Chapter 4.

Observation 4 is a practical trap. If one behaviour reacts in 10 ms and another needs 2 seconds, composing them produces an incoherent robot: the slow behaviour never gets to finish anything. Designing for compatible time scales is a real constraint in the lab, not a footnote.

3. Behaviour coordination: arbitration and fusion

Once you have a collection of behaviours, you face the problem of deciding what behaviour to perform next — and more generally the problem of composing behaviours. Several architectures have been proposed. The course organises them all under two headings:

MethodSchemeDefinitionChapter
ArbitrationCompetitiveProcess of selecting one behaviour among possible candidatesThis chapter
FusionCooperativeProcess of combining multiple possible behaviours into a single behaviour for the robotChapter 7
Key idea

Competitive versus cooperative is the cleanest two-word summary of Part II. In arbitration, exactly one behaviour wins and the others are silenced. In fusion, all of them contribute and the output is a blend. The subsumption architecture is the canonical arbitration scheme; motor schemas are the canonical fusion scheme; and — as Chapter 7 will show — the Extended Braitenberg Architecture of Chapter 5 was already a fusion scheme, since it sums process outputs per motor.

4. Arbitration and its implementations

Arbitration is the process of selecting one behaviour among possible candidates. The lectures list four ways to implement it:

At each iteration, choose the behaviour with maximal priority. The priority can be fixed or it can change at run time.

This is the mechanism underlying the subsumption architecture, where the priority ordering is the layer ordering: higher layers subsume lower ones.

Using rules of the type IF condition THEN behaviour X.

Simple, readable, and the natural first thing a student writes in lab activity 2. Its weakness appears when conditions overlap: nothing in the formalism tells you which rule wins, so you end up re-inventing priorities anyway.

Finite state automata — also probabilistic.

States are behaviours, transitions are percepts. See section 5 for the worked example and the assessment.

Behaviour trees. The subject of Chapter 8, where we will see that BTs subsume both FSMs and the subsumption architecture — a fallback node with children ordered by priority is exactly a subsumption stack.

5. Finite state automata: an example and an assessment

The FSA for random walk + collision avoidance

The worked example from the lectures composes three behaviours — Random Walk, Phototaxis and Collision avoidance — driven by three percepts, with the priority ordering:

obstacle  ≺  light  ≺  no percepts

Read as "has higher priority than" in the sense used in the slide: an obstacle percept dominates a light percept, which dominates the absence of percepts. The resulting automaton:

Current statePerceptNext state
Random Walkno perceptsRandom Walk
Random WalklightPhototaxis
Random WalkobstacleCollision avoidance
PhototaxislightPhototaxis
Phototaxisno perceptsRandom Walk
PhototaxisobstacleCollision avoidance
Collision avoidanceobstacleCollision avoidance
Collision avoidancelightPhototaxis
Collision avoidanceno perceptsRandom Walk

The lectures state explicitly what this construction is: this FSA implements an arbitration based on the priorities of the signals coming from the sensors. The priority is not written anywhere as a number — it is encoded in the transition table, which is both the strength and the weakness of the approach.

Considerations on FSA

In favourAgainst
Powerful model for composing simple behavioursNot easy to extend: all the automaton must be redefined
Formal analysis possibleNot modular and not easy to compose several FSA
Achieves separation between model and execution — you specify the FSA, and general code executes it

And one addition that will matter twice later in the course: probabilistic FSA are useful for avoiding cycles, and in swarm robotics contexts. Chapter 9 uses a probabilistic FSA for adaptive prey retrieval and for aggregation; Chapter 11 has AutoMoDe generate probabilistic finite state machines automatically.

Careful — the extendibility argument

"Not easy to extend: all the automaton must be redefined" is the exact complaint that the subsumption architecture answers with incremental design, and that behaviour trees answer with modularity. When you are asked to compare coordination mechanisms at the oral, this is the axis to argue along: adding a tenth behaviour to an FSA can require revisiting all ninety transitions, while adding a tenth layer to a subsumption stack is meant to leave the previous nine untouched.

6. The subsumption architecture

The headline definition:

Requirements for a real robot

Brooks motivates the architecture from four requirements that a real robot must satisfy:

  1. Multiple goals, possibly conflicting — e.g. obstacle avoidance and block pushing.
  2. Multiple sensors.
  3. Robustness.
  4. Extendibility.

Two decompositions of the same robot

The central figure of Brooks's A robust layered control system for a mobile robot is a pair of diagrams: the traditional decomposition of a mobile robot control system into functional modules, versus a decomposition based on task-achieving behaviours.

TWO WAYS TO CUT THE SAME ROBOT A · FUNCTIONAL MODULES (classical sense-think-act) perceptionsensors in modelling planning task execution motor controlactuators out Cut one module out and NOTHING works: no module produces behaviour on its own. Every signal crosses the whole chain, so the loop is as slow as the slowest stage. B · TASK-ACHIEVING BEHAVIOURS (subsumption) reason about behaviour of objects plan changes to the world identify objects explore avoid objects sensors actuators each layer runs from sensors to actuators cut the top layers off and what remains is STILL a complete, working robot
Plate 6.1 — Brooks's two decompositions. Diagram A is cut vertically by function; diagram B is cut horizontally by task. The consequence is in the right-hand note: in B, every horizontal slice is a whole robot, which is what makes incremental design and graceful degradation possible.

7. Competences and layers

Definition

A level of competence is an informal specification of a desired class of task-achieving behaviours for a robot over all environments it will encounter.

Two words in that definition carry weight. Informal: a competence is not a formal specification, and Brooks does not pretend otherwise. Over all environments it will encounter: a competence must hold across the robot's whole niche (Chapter 3), not just in the arena where you debugged it.

From the definition follows the main idea:

We can build layers of a control system corresponding to each level of competence, and simply add a new layer to an existing set — incremental design.

THE SUBSUMPTION STACK SENSORS (multiple) LEVEL 2 · explore LEVEL 1 · wander LEVEL 0 · avoid obstacles S I ACTUATORS suppress inhibit cut here: levels 0-1 still form a complete operational control system CRUCIAL PROPERTY: at every time instant, any actuator receives signals from AT MOST ONE level. That is why this is arbitration (competitive) and not fusion (cooperative).
Plate 6.2 — The layered stack. Higher layers reach down into the wiring of lower ones through suppression and inhibition nodes rather than calling them as subroutines. The dashed line shows the partitioning property: everything below it works on its own.

Widget — Build a subsumption stack incrementally

Add layers one at a time, then set the world condition and see which layer owns the actuators. Note two things: adding a layer never edits the ones below it, and exactly one layer is ever in control.

World:

8. Properties of the subsumption architecture

Four properties, stated in the lectures. Learn all four; the third is the one that decides exam answers.

  1. Higher layers assume the existence of lower layers and the goals they are achieving, so they can use lower ones to achieve their own goals — either by using them while they are running or by inhibiting them selectively.
  2. Higher level layers subsume the roles of lower level layers when they wish to take control. (This is where the architecture gets its name.)
  3. Crucial property to be guaranteed: at every time instant, any actuator receives signals from at most one level.
  4. The system can be partitioned at any level, and the layers below form a complete operational control system.
For the exam

Property 3 is the formal reason subsumption is an arbitration (competitive) scheme and not a fusion one. If two levels could drive the same actuator at once, you would be blending — that is motor schemas, Chapter 7. Any implementation of yours that averages the output of two layers has stopped being a subsumption architecture, whatever the robot does.

Careful — lab activity 3

The lab handout warns you about exactly this. You are asked to implement the subsumption architecture in ARGoS with Lua, where only sequential processes can be run, so some variants with respect to the architecture are unavoidable. The requirement is to keep the main features: implement each level as a function that reads from the sensors all the data it needs for its competence, and build step() by combining the functions without a central control — no centralised dispatcher that checks conditions and chooses which function to run. Functions should communicate and coordinate via arguments (input and output ones), so that adding an extra layer consists in just adding a function. Design your code so that a further level can be added with a rather limited amount of changes to the previous code.

-- lab activity 3: subsumption WITHOUT a central dispatcher
-- each layer takes the command produced so far and may override it

function step()
  local cmd = { vl = 0, vr = 0, taken = false }
  cmd = layer0_avoid(cmd)        -- lowest competence, runs first
  cmd = layer1_phototaxis(cmd)   -- may override only if layer0 did not take control
  cmd = layer2_halt_on_black(cmd)
  robot.wheels.set_velocity(cmd.vl, cmd.vr)
end

function layer1_phototaxis(cmd)
  if cmd.taken then return cmd end          -- subsumed by a higher-priority layer
  local l, r = light_left_right()
  if l + r < EPS then return cmd end        -- this competence has nothing to say
  return { vl = BASE + K * r, vr = BASE + K * l, taken = true }
end

Note how the taken flag implements property 3 mechanically: once a layer has claimed the actuators, no other layer can write to them in the same control step.

9. Augmented FSMs and Genghis

Augmented finite state machines

The first implementations of this architecture were in hardware, with each level made of augmented FSMs. An AFSM may also have auxiliary data structures and memory such as registers, queues and clocks.

The registers and clocks are not a detail. They are what allows a subsumption layer to be time-extended and to hold a little state — exactly observation 3 of section 2 — without any central world model.

Genghis

The worked example is Brooks, R. A., A Robot That Walks; Emergent Behaviors from a Carefully Evolved Network, MIT AI Lab Memo 1091, February 1989. Genghis is a six-legged walking robot whose control system is built as eight layers:

LevelCompetenceWhat it does
0StandupControls leg motors
1Simple-walkMove forward and backward
2Force balancingLeg control over rough terrain
3Leg liftingSubsumes normal leg lifting for scaling high obstacles
4WhiskersAnticipates obstacles and lifts front legs
5Pitch stabilisationActs on balancing motors in the legs
6ProwlingTo walk only when there is something moving nearby
7Steered prowlingTo follow objects
GENGHIS — EIGHT LEVELS OF COMPETENCE (Brooks, 1989) 7 · steered prowling — follow objects 6 · prowling — walk only when something moves nearby 5 · pitch stabilisation 4 · whiskers — anticipate obstacles, lift front legs 3 · leg lifting — scale high obstacles 2 · force balancing — rough terrain 1 · simple-walk — forward and backward 0 · standup — controls leg motors increasing competence higher layers subsume lower Partition anywhere: levels 0-1 alone are already a robot that walks. Levels 0-4 are a robot that walks over rough ground and steps over obstacles.
Plate 6.3 — Genghis. Level 3 is named in the slides as the one that "subsumes normal leg lifting" — a literal instance of the property that gives the architecture its name.

Considerations on Genghis

Four conclusions are drawn:

Editor note

The fourth point is aimed squarely at the classical architecture of Plate 6.1A, whose "modelling" box is a central repository for sensor fusion. Genghis walks over rough terrain without ever building one. Notice also the resonance with Chapter 9: "coherent macro-behaviours from many independent micro-behaviours" is, word for word, the design problem of swarm robotics — only there the micro-behaviours are distributed across robots rather than across layers.

10. Summary and final observations

Summary of the subsumption architecture

Final observations

The subsumption architecture was proposed as an engineering approach to intelligent systems design, and should be considered a successful practical example of behaviour-based robotics. However, it contributes a number of relevant ideas for intelligent systems design and cognitive science in general:

The wider argument behind these slides is Brooks's, in Elephants Don't Play Chess (Robotics and Autonomous Systems 6, 1990): there is an alternative route to Artificial Intelligence that diverges from the direction pursued for thirty years. The traditional approach emphasised the abstract manipulation of symbols whose grounding in physical reality has rarely been achieved; the alternative — nouvelle AI, or situated activity, based on the physical grounding hypothesis — emphasises ongoing physical interaction with the environment as the primary source of constraint on the design of intelligent systems. Where the traditional methodology decomposes intelligence into functional information processing modules whose combinations provide overall system behaviour, the new one decomposes it into individual behaviour generating modules whose coexistence and co-operation let more complex behaviours emerge. As Brooks notes, in classical AI none of the modules themselves generate the behaviour of the total system — you must combine many of them to get any behaviour at all.

Widget — Which decomposition is being described?

Each statement belongs to one of the two decompositions of Plate 6.1. Getting these apart reliably is most of what an exam question on this chapter asks.

Check your understanding

Define a behaviour, using the four clauses given in the lectures.

Behaviours achieve and/or maintain particular goals (e.g. homing, wall-following); they are time-extended, not instantaneous — they take some time to achieve and maintain their goals; they can take inputs from sensors and from other behaviours and send outputs to actuators and to other behaviours; and they can be composed into networks of behaviours that interact with each other. Behaviours are more complex than actions.

Can a behaviour-based controller have memory and a world model?

Yes. The lectures state explicitly that the network of behaviours can store states and can be used to construct a model of the world, that it can store history and look ahead into the future. What behaviour-based robotics rejects is the single central symbolic model of the classical architecture, not representation as such. This is the main difference from purely reactive control, which has minimal (if any) state.

What are the two main methods of behaviour coordination, and how do they differ?

Arbitration — a competitive scheme — is the process of selecting one behaviour among possible candidates. Fusion — a cooperative scheme — is the process of combining multiple possible behaviours into a single behaviour for the robot. Subsumption is the canonical arbitration mechanism; motor schemas and the Extended Braitenberg Architecture are fusion mechanisms.

List four ways of implementing arbitration.

(1) At each iteration, choose the behaviour with maximal priority, fixed or changing at run time. (2) Rules of the type IF condition THEN behaviour X. (3) Finite state automata, also probabilistic. (4) Behaviour trees.

Describe the FSA for random walk with collision avoidance, including the priority ordering.

Three states — Random Walk, Phototaxis, Collision avoidance — with transitions driven by three percepts and the priority ordering obstacle ≺ light ≺ no percepts. An obstacle percept always sends the automaton to collision avoidance from any state; a light percept sends it to phototaxis unless an obstacle is present; the absence of percepts returns it to random walk. The lectures note that this FSA implements an arbitration based on the priorities of the signals coming from the sensors.

Give three advantages and two disadvantages of FSA for composing behaviours.

Advantages: a powerful model for composing simple behaviours; formal analysis is possible; it achieves a separation between model and execution (you specify the FSA and general code executes it). Disadvantages: not easy to extend — all the automaton must be redefined; not modular and not easy to compose several FSA. Probabilistic FSA are additionally useful for avoiding cycles and in swarm robotics contexts.

Define a level of competence and state the main idea it leads to.

A level of competence is an informal specification of a desired class of task-achieving behaviours for a robot over all environments it will encounter. Main idea: build layers of a control system corresponding to each level of competence, and simply add a new layer to an existing set — incremental design.

State the four properties of the subsumption architecture.

(1) Higher layers assume the existence of lower layers and the goals they achieve, so they can use lower ones to achieve their own goals, either by using them while they run or by inhibiting them selectively. (2) Higher level layers subsume the roles of lower level layers when they wish to take control. (3) Crucially, at every time instant any actuator receives signals from at most one level. (4) The system can be partitioned at any level, and the layers below form a complete operational control system.

Why is property 3 the reason subsumption counts as arbitration rather than fusion?

Because it forbids more than one level from driving an actuator simultaneously. Coordination therefore resolves to selecting a single winning behaviour — the competitive scheme — rather than blending the contributions of several behaviours, which is what fusion does. An implementation that averages the outputs of two layers is no longer a subsumption architecture.

What is an augmented FSM, and why does the "augmented" part matter?

The first implementations of subsumption were in hardware, with each level made of augmented finite state machines. An AFSM may also have auxiliary data structures and memory such as registers, queues and clocks. This matters because those registers and clocks are what let a layer be time-extended and hold local state — giving the architecture memory without any central world model.

List the eight levels of Genghis.

0 Standup (controls leg motors); 1 Simple-walk (move forward and backward); 2 Force balancing (leg control over rough terrain); 3 Leg lifting (subsumes normal leg lifting for scaling high obstacles); 4 Whiskers (anticipates obstacles and lifts front legs); 5 Pitch stabilisation (acts on balancing motors in the legs); 6 Prowling (walk only when there is something moving nearby); 7 Steered prowling (follow objects).

What four conclusions does the course draw from Genghis?

Robust walking behaviours can be produced by a distributed system with very limited central coordination; higher level competences can be seamlessly integrated over lower level ones; coherent macro-behaviours can arise from many independent micro-behaviours; and there is no need to postulate a central repository for sensor fusion.

Summarise the subsumption architecture in seven points.

Built bottom up; components are task-achieving actions/behaviours, not functional modules; components can be executed in parallel (multitasking); components are organised in layers; the lowest layers handle the most basic tasks; newly added components and layers exploit the existing ones; and there is no use of internal models — "the world is its own best model".

Beyond engineering, what general ideas does the subsumption architecture contribute?

It is based on development/evolution considerations; it realises sensor-actuator couplings with little internal processing; and it conceptualises intelligence as emergent from a large number of loosely coupled parallel processes. The architecture itself is presented as an engineering approach and a successful practical example of behaviour-based robotics.