Behavior design CS 395: Behavior-based systems Ian Horswill.

Slides:



Advertisements
Similar presentations
Reactive and Potential Field Planners
Advertisements

Lecture 7: Potential Fields and Model Predictive Control
Magnetic Sources AP Physics C.
Coordinatate systems are used to assign numeric values to locations with respect to a particular frame of reference commonly referred to as the origin.
ENGR-1100 Introduction to Engineering Analysis
Solving Linear Equations  Many applications require solving systems of linear equations.  One method for solving linear equations is to write a matrix.
Artificial Intelligence 13. Multi-Layer ANNs Course V231 Department of Computing Imperial College © Simon Colton.
Dual Numbers: Simple Math, Easy C++ Coding, and Lots of Tricks
Review 29:008 Exam 3. Ch. 12 Electrostatic Phenomena.
CSCI 347 / CS 4206: Data Mining Module 07: Implementations Topic 03: Linear Models.
Sameer Ansari Billy Gallagher Kyel Ok William Sica.
B.Macukow 1 Lecture 12 Neural Networks. B.Macukow 2 Neural Networks for Matrix Algebra Problems.
Robotics applications of vision-based action selection Master Project Matteo de Giacomi.
Optimizing Flocking Controllers using Gradient Descent
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Dynamic Path Planning, Flocking Spring 2012.
The Vector Field Histogram Erick Tryzelaar November 14, 2001 Robotic Motion Planning A Method Developed by J. Borenstein and Y. Koren.
Asteroids Games and Simulations O-O Programming in Java The Walker School The Walker School – Games and Simulations
Chapter 3 Vectors.
Active SLAM in Structured Environments Cindy Leung, Shoudong Huang and Gamini Dissanayake Presented by: Arvind Pereira for the CS-599 – Sequential Decision.
Chapter 4.1 Mathematical Concepts
Autonomous Robot Navigation Panos Trahanias ΗΥ475 Fall 2007.
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
Interactive Animation of Structured Deformable Objects Mathieu Desbrun Peter Schroder Alan Barr.
Goals, plans, and planning Northwestern University CS 395 Behavior-Based Robotics Ian Horswill.
1 Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line.
Motor Schema Based Navigation for a Mobile Robot: An Approach to Programming by Behavior Ronald C. Arkin Reviewed By: Chris Miles.
Conflict resolution CS 395 Behavior-Based Robotics.
Extended Potential Field Method Adam A. Gonthier MEAM 620 Final Project 3/19/2006.
Chapter 5: Path Planning Hadi Moradi. Motivation Need to choose a path for the end effector that avoids collisions and singularities Collisions are easy.
Steering Behaviors For Autonomous Characters
Behavior- Based Approaches Behavior- Based Approaches.
Geometric Probing with Light Beacons on Multiple Mobile Robots Sarah Bergbreiter CS287 Project Presentation May 1, 2002.
Neural Networks. Background - Neural Networks can be : Biological - Biological models Artificial - Artificial models - Desire to produce artificial systems.
CS 450: Computer Graphics 2D TRANSFORMATIONS
3.7. O THER G AME P HYSICS A PPROACHES Overview of other game engine physics approaches.
Velocities and Static Force
Vectors and Scalars AP Physics C.
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
UNIVERSITI MALAYSIA PERLIS
February 21, 2000Robotics 1 Copyright Martin P. Aalund, Ph.D. Computational Considerations.
Fruitful functions. Return values The built-in functions we have used, such as abs, pow, int, max, and range, have produced results. Calling each of these.
Chapter 6 ADDITIONAL TOPICS IN TRIGONOMETRY. 6.1 Law of Sines Objectives –Use the Law of Sines to solve oblique triangles –Use the Law of Sines to solve,
1 Constant Following Distance Simulations CS547 Final Project December 6, 1999 Jeremy Elson.
Constraints-based Motion Planning for an Automatic, Flexible Laser Scanning Robotized Platform Th. Borangiu, A. Dogar, A. Dumitrache University Politehnica.
Localisation & Navigation
1 Autonomous Foraging in a Simulated Environment.
Robot Crowd Navigation using Predictive Position Fields in the Potential Function Framework Ninad Pradhan, Timothy Burg, and Stan Birchfield Electrical.
Agenda Path smoothing PID Graph slam.
Neural Networks Ellen Walker Hiram College. Connectionist Architectures Characterized by (Rich & Knight) –Large number of very simple neuron-like processing.
1 MAC 2103 Module 6 Euclidean Vector Spaces I. 2 Rev.F09 Learning Objectives Upon completing this module, you should be able to: 1. Use vector notation.
Chapter 3 Vectors. Coordinate Systems Used to describe the position of a point in space Coordinate system consists of a fixed reference point called the.
Numerical Integration and Rigid Body Dynamics for Potential Field Planners David Johnson.
Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.
CS717 Algorithm-Based Fault Tolerance Matrix Multiplication Greg Bronevetsky.
Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.
Kinematic Redundancy A manipulator may have more DOFs than are necessary to control a desired variable What do you do w/ the extra DOFs? However, even.
In chapter 1, we talked about parametric equations. Parametric equations can be used to describe motion that is not a function. If f and g have derivatives.
Objective: To develop a fully-autonomous control system for the Q-ball based on onboard IMU/Magnetometer/Ultrasound sensory information Summer Internship.
Autonomous Robots Robot Path Planning (3) © Manfred Huber 2008.
Multiplication of vectors Two different interactions (what’s the difference?)  Scalar or dot product : the calculation giving the work done by a force.
CSCI 4310 Lecture 5: Steering Behaviors in Raven.
Chapter 3 Lecture 5: Vectors HW1 (problems): 1.18, 1.27, 2.11, 2.17, 2.21, 2.35, 2.51, 2.67 Due Thursday, Feb. 11.
Computer Graphics Mathematical Fundamentals Lecture 10 Taqdees A. Siddiqi
Coordinatate systems are used to assign numeric values to locations with respect to a particular frame of reference commonly referred to as the origin.
Hough Transform CS 691 E Spring Outline Hough transform Homography Reading: FP Chapter 15.1 (text) Some slides from Lazebnik.
A Presentation on Adaptive Neuro-Fuzzy Inference System using Particle Swarm Optimization and it’s Application By Sumanta Kundu (En.R.No.
Announcements HW4 due today (11:59pm) HW5 out today (due 11/17 11:59pm)
3.7. Other Game Physics Approaches
Motion Models (cont) 2/16/2019.
Presentation transcript:

Behavior design CS 395: Behavior-based systems Ian Horswill

Previously  Programs  Policies  Determine action from world state rather than from internal program counter  Building simple control loops from feedback  Compare measured state and desired state  Action is f(state error)  Linear feedback is when f is multiplication by a constant (or constant matrix)

Outline  Behaviors and naïve behavior-based systems  Simulating a frog  Motor schemas and potential fields

Composing policies from behaviors  Behavior = policy + trigger  Naïve behavior-based system  Run lots of behaviors in parallel  Mutually exclusive triggers  Use policy of currently triggered behavior

Common types of behaviors  Orientation behaviors  Tropisms  Followers  Avoidance behaviors  Ballistic actions (fixed action patterns)

GRL code for behaviors  Behavior data type  Activation level  The trigger Boolean or numerical  Motor-vector  Implementation- dependent  drive-base modified  Uses the policy of the leftmost currently active behavior Constructor: (behavior activation-level motor-vector )  behavior Accessors: (activation-level behavior )  behavior’s trigger (motor-vector behavior )  output of behavior’s policy (drive-base behavior behavior …)

Outline  Behaviors and naïve behavior-based systems  Simulating a frog  Motor schemas and potential fields

Frog feeding behaviors  Three separate neural circuits  Orientation behavior  Triggered by black dot moving on a white background (i.e. fly)  Turns body toward prey  Pouncing  Moves body within range of prey  Eating  Ballistic motion of the tongue

Simplified robot frog  Motor vector  Rotation/translation control  Eat? fires the tongue  Tongue is not steerable  (we won’t simulate hopping)  Sensors  Detect flies using motion on the retina  Doesn’t work when frog is moving!  Vestibula (inner ear)  Measures rotation like a gyroscope (frog-motor-vector motion eat? )  control info for “base” fly-motion  direction of fly, if visible doesn’t work when frog moves see-prey?  true, if fly is visible rotational-velocity  current rotation speed of frog

Simulated feeding behaviors  Eat  Fires the tongue when facing prey  Face prey  Steers toward prey when visible  Inactive when already facing prey  (no pouncing) (drive-base eat face-prey)

The eat behavior (define-signal eat (behavior (and see-prey? facing-prey?) (frog-motor-vector sit-still #t))) (define-signal facing-prey? (< (abs fly-motion) facing-prey-tolerance))) (define-signal sit-still (rt-vector 0 0)) Activation level (trigger): Wait until prey in sights Control policy: fire tongue while standing still

The face-prey behavior (define-signal face-prey (behavior (and see-prey? (not facing-prey?)) (frog-motor-vector (rt-vector (* fly-motion face-prey-gain) 0) #f))) (define-signal facing-prey? (< (abs fly-motion) facing-prey-tolerance))) (define-signal sit-still (rt-vector 0 0)) P-controller

Problem (define-signal face-prey (behavior (and see-prey? (not facing-prey?)) (frog-motor-vector (rt-vector (* fly-motion face-prey-gain) 0) #f))) Fly-motion sensor detects relative motion of frog and fly Stops responding as soon as the frog moves  Need to remember the fly’s position somehow

Solution: dead reckoning (define-signal face-prey (behavior (and see-prey? (not facing-prey?)) (frog-motor-vector (rt-vector (* prey-heading face-prey-gain) 0) #f))) (define-signal frog-orientation (integrate rotational-velocity)) (define-signal prey-orientation (latch (+ frog-orientation fly-motion) (zero? rotational-velocity))) (define-signal prey-heading (subtract-angle-degrees frog-orientation prey-orientation))

Outline  Behaviors and naïve behavior-based systems  Simulating a frog  Motor schemas and potential fields

Designing behaviors using potential fields  Suppose:  Your state is your position in space  Your action is a velocity vector  General technique for constructing policies:  Assign every point in space x a “value” V(x)  Use the gradient  V(x) as your policy  Analogy to physics   V(x) is like a force field  V(x) is its potential Approach behavior (tropism) Avoidance behavior

Advantages of potential field methods  Simple to compute  Can combine policies by adding value functions (same as adding gradients)

“Motor schemas”  Like potential fields but we program directly in terms of the vectors – no value function  One schema (vector field) per behavior  Sum outputs of behaviors

Example: sonar-based obstacle avoidance  First, compute obstacle positions  16 equally spaced sonars  So sonar n is at orientation 2  n/16  So obstacle is at: r(cos 2  n/16, sin 2  n/16)  where r is the distance reading for the sonar (define-signal sonar-count 16) (define-signal ( sonar-direction s-num) (/ (* 2 pi s-num) sonar-count)) (define-signal ( unit-vector direction) (xy-vector (cos direction) (sin direction))) (define-signal ( obstacle-vector s-num reading) (* (unit-vector (sonar-direction s-num)) reading)) X-axis and direction of motion positive rotation

Vectors in GRL  Like arrays in C  Constructors  (vector a b c)  [a b c]  (make-vector k elt)  [elt elt … elt] k times  (index-generator i)  [0 1 2 … i]  Accessors  (vector-ref v i)  i’th element of v  (vector-length v)  number of elements in v

Implicit mapping in GRL  Scheme and C++ STL let you map a function over a list:  (map f (list a b c d))  (list (f a) (f b) (f c) (f d))  GRL automatically maps functions over groups and vectors:  (f (vector a b c d))  (vector (f a) (f b) (f c) (f d))  (* 2 (vector ))  (vector )  (* (rt-vector a b) (rt-vector c d))  (rt-vector (* a c) (* b d))  Exceptions: length, vector-ref, etc.

Example: sonar-based obstacle avoidance  Each obstacle (i.e. each sonar reading) generates a force  Opposite in direction to the obstacle  Magnitude is inverse square of distance  Like electrostatic force (define-signal ( obstacle-force ob-vector) (- (/ ob-vector (cube (magnitude ob-vector))))) (define-signal obstacle-vectors (obstacle-vector (index-generator sonar-count))) (define-signal obstacle-forces (obstacle-force obstacle-vectors)) (define-signal total-force (vector-reduce + 0 obstacle-forces))

Following the xy-vector  Problem  Policy generates Cartesian (xy) velocities  Base controlled with polar (rotate/translate) velocities  Most xy vectors can’t be executed directly by the base  Need to transform Cartesian policy into a polar policy  Lots of techniques possible. Here are two. ;; CMU policy (Stone et al.) (define-signal ( follow-xy vec) (rt-vector (y-of vec) (x-of vec)) ;; GATech policy (Arkin et al.) (define-signal ( follow-xy vec) (if (< (abs (y-of vec)) threshold) (rt-vector 0 speed) (rt-vector (* (y-of vec) r-gain) 0)))

Local minima  Different forces from different objects can exactly cancel, leaving the robot stuck  Work-arounds  Unwedging  Noise  Add random vectors to motion  Avoid-recent behavior  Remember recent locations  Generate repulsive force away from them  Path planning  Run a search algorithm to find a path through freespace