13.01.2015 Views

Paradigms of A.I. Robotics

Paradigms of A.I. Robotics

Paradigms of A.I. Robotics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong><br />

Weiwei Pan<br />

Department <strong>of</strong> Mathematics<br />

Wesleyan University<br />

Middletown, CT 06457<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.1/


Intelligent Robot<br />

What is an Intelligent Robot<br />

An intelligent robot is a mechanical agent operating<br />

autonomously and flexibly in its environment.<br />

A robot has its own goals and decision making processes<br />

A robot is capable <strong>of</strong> extracting information from its<br />

environment<br />

A robot is able to achieve its goals using sensory information<br />

about its environment<br />

A robot can adapt to a partially unknown environment<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.2/


Intelligent Robot<br />

Why do Robots Need A.I.<br />

Sensory interpretation<br />

Situation awareness<br />

Planing and Problem Solving<br />

Interaction with other agents<br />

Handle unexpected events<br />

Learning<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.3/


Outline<br />

Robotic <strong>Paradigms</strong><br />

The Hierarchal Paradigm<br />

◦ Robot Pr<strong>of</strong>ile: SHAKEY<br />

The Reactive Paradigm<br />

⋄ Two Architectures <strong>of</strong> RP<br />

◦ Robot Pr<strong>of</strong>ile: TOTO (et METATOTO)<br />

◦ Robot Pr<strong>of</strong>ile: ROBOSOCCER<br />

The Hybrid-Reactive Paradigm<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.4/


Primitive Functions <strong>of</strong> A.I. Robot<br />

Sense<br />

◦ Extract information from the environment<br />

Plan<br />

◦ Determine directives based on sensed or cognitive<br />

information<br />

Act<br />

◦ Use sensed information or directive to produce<br />

actuator commands<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.5/


The Hierarchical Paradigm<br />

Sense Plan Act<br />

The general method cycles through the following three steps:<br />

Sense: take sensor reading and update the world model<br />

Plan: determine the next set <strong>of</strong> actions based on the current world<br />

model and goals<br />

Act: execute actions specified by the planner<br />

Remark. Here a world model consists <strong>of</strong> a priori representation, sensed and cognitive<br />

information.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.6/


Characteristics <strong>of</strong> H.P<br />

The Hierarchical Paradigm is characterized by an explicit monolithic<br />

world-view and a sequential ordering <strong>of</strong> the three robotic primitive.<br />

Knowledge about the environment must be explicitly represented<br />

The world model must contain everything that an agent needs in<br />

order to plan its course <strong>of</strong> action<br />

The flow <strong>of</strong> control between the three primitive robotic functions<br />

defines a linear ordering (this is also known as horizontal<br />

decomposition).<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.7/


Shakey the Robo<br />

Developed in 1967-1970 at the Stanford<br />

Research Institute<br />

Major contributors include: Charles Rosen,<br />

Nils Nilsson et. al.<br />

The first mobile robot to reason about its<br />

actions<br />

Key components: camera, optical range<br />

finder, bump sensors<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.8/


Pros and Cons <strong>of</strong> H.P<br />

Advantages:<br />

Hierarchical (top-down) structure allow for the planning module to<br />

focus all behaviours towards a single set <strong>of</strong> goals.<br />

Drawbacks:<br />

(Closed world assumption) Reliance on the static world model<br />

during the S-P-A cycle causes poor performance in dynamic<br />

environments.<br />

(Frame problem) Updating and maintaining a sufficiently detailed<br />

world model can be computationally intractable.<br />

Searching for a plan to achieve a certain goal is equally complex.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.9/


Lessons from Biology<br />

Ethology:<br />

Simple animals exhibit a variety <strong>of</strong> intelligent behaviour<br />

(Innate Release Mechanism) A specific stimuli activate a simple,<br />

involuntary (hardwired) response<br />

Cognitive science:<br />

(Embodiment) Direct physical experience is the key to cognition<br />

(Embeddedness) The environment shapes the cognitive process.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.10/


The Reactive Paradigm<br />

Sense<br />

Act<br />

A reactive robotic system decomposes functionality into behaviors,<br />

which tightly couple perception to action without the use <strong>of</strong> intervening<br />

abstract representations<br />

Behaviors are implemented as circuits (hardware) or as low<br />

computational complexity algorithms (s<strong>of</strong>tware)<br />

No memory required. Behaviors are pure stimulus-response<br />

reflexes.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.11/


Characteristics <strong>of</strong> R.P<br />

1. Robots are situated agents operating in an ecological niche.<br />

The robot is an integral part <strong>of</strong> the world<br />

The robot has its own goals and intentions<br />

The robot is capable <strong>of</strong> affecting the world<br />

The robot is capable <strong>of</strong> sensing the world and sense information<br />

affects its goals and actions.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.12/


Characteristics <strong>of</strong> R.P<br />

2. Overall behaviour is an emergent quality.<br />

Behaviours are computationally independent and operate<br />

concurrently<br />

No controller that determines all behaviours for a given task<br />

Overall behaviour is a result <strong>of</strong> interactions <strong>of</strong> independent<br />

behaviours<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.13/


Characteristics <strong>of</strong> R.P<br />

3. Sensing is local and behaviour-specific.<br />

Abstract representational knowledge in perceptual processing is<br />

avoided<br />

Representation is expressed as robot-centric information (no world<br />

model).<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.14/


Architectures <strong>of</strong> R.P<br />

1. Subsumption<br />

Developed by Rodney Brooks in 1986<br />

Behaviours are layered with higher levels able to override<br />

(subsume) lower ones<br />

Behaviours operate concurrently and independently (with some<br />

mechanism to resolve conflicts)<br />

2. Potential Field<br />

Developed by Ronald Arkin in ()<br />

Basic behaviours are represented by elementary potential fields<br />

Complex behaviours (complex fields) are the combination <strong>of</strong><br />

elementary ones<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.15/


The Subsumption Architecture<br />

Definition. A behaviour in this architecture is a network <strong>of</strong> sensing and acting<br />

modules which accomplish a task.<br />

Definition. A module is an augmented finite state machine (a FSM with registers,<br />

timers and enhancements to permit interface with other modules).<br />

1. Modules are grouped into layers <strong>of</strong> competence with lower layers<br />

capturing basic functions and higher layers creating more<br />

goal-directed actions. Each layer can be viewed as a behaviour.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.16/


The Subsumption Architecture<br />

2. Behavioural layers operate concurrently. Conflicts are resolved by<br />

having modules in a higher layer subsume output from modules<br />

one level lower. Subsumption can occur in one <strong>of</strong> two ways:<br />

(Inhibition) The output <strong>of</strong> the higher module is connected to the<br />

output <strong>of</strong> the lower module. If the output <strong>of</strong> the higher is "on",<br />

then the output <strong>of</strong> the lower module is blocked.<br />

(Suppression) The output <strong>of</strong> both the higher and the lower<br />

module is connected to the input <strong>of</strong> another module. If the<br />

output <strong>of</strong> the higher module is nonzero then the output <strong>of</strong> the<br />

higher module replaces that <strong>of</strong> the lower module.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.17/


The Subsumption Architecture<br />

3. Persistent internal representation <strong>of</strong> the world is avoided. The<br />

robot should depend mostly on information coming directly from its<br />

environment. Even when some internal state is needed for<br />

triggering behaviours like scared or hungry such usage should be<br />

minimized.<br />

4. A task is accomplished by activating the appropriate layer (lower<br />

layers are then activated by reactivity to the environment).<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.18/


Subsumption Robot<br />

Robots built using the subsumption architecture at the MIT A.I. <strong>Robotics</strong> Laboratory:<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.19/


Following a Corridor<br />

Suppose we have a robot with sonars pointing in different directions<br />

and two actuators, FORWARD and TURN.<br />

Level 0: Obstacle Avoidance<br />

SONARD module converts sonar readings into a plot <strong>of</strong> polar<br />

coordinates, (r, θ), centered around the robot.<br />

FEELFORCE converts each sonar reading into a repulsive vector<br />

and outputs their sum to RUNAWAY<br />

RUNAWAY passes new heading to TURN<br />

COLLIDE looks at the sonar plot and outputs "halt" to FORWARD<br />

when nearness threshold is met.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.20/


Following a Corridor<br />

Level 1: Explore<br />

WANDER module computes a random heading every n seconds<br />

passing it to AVOID<br />

AVOID module take output from FEELFORCE and combines it<br />

with new heading and passes it to TURN<br />

Remark. Here we meet our first example <strong>of</strong> subsumption, i.e. TURN takes input from<br />

both RUNAWAY in Level 0 and AVOID in Level 1, possibly at the same time, so who<br />

does it listen to The answer is, TURN gives preference to RUNAWAY. When the<br />

output <strong>of</strong> RUNAWAY is nonzero it replaces the output <strong>of</strong> AVOID. This is an example <strong>of</strong><br />

subsumption by suppression.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.21/


Following a Corridor<br />

Level 2: Follow a Corridor<br />

LOOK module examines the sonar plot an identifies a corridor and<br />

passes the heading towards the middle <strong>of</strong> the corridor to STAY IN<br />

MIDDLE<br />

STAY IN MIDDLE passes the heading to AVOID (also calculates<br />

course corrections)<br />

INTEGRATE observes actual motion between LOOK updates and<br />

computes deviation from intended course, passing this data to<br />

STAY IN MIDDLE<br />

Remark. STAY IN MIDDLE subsumes WANDER by suppression.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.22/


Follow a Corridor<br />

LOOK middle<br />

STAY IN<br />

MIDDLE<br />

middle<br />

<strong>of</strong>f middle<br />

INTEGRATE<br />

WANDER<br />

S<br />

AVOID<br />

polar<br />

plot<br />

force<br />

modified<br />

heading<br />

SONAR<br />

FEEL<br />

FORCE<br />

force<br />

RUN<br />

AWAY<br />

S<br />

TURN<br />

heading<br />

encoders<br />

COLLIDE<br />

halt<br />

FORWARD<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.23/


Summary <strong>of</strong> Subsumption<br />

Behaviours are defined as a network tightly coupling sensing and<br />

acting<br />

Behaviours are organized into layers (lower layers serve basic<br />

functions and higher layers direct more goal-oriented actions)<br />

Higher layers may override lower ones<br />

Perception is ego-centric and distributed<br />

No persistent internal representation <strong>of</strong> the world.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.24/


Toto the Robo<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.25/


The Potential Field Architecture<br />

Treat the robot as a point particle in a force field, motions <strong>of</strong> the robot<br />

are thereby represented by paths <strong>of</strong> a particle through this field with<br />

obstacles and goals acting appropriately on the particle via attractive<br />

or repulsive forces.<br />

For each behaviour the robot "feels" a force. Obstacles act as<br />

repulsive forces and goals as attractive forces.<br />

Complex behaviours result from applying the sum <strong>of</strong> all forces to<br />

the robot.<br />

The overall behaviour <strong>of</strong> a robot in an environment can be<br />

represented by a potential field, where the vector associated to<br />

each point represents the force the robot would feel at that point.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.26/


Primitive Potential Field<br />

(a) Uniform field, (b) Perpendicular field<br />

(c) Attraction field, (d) Repulsion field, (e) Tangential field<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.27/


Obstacles and Goal<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.28/


Movement via Potential Field<br />

The robots movements are determined by the following three cases:<br />

1. Only the goal is perceived: the sonar returns a distance to the goal<br />

and a vector <strong>of</strong> attraction is computed based on that data.<br />

2. Only the obstacle is perceived: the sonar returns a distance to the<br />

obstacle and a vector <strong>of</strong> repulsion is computed.<br />

3. Both the goal and the obstacle are perceived: the vector <strong>of</strong><br />

repulsion and attraction is summed for a new forcing pushing the<br />

robot both away from the obstacle and towards the goal.<br />

Remark. Even though the robot’s movements through a given environment can be<br />

visualized at once as an artificial potential field, there is no internal representation!!!<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.29/


Movement via Potential Field<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.30/


Magnitude Pr<strong>of</strong>ile<br />

Question: How should the robot model the force it feels from an object in its<br />

environment as a function <strong>of</strong> distance<br />

Answer: The robot can choose from a variety <strong>of</strong> magnitude pr<strong>of</strong>iles for forces being<br />

exerted by obstacles and goals.<br />

Definition.<br />

The way the magnitude <strong>of</strong> vectors change in the potential field (around an obstacle or a goal) is<br />

called the magnitude pr<strong>of</strong>ile.<br />

Three basic types <strong>of</strong> magnitude pr<strong>of</strong>iles:<br />

Constant - the force exerted by an object is <strong>of</strong> constant magnitude with in a fixed<br />

radius and is zero elsewhere.<br />

Linear - the magnitude <strong>of</strong> force is inversely and linearly proportional to the distance<br />

to the object.<br />

Exponential - the magnitude <strong>of</strong> force is inversely and exponentially proportional to<br />

the distance to the object.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.31/


Magnitude Pr<strong>of</strong>ile<br />

(a) Linear Drop Off<br />

(b) Exponential Drop Off<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.32/


Generating Potential Field<br />

Definition. Given S ⊂ R 2 , a vector field on S is a function F : S → R 2 . That is, F<br />

associates a vector to every point in S.<br />

FACT: Every potential field is a vector field, and most potential fields are<br />

conservative vector fields, i.e. they are (more or less) the gradient <strong>of</strong> potential<br />

energy functions.<br />

Remark. Think <strong>of</strong> potential energy functions as a landscape with hills and valleys and the<br />

potential field is the vector field generated by mapping the instantaneous change in each<br />

direction at every point in the landscape.<br />

FACT: Magnitude pr<strong>of</strong>iles define potential energy functions! I.e. Given a<br />

potential energy function, U : R 2 → R + , the potential field associated to U is<br />

F(⃗r) = −▽U(⃗r),⃗r ∈ R 2 .<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.33/


Generating Potential Field<br />

Let ⃗r ∈ R 2 and p(⃗r) =‖ ⃗r − ⃗r obj ‖. Choose a magnitude pr<strong>of</strong>ile, U(⃗r), for an object.<br />

An attractive field (standard):<br />

then,<br />

U att (⃗r) = 1 2 k att · p 2 (⃗r)<br />

F att (⃗r) = −k att · (⃗r − ⃗r goal )<br />

A repulsive field (standard):<br />

8 “ ”<br />

<<br />

2<br />

1<br />

U rep (⃗r) =<br />

2 k 1<br />

rep p(⃗r) − 1 if p(⃗r) ≤ r<br />

r 0 ,<br />

0<br />

:<br />

0 if p(⃗r) > r 0 ,<br />

then,<br />

8 “ ”<br />

< k 1 rep p(⃗r)<br />

F rep (⃗r) =<br />

− 1 1 ⃗r−⃗r goal<br />

r 0 p 2 if p(⃗r) ≤ r<br />

(⃗r) p(⃗r) 0 ,<br />

: 0 if p(⃗r) > r 0 ,<br />

where k att , k rep are constants, and r 0 is the radius <strong>of</strong> influence for the obstacle.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.34/


Following a Corridor<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.35/


Following a Corridor<br />

RUNAWAYpf: uses repulsive field to generate new heading. Each<br />

sonar reading activates an instance <strong>of</strong> RUNAWAYpf, the resulting<br />

vectors are summed and then passed to TURN.<br />

COLLIDE: cannot be mapped as a behaviour with the PF method.<br />

Instead, collisions trigger emergency responses outside the<br />

potential field framework.<br />

WANDERpf: generates a random heading and a uniform field in<br />

the direction <strong>of</strong> that heading (the output <strong>of</strong> WANDERpf is naturally<br />

summed with the output <strong>of</strong> RUNAWAYpf via combination <strong>of</strong><br />

potential fields).<br />

FOLLOW CORRIDOR: is the potential field pictured in the<br />

previous slide.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.36/


Robosoccer<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.37/


PF Robot<br />

Ron Arkin and his robots at Georgia Tech:<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.38/


Difficulties with Potential Field<br />

Programming behaviours via potential fields encounter two common<br />

problems:<br />

(Local minima problem) Ideally, when the robot feels no force (i.e.<br />

▽U(⃗r) = 0) it is at the goal position (i.e. global mininmum).<br />

Unfortunately, given an arbitrary potential energy function U there<br />

may be places aside from the goal position where ▽U(⃗r) = 0<br />

(saddle points). This can be resolved by adding a small degree <strong>of</strong><br />

random "noise" to heading vectors.<br />

Depending on the terrain <strong>of</strong> the environment, bad choices <strong>of</strong><br />

magnitude pr<strong>of</strong>iles can lead to disastrous behaviours along certain<br />

paths. This can be resolved by choosing a "smarter" model for<br />

attractive and repulsive forces.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.39/


Comparisons Between Architecture<br />

Subsumption<br />

+ Modular design (each behaviour is independently testable)<br />

- Not taskable<br />

Potential Fields<br />

+ Has representation that is easy to visualize over a large region<br />

+ Any real-valued continuous function on R 2 can be used as a<br />

potential energy function.<br />

+ Is portable<br />

- Local minima problem<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.40/


Summary <strong>of</strong> the Reactive Paradigm<br />

Positive Attributes:<br />

Reactive robots with simple behaviours can solve relatively complex<br />

problems<br />

The lack <strong>of</strong> internal states simplifies computation (reactive systems are<br />

fast and inexpensive to build)<br />

Perform well in dynamic environments<br />

Drawbacks:<br />

Breaking down desired behaviour into simple behaviours is an art<br />

Hard to predict emergent behaviours<br />

Reactive agents can only accomplish tasks that involve reflexive<br />

behaviours (cannot perform planning or reasoning).<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.41/


The Hybrid-Reactive Paradigm<br />

Plan<br />

Sense<br />

Act<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.42/


References<br />

[1] R. R. Murphy, Introduction to AI <strong>Robotics</strong>, Cambridge,<br />

MA: MIT Press, 2000.<br />

<strong>Paradigms</strong> <strong>of</strong> A.I. <strong>Robotics</strong> – p.43/

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!