theory of computation (fall 2013): finite state machines in mobile robots
DESCRIPTION
TRANSCRIPT
![Page 1: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/1.jpg)
Theory of Computation
Finite State Machines in
Mobile Robots
Vladimir Kulyukin
![Page 2: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/2.jpg)
Outline
Biological Foundations of Behavior Innate Release Mechanisms
![Page 3: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/3.jpg)
Motivational Videos
http://www.youtube.com/watch?v=TMvio63yoJs
http://www.youtube.com/watch?v=Dblw3CJTE8M
http://www.youtube.com/watch?v=-0FnGY-E3D4
http://www.youtube.com/watch?v=9LKhAarNWng
![Page 4: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/4.jpg)
Biological Foundations of Behavior
![Page 5: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/5.jpg)
Biological Foundations Of Behavior
• Animal Behavior
• Behavior Coordination & Control
• Computational Theory Of Agency
• Schema Theory
![Page 6: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/6.jpg)
Why Study Animal Behavior?
• Animals provide existence proofs of various aspects of intelligence
• Many animals exhibit intelligent behaviors with virtually no brain assistance
![Page 7: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/7.jpg)
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
![Page 8: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/8.jpg)
Reflexive Behavior
• Reflexive behavior is a stimulus-response pair
• Reflexive behavior is hardwired
• Reflexive behavior produces the fastest response time
![Page 9: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/9.jpg)
Reactive Behavior
• Reactive behavior is acquired (learned)
• Reactive behavior is executed without conscious thought
• Examples of reactive behavior: • Riding a bike
• Swimming
• Skiing
![Page 10: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/10.jpg)
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
![Page 11: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/11.jpg)
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
![Page 12: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/12.jpg)
Innate Release Mechanisms (IRMs)
![Page 13: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/13.jpg)
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
![Page 14: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/14.jpg)
Behavior Coordination & Control
• Innate Releasing Mechanisms (IRM)
• A IRM = A Stimulus (Internal or External) + A Triggered Pattern Of Action
BEHAVIORSensory Input
Releaser
Pattern Of Action+/-
![Page 15: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/15.jpg)
IRM: Simple Release
enum Releaser = {Present, Absent};
Releaser predator;
while ( true ) {
predator = sensePredator();
if ( predator == Present ) runAway();
}
![Page 16: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/16.jpg)
IRM: Compound Release
• A Releaser can consist of multiple releasers
• Releasers can be either external or internal
• Any logical combination of releasers is possible
![Page 17: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/17.jpg)
IRM: Compound Release enum Releaser = {Present, Absent};
Releaser food, hunger;
while ( true ) {
food = senseFood();
hunger = checkHunger();
if ( food == Present && hunger == Present )
feed();
}
![Page 18: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/18.jpg)
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
![Page 19: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/19.jpg)
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
![Page 20: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/20.jpg)
IRM: Implicit Chainingenum 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();
}
![Page 21: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/21.jpg)
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?
![Page 22: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/22.jpg)
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
![Page 23: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/23.jpg)
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();
...
}
}
![Page 24: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/24.jpg)
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
![Page 25: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/25.jpg)
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
![Page 26: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/26.jpg)
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
![Page 27: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/27.jpg)
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
![Page 28: Theory of Computation (Fall 2013): Finite State Machines in Mobile Robots](https://reader034.vdocuments.net/reader034/viewer/2022051817/548d917ab4795927058b4847/html5/thumbnails/28.jpg)
References
Murphy, R. Introduction to AI Robotics. MIT Press.