Title: Reactive Paradigm
1Reactive Paradigm
2Lessons from Biology
- Programs should decompose complex actions into
behaviors. Complexity emerges from concurrent
behaviors acting independently - Agents should rely on straightforward activation
mechanisms such as IRM - Perception filters sensing and considers only
what is relevant to the task (action-oriented
perception) - Behaviors are independent but the output may be
used in many ways including combined with others
to produce a resultant output or to inhibit others
3Hierarchical Organization is Horizontal
4Biological Systems are Vertical
5Sensing is Local
6Braitenburg Vehicles
- Purely reactive systems
- Concepts described by Valentino Braitenberg in
1986 book - Complex behaviors emerge from simple hard-wired
sub-systems
Describe what this robot does
7Examples of Braitenburg Bots
Describe what this robot does
What about this one?
8Reactive Archictecures
- Two architectures are well-known for designing
reactive systems - Subsumption
- Developed by Rodney Brooks
- Layered behaviors
- Utilizes AFSMs (Augmented Finite State Machines)
- PFields
- Developed by Ronald Arkin
- Utilizes potential fields
9Subsumption
Hi. Im Rodney Brooks!
10Subsumption Philosophy
- Modules should be grouped into layers of
competence - Modules in a higher lever can subsume behaviors
in the next lower level - Suppress substitute input going to a module
- Inhibit turn off output from a module
- No internal state
- No local, persistent representation similar to a
world model. - Architecture is taskable.
- Accomplished by a higher level turning on/off
lower layers
11Level 0 Runaway
12Range Polar Plot
- Information is ego-centric
- Doesnt need global (world) information
- Information is distributed
- available to whatever wants to use it
- No memory
- That is no past history
- Only current state
- No real reasoning just reaction
13Level 1 Wander
14Class Exercise
15Level 2 Follow-Corridors
16Potential Fields
Hi. Im Rodney Arkin!
from http//www.cc.gatech.edu/aimosaic/faculty/ar
kin/
17Potential Fields Philosophy
- The motor schema component of a behavior can be
expressed with a potential fields methodology - A potential field can be a primitive or
constructed from primitives which are summed
together - The output of behaviors are combined using vector
summation - From each behavior, the robot feels a vector or
force - Magnitude force, strength of stimulus, or
velocity - Direction
- But we visualize the force as a field, where
every point in space represents the vector that
it would feel if it were at that point
18Remedial Math(Vectors)
- A mathematical vector is an arrow
- Has length and direction
- Can specify in Cartesian or Polar systems
Cartesian
Polar
How to Convert?
19Remedial Math(Vectors)
- What is the length of a vector (3,4)?
- What is the sum of two vectors V1 and V2?
- Assume Cartesian V1(3,4) and V2(3,0)
- Assume Polar V1(5, .9) and V2 (3,0)
http//www.fablevision.com/education/clipart/girl_
thinking.gif
20Run Away via Repulsion
21Common fields in behaviors
- Uniform
- Move in a particular direction, corridor
following - Repulsion
- Runaway (obstacle avoidance)
- Attraction
- Move to goal
- Perpendicular
- Corridor following
- Tangential
- Move through door, docking (in combination with
other fields) - random
- do you think this is a potential field? what
would it look like?
Name the field youd use for Moving towards a
light Avoiding obstacles
225 Primitive Potential Fields
23Combining Fields forEmergent Behavior
If robot were dropped anywhere on this grid, it
would want to move to goal and avoid
obstacle Behavior 1 MOVE2GOAL Behavior 2
RUNAWAY The output of each independent behavior
is a vector, the 2 vectors are summed to produce
emergent behavior
24Fields and Their Combination
- Two fields
- Repulsive 2 meter range
- Attractive large range
25Path Taken
Robot only feels vectors for a point when it
(if) reaches that point
- If robot started at this location, it would take
the following path - It would only feelthe vector for the location,
then move accordingly, feel the next vector,
move, etc. - Pfield visualization allows us to see the vectors
at all points, but robot never computes the
field of vectors just the local vector
26A Field
- Fields are defined by
- Magnitude profiles
- Constant K
- Linear Max(K-D,0)
- Exponential KDx
- Angular profiles
- In what direction is the force applied?
Consider a robot at .5, 1, and 2 units away from
a repulsive force.
27Plots of Mag Profiles
28Discussion
- Could you represent the Arctic Tern feeding
behavior with potential fields? - what happens with multiple red dots?
- can you inhibit with potential fields?
- Describe the forces emanating from the shark
and man below
29Example of PFields
- Khepera System
- Processor Motorola 68331, 25MHz, RAM 512 Kbytes
- Motion 2 DC brushed servo motors with
incremental encoders (roughly 12 pulses per mm of
robot motion) - Speed Max 60 cm/s, Min 2 cm/s
- Sensors 8 Infra-red proximity and ambient light
sensors with up to 100mm range - Autonomy 1 hour, moving continuously
- Communication Standard Serial Port, up to
115kbps - Size Diameter 70 mm Height 30 mm Weight 80 g
30Khepera
- 8 Infrared sensors arranged as shown
- Can be programmed in a PFields manner
- Each contributes a vector that pushes the robot
in a certain direction - Since the sensors are fixed in place, their
angles are known and constant
while(true) Vector2D whereToGoNow new
Vector2D() for ever sensor SENSOR
whereToGoNow runaway(SENSOR) turnInDirectio
n(whereToGoNow.getDirection()) goForward(whereToG
oNow.getMagnitude())
31Khepera
Vector2D runaway(Sensor sensor, double cutoff)
if(sensor.value lt cutoff) return new
Vector2D(sensor.thetaPI,
(cutoff-sensor.value)/cutoff) else return
new Vector2D(0, 0) while(true)
Vector2D whereToGoNow new Vector2D() for
ever sensor SENSOR whereToGoNow
runaway(SENSOR, double cutoff) turnInDirection(wh
ereToGoNow.getDirection()) goForward(whereToGoNow
.getMagnitude())
32Follow-corridor or Follow-sidewalk
Uniform
Perpendicular
Note use of Magnitude profiles Perpendicular
decreases
Combined
33Draw Fields for Wall-Following(assume that robot
stands still if no wall)
34How does a robot see a wall without reasoning
or representation?
- Perceptual schema connects the dots returns
relative orientation
35Reasoning and Representation
- What does the robot see in this party
situation?
- Its not reasoning that there is a wall. It is
reacting to the stimulus which happens to be
smoothed (common in neighboring neurons) sonar
readings
36Level 0 Runaway
Note multiple instances of a behavior vs.
1 Could just have 1 Instance of RUN AWAY, Which
picks nearest reading Doesnt matter, but
this Allows addition of another Sonar without
changing the RUN AWAY behavior
37Level 1 Wander
Wander is uniform, but changes direction
aperiodically
38Level 2 Follow Corridor
Should we leave run-away in?
39Pfields
- Advantages
- Easy to visualize
- Easy to build up software libraries
- Fields can be parameterized
- Combination mechanism is fixed, tweaked with
gains - Disadvantages
- Local minima problem (sum to magnitude0)
- Jerky motion
40Example Docking Behavior
Orientation, ratio of pixel counts ? tangent
vector Total count ? attraction vector
41Comparison of Architectures
- Similar in philosophy and results essentially
equivalent - Support for modularity
- Both decompose task into behaviors
- Subsumption favors hardware, pfields pure
software - could do with just rules but lose modularity,
design discipline - Niche targetability
- High philosophy is to fit an ecological niche!
- Ease of portability to other domains
- Only to ones that can be done with reflexive
behaviors - Subsumption not as easy with upper levels
- Robustness
- Subsumption has implicit graceful degradation
42Pfields Summary
- Reactive Paradigm SA, sensing is local
- Solves the Open World problem by emulating
biology - Eliminates the frame problem by not using any
global or persistent representation - Perception is direct, ego-centric, and
distributed - Behaviors in pfield methodologies are a tight
coupling of sensing to acting modules are mapped
to schemas conceptually - Potential fields and subsumption are logically
equivalent but different implementations - Pfield problems include
- local minima (ways around this)
- jerky motion