Robotics Webpage_files \Data Structure for Behavior-Based Machine Learning.pptx

Download Report

Transcript Robotics Webpage_files \Data Structure for Behavior-Based Machine Learning.pptx

Data Structure for
Behavior-Based Machine
Learning/Path Planning
Zachary Dawson
16-264 A: Humanoids
5/7/13
Goals
 Develop a method in which a robot’s past experience can be
applied to new situations, creating a finite number of
behaviors
 Create a data structure and algorithm that utilize this method
 Implement this data structure and algorithm in Python
The Method
 Get desired final state (target)
 Check known behaviors
 Execute behavior
— OR—
 Make behavior




Select known behavior that advances closest to target
Add to list of steps in new behavior
Repeat until target is achieved
Add new behavior to list of behaviors
 Execute new behavior
Data Structure – Behavior
 Parameters:
 Instructions (array of other behaviors or primitives)
 Primary functions:




__init__
makeBehavior
predict
execute
Data Structure – The Model
 Parameters:





Canvas (Python)
State
Draw function
Validity check function
To do list
 Functions:




__init__
draw
check
copymodel
Data Structure – Client
Implementation
 drawRobot
 stateChecker (Ensures model’s state is valid)
 *checkExisting (Checks to see if existing behaviors
accomplish task. Not actually required for implementation to
run)
 stateCompareFn (Compares two states to see if they are the
same)
 Primitives
 One for each controlled joint
 Have maximum displacement in 1 time-step
 Account for all physical limits of robot
Example of hierarchy of behaviors
Move to
target
Move
right/left
Slide
Rotate
upper
Adjust
arm
Rotate
lower
Example instance of behavior
class
Behavior: move arm to far away target
[move right, adjust arm, move right, adjust arm, move left]
[slide, slide]
[rotate upper, rotate lower]
[slide, skip]
Algorithmic Implementation
1.
2.
3.
4.
5.
6.
Receive target (assume no known behavior gets to target)
Loop through existing behaviors and get predicted result
Select behavior with the predicted result closest to target
Add that behavior to the instructions for the new behavior
Repeat steps 2 through 4 until target is achieved
If program hangs (indicates that the distance from the
target is the same in two iterations), pick a random
behavior from the behavior list that does NOT have the
closest predicted value
7. Once new behavior is made, add it to the list and execute
Algorithmic Implementation
 On execute, instructions from behaviors are recursively
added to a to-do queue in the model class so that the queue
becomes a list of primitives and their target states. This
enables animation by calling instructions from this queue at
set time intervals
 If an instruction is predicted to cause no change, it is skipped
on the to-do list
Demonstration
term.py
Assessment and Further
Development
 Developed new behaviors, to a finite extent
 Reused behaviors where appropriate
 With proper implementation of primitives, could accomplish
any task
 Terminated over-complex behaviors early
 Reduce runtime of predict
 Introduce automatic loop creation
 Test on system with more parameters
 Use sensor based system (do not assume location of
everything is exactly known)
Questions?