the apex architecture multitasking under time-pressure and uncertainty michael freed nasa ames...

49
The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Upload: judith-gibson

Post on 11-Jan-2016

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

The Apex ArchitectureMultitasking Under Time-Pressure and

Uncertainty

Michael FreedNASA Ames Research Center

Page 2: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Cognitive Architecture Applications at NASA

• Evaluating cockpit designs• Planning crewed missions• Artificial participants in training/eval simulations• Tech impact assessment

Problem:Demand for human simulationmodels exceeds what modelerscan supply with current tools

Page 3: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Cognitive Architectures as Practical Tools

1. What capabilities/resources does it provide abovethose in a general-purpose programming language?

2. How usable are those capabilities? How much time,expertise, and inventiveness does someone need tobuild an agent that meets given requirements?

3. How good are its software qualities? E.g. stability,maintainability, extensibility (“ilities”)

Page 4: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Outline

• Overview of Apex architecture and applications• Capabilities incorporated into the architecture

- Procedure-based reactive planner- Multitask management

• Usability-related efforts

Page 5: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Realistic simulations ofhuman pilots and airtraffic controllers

Interface evaluation based on CPM-GOMS

Autonomous robots forreconnaisance and surveillance

Apex applications

Page 6: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center
Page 7: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Capabilities What we need

Cope with uncertainty Can’t completely know or predict world state Actions may fail or produce undesirable side-effects Actual resource requirements determined during execution New, urgent tasks can arise at any time

Cope with time-pressure Can’t deliberate endlessly Options for resolving uncertainty constrained

Conform to SOPs (not just goal-pursuit)

Many domains of practical interest are demanding in the sense that a skilled agent must :

Page 8: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Capabilities Procedure-based reactive planner

Cope with time pressure by… Using stored, generalized procedures Avoiding expensive decision processes (search)

Cope with uncertainty by… Deciding action at the last moment when maximum

situation information available Integrated contingency handling

Not necessarily sound or complete

Procedure-based reactive planners (E.g. RAPS, ESL, PRS)select action based on stored, generalized procedures.

Page 9: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Procedure representation in Apex

(procedure (index (hold-altitude using mcp)) (profile right-hand) (step s1 (clear right-hand)) (step s2 (find-loc alt-hold-button => ?loc)) (step s3 (press-button ?loc right-hand) (waitfor (empty right-hand) (location alt-hold-button ?loc))) (step end (terminate) (waitfor (illuminated alt-hold-button)) (step aux1 (restart ?self) (waitfor (resumed ?self))))

• concurrency

Page 10: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Procedure representation in Apex

(procedure (index (hold-altitude using mcp)) (profile right-hand) (step s1 (clear right-hand)) (step s2 (find-loc alt-hold-button => ?loc)) (step s3 (press-button ?loc right-hand) (waitfor (empty right-hand) (location alt-hold-button ?loc))) (step end (terminate) (waitfor (illuminated alt-hold-button)) (step aux1 (restart ?self) (waitfor (resumed ?self))))

• concurrency • reactivity / cl-control

Page 11: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Procedure representation in Apex

(procedure (index (hold-altitude using mcp)) (profile right-hand) (step s1 (clear right-hand)) (step s2 (find-loc alt-hold-button => ?loc)) (step s3 (press-button ?loc right-hand) (waitfor (empty right-hand) (location alt-hold-button ?loc))) (step end (terminate) (waitfor (illuminated alt-hold-button)) (step aux1 (restart ?self) (waitfor (resumed ?self))))

• concurrency • reactivity / cl-control• hierarchy / selection

Page 12: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Procedure representation in Apex

(procedure (index (hold-altitude using mcp)) (profile right-hand) (step s1 (clear right-hand)) (step s2 (find-loc alt-hold-button => ?loc)) (step s3 (press-button ?loc right-hand) (waitfor (empty right-hand) (location alt-hold-button ?loc))) (step end (terminate) (waitfor (illuminated alt-hold-button)) (step aux1 (restart ?self) (waitfor (resumed ?self))))

• concurrency • reactivity / cl-control• hierarchy / selection• contingency-handling

Page 13: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Procedure representation in Apex

(procedure (index (hold-altitude using mcp)) (profile right-hand) (step s1 (clear right-hand)) (step s2 (find-loc alt-hold-button => ?loc)) (step s3 (press-button ?loc right-hand) (waitfor (empty right-hand) (location alt-hold-button ?loc))) (step end (terminate) (waitfor (illuminated alt-hold-button)) (step aux1 (restart ?self) (waitfor (resumed ?self))))

• concurrency • reactivity / cl-control• hierarchy / selection• contingency-handling• multitask management

Page 14: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Execution-time action-selection using stored procedures

Execution-time action selection+ Copes well with uncertainty- Reduced deliberationStored procedures+ Natural representation of SOPs+ Easy to construct, debug, evaluate+ Fast decisions+ Can adapt to statistical structure of env by repeated use+ Can adapt environment to make procedures more effective+ Easy to communicate to other agents- Not necessarily sound or complete

Successful procedure-based behavior requires multitasking

Page 15: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Multitask management examples

Delay answering phone until finished typing sentence heuristic: prefer to delay interrupt until good stopping point

Pull over to side of road before studying map Drive back onto road (but don’t drive to start

point) Do something useful when stopped at a red light …Multitask management: execution-time coordination ofinteracting tasks based on task-specific characteristicsand general heuristics.

Page 16: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Challenge

Support creation of agents with human-level ability to employ diverse multitask management tactics• General heuristics underlying tactics

architecture mechanisms

• Task-specific knowledgespecialized representation elementstask representation methodology

Page 17: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Multitasking in Apex

Concurrency control Interruption, resumption, interleaving Efficient use of resources

Page 18: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Concurrency ControlPDL idioms

Converge

(procedure (index (do-it)) (step s1 (do-A) (step s2 (do-B) (step s3 (do-C) (waitfor ?s1 ?s2) (step s4 (terminate) (waitfor ?s3)))

Race

(procedure (index (do-it)) (step s1 (do-A) (step s2 (do-B) (step s3 (do-C) (waitfor ?s1) (waitfor ?s2)) (step s4 (terminate) (waitfor ?s3)))

Synchronize

(procedure (index (do-it)) (step s1 (do-A)) (step s2 (do-B) (waitfor (started ?s1))) (step s3 (terminate) (waitfor ?s1 ?s2)))

Page 19: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Resource requirements declared in procedure (profile (<resource> [tolerance]) …) (hold-resource <resource>) [tolerance])

(release-resource <resource> [tolerance])

Some tasks tolerate brief interruptions Conflict exists between tasks A and B if

A and B both require resource R, and Expected Duration (A) > Tolerance (B) or Expected Duration (B) > Tolerance (A)

Interruption and resumption Determining if tasks conflict

Page 20: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Compute priority from task attributes & situational factors: urgency (U): measure of time until deadline importance (I): expected cost of missing deadline subjective workload (S): measure of task crowding interrupt cost (IC): expected cost of interruption

In low workload, prefer urgent tasks (avoid unnecessary loss)

In high workload, prefer important tasks (avoid mostexpensive losses)

Interruption and resumption Resolving task conflicts

Page 21: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Resource conflicts resolved using priority heuristic

Priority information set with step-level PDL clauses (step …

(priority <urgency> <importance>)

(interrupt-cost <cost>)

Interruption and resumption Resolving task conflicts

bb

bb UI

SSIU

SICpriority )1

11)(()

1

11( max

Page 22: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Interruption and resumption Transition behaviors

(procedure (index (fly-cruise-leg using manual-control)) (step s1 (maintain-altitude) (interrupt-cost 5))

... (step s12 (handoff-to-pilot-not-flying) (priority (importance 10) (urgency 10))) (waitfor (interrupted ?self))) (step s13 (monitor-pilot-not-flying) (waitfor (completed ?s12))) (step s14 (request-role-pilot-flying) (waitfor (resumed ?self))) ...)

Page 23: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Combine redundant tasks (merge <condition> [<task pattern>])

Exploit slack in procedure resource use Automatic detection of slack intervals Integrated dispatch scheduling

Concurrent recursive decomposition => tasks

Priority-based allocation => schedule

Efficient use of resources

Page 24: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Multitask Management Summary

Multitasking ability founded on tactical knowledge derived from general heuristics

Reactive planners can be extended to execute these heuristics in uncertain/time-pressured environments

Specifically, extensions for concurrency control, interruption handling and resource management facilitate use of multitasking tactics

Understanding of what needs to be represented and what notation is best for this purpose are improving as new Apex applications are developed

Page 25: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Motivation and Learning Work in progress

Intent inference for multitasking agents• use procedural knowledge in reverse• distinguish separate “threads” of behavior• initial approach in Freed and Dahlman, 2002

Learning aggregate properties of procedures• learning duration and resource characteristics will enable better dispatch scheduling• other statistics useful for handling contingencies such as failure and interruption

Page 26: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Usability efforts• High-level language

Reducing time/expertise to construct models

Page 27: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Behavior representation: usability

Intuitive (step s3 (stop) (waitfor (shape ?x light) (color ?x red))) conjunctive preconditions mutually constraining

Expressive (step s4 (slow) (waitfor (color ?x green) then (color ?x yellow)) able to express temporal relations between preconditions

Compact abbreviated form for sequential procedures

Evolves as users’ needs become better understood

Support tools exist for authoring and debugging

Page 28: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Usability efforts• High-level language• Visualization/debug tools

Reducing time/expertise to construct models

Page 29: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Visualizing and Debugging

Sherpa• Simulation traces• Physical environment• PERT charts

VISTA• Enhanced Sim Trace (2001 CMU student project)

Page 30: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Usability efforts• High-level language• Visualization/debug tools• World modeling

Reducing time/expertise to construct models

Page 31: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Specifying a Physical World Model

Time-consuming and error-prone when done by hand

Page 32: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Specifying a Physical World Model

CMU 2002 student project

Easy with drag-and-drop interface

Page 33: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Usability efforts• High-level language• Visualization/debug tools• World modeling• Interoperability

Reducing time/expertise to construct models

Page 34: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

InteroperabilityApex interops with:RiptideX-PlaneDOMSMozillaAMBR (HLA)

Reusable elementsApex APISim compatibilityCom support

Apex pilot flies an F-16 over NASA Ames

Page 35: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Usability efforts• High-level language• Visualization/debug tools• World modeling• Interoperability• Reusable components

Reducing time/expertise to construct models

Page 36: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Resuable building-blocks

STARTinitiate-move-

cursor

perceive-target

290

0

50 50

verify-target

pos

50

move-cursor

590 (FL)

POG

30

mouseDn

100

initiate-mouseDn

50

mouseUp

100

new-cursor-location

from Gray and Boehm-Davis (2000)

attend-target

initiate-POG

(procedure

(index (fast-move-click-R-hand-on-mouse :target ?target))

(step c1 (initiate-move-cursor ?target))

(step m1 (move-cursor ?target) (waitfor ?c1))

(step c2 (attend-target ?target))

(step c3 (initiate-eye-movement ?target) (waitfor ?c2))

(step m2 (eye-movement ?target) (waitfor ?c3))

(step p1 (perceive-target-complex ?target))

(step c4 (verify-target-position ?target) (waitfor ?c3 ?p1))

(step c5 (initiate-click ?target) (waitfor ?c4 ?m1))

(step m3 (mouse-down ?target) (waitfor ?m1 ?c5))

(step m4 (mouse-up ?target) (waitfor ?m3))

(step t (terminate) (waitfor ?m4 ?rvr1 ?rvr2)))

Page 37: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Reducing time/expertise to construct models

Usability efforts• High-level language• Visualization/debug tools• World modeling• Interoperability• Reusable components• Distributed development

Page 38: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Distributed Development

Why needed• Library of “building blocks”• Resource models• Software interfaces • Visualization tools

Making it happen• Software infrastructure• Educational outreach• Web-based support Apex collaborative web site

(CMU HCI project 2001)

Page 39: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Apex Modeling Tool

Apex System• Apex architecture (autonomy)• Human resource architecture• Reusable procedure lib• World model widget libs• Simulation “engine”• GUI-based vis/debug tools• GUI-based world dev tool• Interoperability framework• Manuals, tutorials, …

Download system from: http://human-factors.arc.nasa.gov/apex/

User Support: [email protected]

Page 40: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Apex 2.3

Apex is available at

human-factors.arc.nasa.gov/apex

Page 41: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

How PDL specifies interleaving

CPM-GOMS requires that actions from templates earlierin a template sequence have priority in resource conflictsover activities from later templates.

Initial approach used the priority clause:• determines how to resolve resource conflict• globally scoped to allow comparison of any tasks

(step s2 (turn off alarm)(waitfor (on alarm))(priority 5))

Page 42: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

How PDL specifies interleaving

Global scope of priority value assignments undesirablefor CPM-GOMS representations

(procedure (procedure (index (get ?amt from atm)) (index (init atm transaction)) (step s1 (init atm transaction) (step s1 (insert card)

(priority 3000)) (priority 3200)) (step s2 (withdraw ?amt)) (step s2 (enter password)

(priority 2000)) (priority 3100)) (step s3 (end atm transaction) (step s3 (terminate)

(priority 1000)) (waitfor ?s2))) (step s4 (terminate) (waitfor ?s3)))

Complex procedure to set priority values

Requires modeler toanticipate decomposition

Page 43: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

How PDL specifies interleaving

(procedure (procedure (index (get ?amt from atm)) (index (init atm transaction)) (step s1 (init atm transaction) (step s1 (insert card)

(rank 1)) (rank 1)) (step s2 (withdraw ?amt)) (step s2 (enter password)

(rank 2)) (rank 2)) (step s3 (end atm transaction) (step s3 (terminate)

(rank 3)) (waitfor ?s2))) (step s4 (terminate) (waitfor ?s3)))

Solution alternative mechanisms/syntax for resolvingresource conflicts that is dynamically scoped

Page 44: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

How PDL specifies interleaving

(procedure :ranked (procedure :ranked (index (get ?amt from atm)) (index (init atm transaction)) (step s1 (init atm transaction) (step s1 (insert card) (step s2 (withdraw ?amt)) (step s2 (enter password) (step s3 (end atm transaction) (step s3 (terminate) (step s4 (terminate) (waitfor ?s3))) (waitfor ?s2)))

Abbreviation to further simplify syntax…

Page 45: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

FAST MOVE-CLICK

STARTinitiate-move-

cursor

perceive-target

100

new-cursor-location0

attend-target

50

initiate-POG

50

verify-target

pos

50

move-cursor

545 (FL)

POG

30

mouseDn

100

initiate-mouseDn

50

END

695

- from Gray and Boehm-Davis (2000)- from Gray and Boehm-Davis (2000)

Page 46: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Interleaving Templates

STARTinitiate-move-

cursor

perceive-target

290

0

attend-target

50

initiate-POG

50

verify-target

pos

50

move-cursor

590 (FL)

POG

30

mouseDn

100

initiate-mouseDn

50

mouseUp

100

FAST M/C

new-cursor-location

STARTinitiate-move-

cursor

perceive-target

290

0

attend-target

50

initiate-POG

50

verify-target

pos

50

move-cursor

182 (FL)

POG

30

mouseDn

100

initiate-mouseDn

50

mouseUp

100

FAST M/C

new-cursor-location

last vision action in the previous operator

Page 47: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Autonomous Helicopter ApplicationProject Lead: Matt Whalley (Army)Autonomy Lead: Michael Freed (NASA/IHMC)

Ariel (Yamaha RMAX) Payload: 66 lbs. Flight duration: 60 min

Intelligent recon/surveillance Goal – maximize information return Task – decide where to go next

Page 48: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Recon/surveillance target selection

Utility of target selection • Set of target sites: s є S• Observation time-cost distance flight dynamics required observe action• Criterial events: ei,s є Es

baseline p(ei,s ) and mods cumulative cost(ei,s ,t)

time time

cost

cost Theft Fire

Best choice = min opportunity cost

Approach – multimethod

• search for small target sets• for larger sets, method depends on uniformity/clumpiness

spatial clumps cost and “deadline” clumps

Research Area – resource mgt.

Target selection is special case of allocating unary resourcesunder time-pressure/uncertainty.

Page 49: The Apex Architecture Multitasking Under Time-Pressure and Uncertainty Michael Freed NASA Ames Research Center

Apex Architecture

bootstrap

execute

matchallocate

start

refine

enable select

terminate

Exec-time Action-Selection+ High uncertainty tolerance - Little time to deliberate

Stored Plans+ Fast decisions - Not sound or complete+ Adapted to stat struc of env+ Mutual evolution with env+ SOP compliance+ Easy to construct, debug+ Amenable to expert evaluat’n+ More predictable behavior

Execution-time action-selection using stored-plans