Title: O2S Planning Technology
1O2S Planning Technology
- JustPlay Group Meeting
- 12 December 2005
- Justin Mazzola Paluska
- jmp_at_mit.edu
2Overview
- System Model
- Model Details
- A few examples
- Generic Techniques
- Node Cloning
- Free Teleconference
3(No Transcript)
4Approach
- Make application adaptation points explicit
- Provide mechanism to choose, startup, teardown,
and swap alternatives. - Evaluation-based
- Very little analysis
- Exploit contexts or cached results to learn
what should be done - Reduce ad-hoc decision making
- How well can you make do with what you have?
5System Model
6Components
- Goal parameterized intent or representation of
a desired condition - Technique code that implements a Goal
- Planner runtime system that matches Goals to
Techniques
7Planner
- Recursively bind Techniques to Goals
- AND/OR tree
- At each OR node, choose a node for execution.
- based on the satisfaction property
- Execute the chosen nodes
- Maintain the tree over time
- Re-execute relevant stages
- Propagate property updates
8(No Transcript)
9Model Details
10Goals
- parameterized specification of a class of intents
or desires - input parameters
- types and names of returned Properties
- Goal names the specification used.
from http//o2s.csail.mit.edu/system.html
11Goal Instances
- Goal bound with parametersSendText(jmp,
Meeting Time!) - Return value of call is a Solution
- Properties mirror that of the chosen Technique.
- A Goal Instance persists until it is told to
shutdown.
12Techniques
- parameterized template for satisfying a
particular Goal - Both declarative and imperitive code
- subgoals
- Technique Instances satisfy Goal Instances
- parameters bound to Goal Instance's
- fill in Properties of Solutions
13Technique Code
- Partitioned into Stages
- write stage N1 as though stage N has completed
- All state is stored in Solution objects
- subgoal properties
- one's own properties
14Technique Stages
- only exec is required
- The Planner keeps track of stage dependencies.
- evaluation stages must be idempotent
- are time limited!
- evaluation stages
- first
- subgoals
- eval
- foreground
- execution stages
- exec
- update
- shutdown
15A Few Examples
16PlayMusic via MP3 Technique
to PlayMusic(criteria) via MP3s
subgoals source FindMusicStream(criter
iagoal.criteria,
stream_format"MP3") sink
FindAudioSink(stream_format"MP3") fader
AudioFader(in_stream_format"MP3",
out_stream_format"MP3") ...
- Don't want a new Technique for each and every
format.
17PlayMusic via GenericStream
to PlayMusic(criteria) via GenericStream
subgoals source FindMusicStream(criter
iagoal.criteria) sink
FindAudioSink() subgoals fader
AudioFader(in_stream_typesource.stream_format,
out_stream_typesink.stre
am_format)
- Choose an AudioFader that matches the inputs and
outputs.
18Making the Best Choices
OutputAV()
via Monitor/AudioSink
.50
VideoSink()
AudioSink()
.75
.75
.75
.50
.75
.25
via TV
via Monitor
via TV Speaker
via Receiver
- Given two subgoals, the best of each may not be
the best pair.
19(No Transcript)
20Free Communication
- Use parameters to influence the choices of the
Planner - pass down information
- fail if a choice is not good enough
to FreeTeleconference(person_a,
person_b) via RequireFree
subgoals tc Teleconference(goal.person_
a, goal.person_b,
cost0) ...
to FreeTeleconference(person_a,
person_b) via CheckFree subgoals
tc Teleconference(goal.person_a,
goal.person_b) eval
if tc.cost gt 0 fail(No free
teleconference!") ...
21Limits to Parameter Passing
- Passing down ? needs to be specified
- Passing up ? needs to be calculated
G1(cost)
via T1
G2()
via T2
G3()
via T3
22Questions?
- Planner in o2s/planner
- Techniques scattered through o2s/playground
23Solutions
- Where Techniques store state
- Keeps track of modifications and rolls back state
as necessary. - Where properties are stored
- Public Properties (exposed as Goal
properties)solution.satisfaction .5 - Private Propertiessolution._var 42
24Interfacing with the Real World
- Techniques can call arbitrary code.
- Agnostic towards implementation technology.
- Python is the common denominator.
- Node Cloning
- created by the GenerateSolution subgoal
25(No Transcript)
26(No Transcript)