Theory of Computation (Fall 2014): Using Finite State Machines to Investigate Animal Behaviors & Implement Them in Mobile Robots
Post on 15-Dec-2014
71 Views
Preview:
DESCRIPTION
Transcript
Theory of Computation
Using Finite State Machines to Investigate Animal Behaviors &
Implement them in Mobile Robots
Vladimir Kulyukin
Outline
Biological Foundations of Behavior
Innate Release Mechanisms
Reactive Paradigm
Schemas & Behaviors
Subsumption in Reactive Robots
Motivational Videos
http://www.youtube.com/watch?v=UMNQftn9zIQ
http://www.youtube.com/watch?v=D_mbH1MdJEY
http://www.youtube.com/watch?v=Dblw3CJTE8M
http://www.youtube.com/watch?v=-0FnGY-E3D4
http://www.youtube.com/watch?v=9LKhAarNWng
Biological Foundations of Behavior
Biological Foundations Of Behavior
• Animal Behavior
• Behavior Coordination & Control
• Computational Theory Of Agency
• Schema Theory
Why Study Animal Behavior?
• Animals provide existence proofs of various aspects of intelligence
• Many animals exhibit intelligent behaviors with virtually no brain assistance
Animal Behavior
• A Behavior is a mapping of sensory inputs to a pattern of motor actions which are used to achieve a task (Murphy 2000)
• Three categories of behavior:
• Reflexive behavior
• Reactive behavior
• Conscious behavior
Reflexive Behavior
• Reflexive behavior is a stimulus-response pair
• Reflexive behavior is hardwired
• Reflexive behavior produces the fastest response time
Reactive Behavior
• Reactive behavior is acquired (learned)
• Reactive behavior is executed without conscious thought
• Examples of reactive behavior:
• Riding a bike
• Swimming
• Skiing
Conscious Behavior
• Conscious behavior involves deliberation
• Conscious behavior tends to show up when the agent has to evaluate longer term consequences of its actions
• Conscious behavior is characterized by slower response time
Reflexive Behavior
• Reflexes – response is present as long as stimulus is present
• Taxes – response to move in a specific direction to a stimulus
• Baby turtles go to brightest light
• Ants follow pheromones
• Fixed-Action Pattern – response continues longer than stimulus
Innate Release Mechanisms (IRMs)
Innate Releasing Mechanisms (IRMs)
• An IRM presupposes that there is a specific stimulus (internal or external) which releases or triggers the stereotypical pattern of action
• A releaser is a latch or a boolean variable that has to be set
• The releaser acts as a control signal to activate a behavior
Behavior Coordination & Control
• Innate Releasing Mechanisms (IRM)
• A IRM = A Stimulus (Internal or External) + A Triggered Pattern Of Action
BEHAVIOR Sensory Input
Releaser
Pattern Of Action +/-
IRM: Simple Release
enum Releaser = {Present, Absent};
Releaser predator;
while ( true ) {
predator = sensePredator();
if ( predator == Present ) runAway();
}
IRM: Compound Release
• A Releaser can consist of multiple releasers
• Releasers can be either external or internal
• Any logical combination of releasers is possible
IRM: Compound Release
enum Releaser = {Present, Absent};
Releaser food, hunger;
while ( true ) {
food = senseFood();
hunger = checkHunger();
if ( food == Present && hunger == Present )
feed();
}
IRM: Implicit Chaining
• Releasers can be arranged to chain behaviors
• An initial releaser triggers the first behavior
• Behavior is executed until Its releaser is gone
• Control goes on to the next behavior
Implicit Chaining
• In the previous example, if the agent wakes up and is not hungry, what will it do?
• Let us add a behavior to flee from predators to the previous code
IRM: Implicit Chaining
enum Releaser = {Present, Absent};
Releaser food, hunger, child, nursed;
while ( true ) {
food = senseFood();
hunger = checkHunger();
child = checkChild();
nursed = checkNursing();
if ( hunger == Present ) seekFood();
if ( hunger == Present && food == Present) feed();
if ( hunger == Absent && child == Present) nurse();
if ( nursed == Present ) sleep();
}
Inhibiting Behaviors
• The addition of the if-else loop prevents other, less important behaviors from executing
• What if the predator is not seen (say it is behind the agent) for a while?
IRM: Behavior Inhibition
• What happens of there is a Predator?
• The fleeing behavior must be triggered
• The feeding & nursing behaviors must be suspended
• The fleeing behavior inhibits the feeding & nursing behaviors
Behavior Inhibition & Fixed-Pattern Action Effect
#define T LONG_TIME
while(true)
{
predator = sensePredator();
if (predator == PRESENT)
for (time = T; time > 0; time--)
flee();
else
{
food = senseFood();
...
}
}
Concurrent Behaviors
• Behaviors can and do exist concurrently and independently
• What happens when two or more behaviors (that are usually not executed concurrently) get released at the same time?
• Equilibrium
•Dominance
•Cancellation
Equilibrium
• Behaviors seem to balance each other out
• Consider feeding vs. fleeing in a baby squirrel when the food is close enough to a person
• The squirrel is visibly undecided as to whether to go for the food or stay away
Dominance
• One behavior dominates over the other and only the dominant behavior gets executed
• You are hungry and sleepy - you either eat or sleep, not both
Cancellation
• The behaviors cancel each other out
• Male sticklebacks (fish), when their territories overlap, get caught between the need to defend their nest and attach the other fish
• Both stimuli cancel out leaving only the stimuli associated with nest building – so they build another nest
Reactive Paradigm
Three Levels of Reactive Paradigm
• Level 1: Existence Proof Of What Can/Should Be Done
• Level 2: Decomposition Of Existence Proof Into Inputs, Outputs, And Transforms
• Level 3: Implementation
Level 1: Existential Proof
• Sample Task: To seek out humans trapped in a building after an earthquake
• Existential proof: A mosquito can seek out people and so it provides an existence proof that it is possible for a computationally simple agent to find a human being
• At Level 1, agents share a commonality of purpose or functionality
Level 2: Behavior decomposition into inputs, outputs and transformations
• Creating a flowchart of black-boxes
• Each black-box transforms input to an output
• For mosquito, input = thermal image, output = steering command
• At Level 2, agents can exhibit common processes
Level 3: How to implement the process
• This level focuses on how each transformation or black-box is implemented
• At Level 3, agents may have little or no commonality in their implementation
Reactive Paradigm
SENSE ACT SENSE ACT
SENSE ACT SENSE ACT
Reactive Paradigm is organized into multiple, concurrent behaviors
Hierarchical Paradigm vs. Reactive Paradigm
SENSE PLAN ACT
SENSE ACT
Action-Perception Cycle
World
Perception of Environment
Cognitive Activity
Agent acts and modifies world
Decides what to look for
Agent samples and finds potential actions
Gibson’s Ecology
• “The world is its own best representation.”
• It makes little sense to discuss an agent’s perception independent of the agent’s environment
• Gibson proved the Existence of Affordances
• Affordance is a perceivable potentiality of the environment for an Action
Affordance & Perception
• Affordances are perceivable potentialities of the environment for an action
• Perception serves two functions:
• To release a behavior
• To perceive information needed to accomplish the behavior
Schemas & Behaviors
Schema Theory: History
• Schemas were conceived by psychologists around 1900
• Schemas represent a basic unit of activity
• Michael Arbib was a computer scientist who first brought schemas into AI Robotics
Definition Of Schema
A schema is a basic unit of behavior from which complex actions can be constructed; it consists of the knowledge of how to act or perceive as well as the computational process by which it is enacted. (Ron Arkin 1998)
Arbib’s Application Of Schemas
• A Behavior Is A Schema Composed Of A Perceptual Schema & Motor Schema
• Perceptual Schema Embodies The Sensing
• Motor Schema Embodies Physical Activity
Schema Theory
• A schema can be used to express the basic unit of activity
• A schema consists of:
• Knowledge on how to act and/or perceive and
• The computational process by which it uses to accomplish that activity
Schema:
Data
Methods
Behaviors as Perceptual and Motor Schemas
Pattern of Motor Actions BEHAVIOR Sensory Input
Releaser
Perceptual Schema Motor Schema
Behaviors as Perceptual and Motor Schemas
• Motor schema represents the template for physical activity
• Perceptual schema represents the template for sensing
• The motor schema and the perceptual schema are derived from the schema class
Schema Theory Example: Frog’s Behavior
motor schema snap
perceptual schema locate_fly
fly 1 activation condition
motor SI snap(fly1)
perceptual SI locate_fly(fly1)
behavior
percept, gain
Snap at (x, y, z)
(x, y, z)
Subsumption in Reactive Robots
Reactive Robots
• Robots are situated agents operating in an ecological niche
• Behaviors serve as the basic building blocks for robotic actions, and the overall behavior of the robot is emergent
• Only local behavior-specific sensing is permitted
• These systems inherently follow good software design principles
• Animal models of behavior are often cited as a basis for these systems or a particular behavior
Subsumption Architecture
• Rodney Brooks invented this architecture
• Behaviors are released in a Stimulus – Response way
• No external program coordinates and controls them
• Four interesting aspects of subsumption in terms of releasing and control
Subsumption Layers of Competence
• Modules are grouped into layers of competence
• They reflect a hierarchy of intelligence or competence
• Lower levels encapsulate basic survival functions
• Higher levels create more goal-directed actions as mapping
Example: Level 0: Move
SONAR
COLLIDE
FEEL FORCE
RUN AWAY TURN
FORWARD
Polar plot
force heading
halt
heading encoders
Example: Level 1: Wander
SONAR
COLLIDE
FEEL FORCE
RUN AWAY TURN
FORWARD
Polar plot
force heading
halt
heading encoders
AVOID WANDER
heading
S
modified heading
References
top related