Chapter 4 Behavior-Based Architectures

Architectures
Chapter 4
Behavior-Based
Architectures
“An architecture describes a set of architectural
components and how they interact””
✔ Encoding of responses :
discrete (e.g., rule-based) or
continuous (e.g., potential field-based)
✔ Coordination strategies :
competitive (e.g., subsumtion or voting) or
cooperative (e.g., vector addition or fuzzy logic)
Thomas Hellströ
Hellström
✔ Granularity of behavior :
Umeå
Umeå University
Sweden
microbehavior (such as situated activity systems) or
task descriptions
1
© Thomas Hellström 2001
2
© Thomas Hellström 2001
Original ASFM for the Subsumption Architecture
(augmented finite state machine)
Subsumption Architecture
Suggested by Rodney Brooks MIT (1986)
Complex control systems are not necessary for
Reset
complex behavior
Suppresor
“The world is it’s own model”
R
Intelligence is in the eye of the observer
INPUT
WIRES
“Elephants don’t play chess”
“Planning is just a way of avoiding figuring out
BEHAVIORAL
I
S
MODULE
OUTPUT
WIRES
Inhibitor
what to do next”
Each ASFM encapsulates a behavioral transformation
No representation. No calibration. No complex
computers. No High bandwidth communication
3
© Thomas Hellström 2001
4
© Thomas Hellström 2001
An obstacle-avoiding and light-seeking robot
Subsumption Architecture
Two engines for propulsion and stearing
4 ultrasonic distance sensors Dleft,Dright,Dfront,Drear
One photocell that gives the angle to the light source
✔ (Originally) layers with AFSM:s. Each layer
has a separate goal. fig 4.5 p.134
Charger
✔ “the Behavior Language” (Brooks 1990)
Dleft
allows the user to express behaviors as
rules. These are complied into AFSM form.
Drear
Dfront
Photo cell
Dright
© Thomas Hellström 2001
5
© Thomas Hellström 2001
Obstacle
6
Light-seeking (photo taxis)
Obstacle avoidance
US sensor
Motors
Avoid
Battery
The behavior “Avoid” contains code that maps the signals
Photo cell
from the 4 US sensors to the actuator (Motors). E.g.:
The behavior “Charge” contains code that turns the robot towards a
If Dfront<d0 or Drear<d0 or Dleft<d0 or Dright<d0
% Act only if an obstacle is close
if Drear<min(Dleft, Dright, Dfront) and Dfront>S0
“move ahead””
% Go away from obstacles
else
if Dleft<Dright then “turn right””
if Dright<Dleft then “turn left””
end
end
light source (the charger) and moves forward and docks it.
E.g:
If Battery<10 and PhotoCell active in direction D
“turn to direction D”” and “move ahead””
end
7
© Thomas Hellström 2001
Charge
8
© Thomas Hellström 2001
Subsumption of Behaviors
Subsumption Architecture
✔ The lower levels have no awareness of higher levels
Battery
✔ Coordination has two mechanisms:
Photo cell
Charge
US sensor
Avoid
S
– Inhibition. Stops a signal being transmitted
– Suppression. Stops and replaces a signal
Motors
✔ Higher levels may access lover levels but very low
bandwidth. “The world serves as primary medium
of communication”
The S is a suppressor node that suppresses messages from Avoid iff
Charge sends messages at the same time.
Charge subsumes Avoid in order to produce a higher level of behavior.
✔ “Situatedness”: the robot can sense the
surroundings and thus avoids abstract
representations.
✔ “Embodiment”: The robots should be physical
creatures, not simulations.
9
© Thomas Hellström 2001
10
© Thomas Hellström 2001
Subsumption Architecture
Subsumption Architecture
Heuristic rules for design and development (Mataric 1992)
Advantages:
1. Specify the behavior needed for the task
2. Decompose the behaviors as a set of disjoint actions
3. The lowest level of decomposed behaviors should be
grounded onto sensors and actuators.
Hardware retargetability
Can compile AFSM:s into hardware
Support for parallelism
Each layer can run independently
Disadvantages:
✔ Use small motions instead of large ballistic ones!
Bad runtime flexibility
✔ Coordination by:
Priorities are hardwired
- establishing priorities
- testing
- modifying
Bad support for modularity
Upper layers interfere with lower ones and are not
independent
Examples p.136-139
© Thomas Hellström 2001
11
© Thomas Hellström 2001
12
Examples of Motor Schemas
Motor Schemas
✔ Inspired from biology (p.70-71)
✔ Move-ahead
✔ Corresponds to a behavior:
✔ move-to-goal
Behavior
Motor Schema
✔ avoid-static-obstacles
Respons
Stimuli
Perceptual
Schema
✔ dodge: sidestep a projectile
Respons
✔ escape
✔ Responses are represented in a uniform format:
✔ stay-on-path
Vectors with Strength and Orientation
✔ noise
Example: “avoid-static-obstacle” (p.146):
✔ follow-the-leader
0
for d>S
S−d
•G for R< d≤S
Vmagnitude= 
S
R
−

for d≤R
∞
Vdirection= Radially along a line from the obstacle towards the robot
✔ probe: move towards open areas
✔ dock
✔ avoid-past
13
© Thomas Hellström 2001
14
© Thomas Hellström 2001
Schema-Based Coordination
Motor Schemas
✔ The schemas can operate asynchronously and
✔ Vector summation!
wait for the percepts
✔ Each schema (behavior) has an associated gain G
which is fixed or subject to learning
Example: p.152 Biological parallels p.154
✔ No predefined hierarchy between different
schemas exists
✔ Note: The respons only has to be computed for the
robots location.
✔ Schemas can be instantiated and deinstantiated
at any time
✔ The sum must be normalized (often by clipping)
15
© Thomas Hellström 2001
16
© Thomas Hellström 2001
Perceptual and Motor Schemas
with Coordination
Perceptual Schemas
✔ The inputs (stimuli) to the Motor Schemas
✔ The Perceptual Schema pre processes inputs to suit the
Thermometer
Motor Schemas
PS1
Vector
summation
MS1
PS2
✔ Perceptual Schemas are recursively defined. I.e.: they
can serve as input to other Perceptual Schemas. (p.144)
Infrared sensor
PSS1
Camera
PSS2
MOTORS
PS1
© Thomas Hellström 2001
Infrared sensor
PSS1
Camera
PSS2
PS3
17
© Thomas Hellström 2001
MS2
PS
PS - -Perceptual
PerceptualSchema
Schema
PSS
PSS- -Perceptual
PerceptualSubschema
Subschema
MS
MS - -Motor
MotorSchema
Schema
18
Some problems with Motor Schemas
Architectural Design Issues
Disadvantages:
✔ Sensitive to local minima (p.156)
✔ Analysis versus synthesis
✔ Cyclic behavior (p.158)
Solutions:
- Injecting randomness (p.157)
- Adding a “avoid-past” schema that generate a
repulsive force from recently visited areas (p.159,160)
✔ Top-down versus Bottom-up design
✔ Domain relevance versus domain
inpedendence
Advantages:
✔ Support for parallelism
✔ Biological versus machine intelligence
✔ Run time flexibility
✔ Support for modularity
© Thomas Hellström 2001
19
© Thomas Hellström 2001
20