The Apex Architecture by jos11797

VIEWS: 23 PAGES: 49

									    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 simulation
models exceeds what modelers
can supply with current tools
      Cognitive Architectures as Practical Tools

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

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

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

• Overview of Apex architecture and applications
• Capabilities incorporated into the architecture
   - Procedure-based reactive planner
   - Multitask management
• Usability-related efforts
Apex applications

      Realistic simulations of
      human pilots and air
      traffic controllers

           Interface evaluation
           based on CPM-GOMS

      Autonomous robots for
      reconnaisance and
      surveillance
    Capabilities
          What we need
Many domains of practical interest are demanding in
the sense that a skilled agent must :

   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)
        Capabilities
           Procedure-based reactive planner

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

   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 representation in Apex
                                    • concurrency
(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))))
     Procedure representation in Apex
                                    • concurrency
                                    • reactivity / cl-control
(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))))
     Procedure representation in Apex
                                    • concurrency
                                    • reactivity / cl-control
(procedure                          • hierarchy / selection
   (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))))
      Procedure representation in Apex
                                     • concurrency
                                     • reactivity / cl-control
(procedure                           • hierarchy / selection
   (index (hold-altitude using mcp)) • contingency-handling
   (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))))
      Procedure representation in Apex
                                     • concurrency
                                     • reactivity / cl-control
(procedure                           • hierarchy / selection
   (index (hold-altitude using mcp)) • contingency-handling
   (profile right-hand)              • multitask management
   (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))))
Execution-time action-selection using stored
procedures
Execution-time action selection
+ Copes well with uncertainty
- Reduced deliberation
Stored 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
      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 of
interacting tasks based on task-specific characteristics
and general heuristics.
    Challenge
Support creation of agents with human-level ability
to employ diverse multitask management tactics
  • General heuristics underlying tactics
        architecture mechanisms

  • Task-specific knowledge
        specialized representation elements
        task representation methodology
    Multitasking in Apex

   Concurrency control
   Interruption, resumption, interleaving
   Efficient use of resources
       Concurrency Control
              PDL idioms


Converge               Race                  Synchronize
                       (procedure
(procedure                                  (procedure
                         (index (do-it))
  (index (do-it))                             (index (do-it))
                         (step s1 (do-A)
  (step s1 (do-A)                             (step s1 (do-A))
                         (step s2 (do-B)
  (step s2 (do-B)                             (step s2 (do-B)
                         (step s3 (do-C)
  (step s3 (do-C)                               (waitfor (started ?s1)))
                           (waitfor ?s1)
     (waitfor ?s1 ?s2)                        (step s3 (terminate)
                           (waitfor ?s2))
  (step s4 (terminate) (step s4 (terminate)     (waitfor ?s1 ?s2)))
     (waitfor ?s3)))       (waitfor ?s3)))
        Interruption and resumption
            Determining if tasks conflict


   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
             Resolving task conflicts


   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 most
         expensive losses)
   Interruption and resumption
          Resolving task conflicts


Resource conflicts resolved using priority heuristic
                               1                                1
    priorityb  IC  S (1         ) I b  ( S m ax  S )(1        )U b
                              U 1                            Ib 1


Priority information set with step-level PDL clauses
   (step …
     (priority <urgency> <importance>)
     (interrupt-cost <cost>)
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)))
           ...)
    Efficient use of resources
   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
    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
   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
Reducing time/expertise to construct models



                       Usability efforts
                       •   High-level language
    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
Reducing time/expertise to construct models



                       Usability efforts
                       •   High-level language
                       •   Visualization/debug tools
Visualizing and Debugging

                   Sherpa
                   • Simulation traces
                   • Physical environment
                   • PERT charts

                   VISTA
                   • Enhanced Sim Trace
                    (2001 CMU student project)
Reducing time/expertise to construct models



                       Usability efforts
                       •   High-level language
                       •   Visualization/debug tools
                       •   World modeling
Specifying a Physical World Model
Time-consuming and error-prone when done by hand
Specifying a Physical World Model
    Easy with drag-and-drop interface




       CMU 2002 student project
Reducing time/expertise to construct models



                       Usability efforts
                       •   High-level language
                       •   Visualization/debug tools
                       •   World modeling
                       •   Interoperability
     Interoperability
                                          Apex interops with:
                                          Riptide
                                          X-Plane
                                          DOMS
                                          Mozilla
                                          AMBR (HLA)

                                          Reusable elements
                                          Apex API
                                          Sim compatibility
                                          Com support

Apex pilot flies an F-16 over NASA Ames
Reducing time/expertise to construct models



                       Usability efforts
                       •   High-level language
                       •   Visualization/debug tools
                       •   World modeling
                       •   Interoperability
                       •   Reusable components
                       Resuable building-blocks
                                 0
                                 new-cursor-location                         (procedure

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

                                             perceive-                        (step c1 (initiate-move-cursor ?target))
                                               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))
                  50        50          50
    START                                                50                   (step p1 (perceive-target-complex ?target))
                 attend-    initiate-          verify-
initiate-move-    target      POG              target    initiate-            (step c4 (verify-target-position ?target) (waitfor ?c3 ?p1))
     cursor                                      pos     mouseDn              (step c5 (initiate-click ?target) (waitfor ?c4 ?m1))

                 590                                                          (step m3 (mouse-down ?target) (waitfor ?m1 ?c5))
                 (FL)                                      100       100      (step m4 (mouse-up ?target) (waitfor ?m3))
                  move-                                     mouse    mouse    (step t (terminate) (waitfor ?m4 ?rvr1 ?rvr2)))
                  cursor                                     Dn        Up


                           30
                                               from Gray and
                                POG
                                               Boehm-Davis (2000)
Reducing time/expertise to construct models



                       Usability efforts
                       •   High-level language
                       •   Visualization/debug tools
                       •   World modeling
                       •   Interoperability
                       •   Reusable components
                       •   Distributed development
         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)
            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: apex-help@eos.arc.nasa.gov
     Apex 2.3

Apex is available at

human-factors.arc.nasa.gov/apex
   How PDL specifies interleaving
CPM-GOMS requires that actions from templates earlier
in a template sequence have priority in resource conflicts
over 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))
      How PDL specifies interleaving
     Global scope of priority value assignments undesirable
     for 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             Requires modeler to
       priority values                     anticipate decomposition
      How PDL specifies interleaving
     Solution alternative mechanisms/syntax for resolving
     resource conflicts that is dynamically scoped

(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)))
      How PDL specifies interleaving
        Abbreviation to further simplify syntax…


(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)))
          FAST MOVE-CLICK
                                       0
                                           new-cursor-location
                                              100
                                               perceive-
                                                 target


                 50              50                 50                          695
    START         attend-         initiate-          verify-
                                                                 50

initiate-move-     target           POG              target      initiate-       END
     cursor                                            pos       mouseDn
                 545 (FL)                                         100
                  move-                                               mouseDn
                  cursor

                            30

                                 POG



- from Gray and Boehm-Davis (2000)
                        Interleaving Templates
                                  0
                                   new-cursor-location                                                            0
                                                                                                                   new-cursor-location
                                        290
                                                                                                                        290
                                        perceive-
                                         target                                                                         perceive-
                                                                                                                         target



                 50          50            50
    START                                                   50                                    50         50            50
                 attend-    initiate-      verify-                                                                                         50
initiate-move-    target      POG                                                    START        attend-   initiate-      verify-
                                           target           initiate-
     cursor                                                                      initiate-move-    target     POG          target          initiate-
                                             pos            mouseDn
                                                                                      cursor                                 pos           mouseDn
                 590
                 (FL)                                      100          100                       182
                                                             mouse       mouse                    (FL)                                       100       100
                 move-                                                                                                                        mouse    mouse
                                                               Dn         Up
                 cursor                                                                           move-
                                                                                                                                                Dn       Up
                                                                                                  cursor
                                                FAST M/C
                            30                                                                                                  FAST M/C
                                                                                                            30
                            POG
                                                                                                            POG




                           last vision action in the previous operator
   Autonomous Helicopter Application
   Project Lead: Matt Whalley (Army)
   Autonomy Lead: Michael Freed (NASA/IHMC)

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




Ariel (Yamaha RMAX)
 Payload: 66 lbs.
 Flight duration: 60 min
 Recon/surveillance target selection
Utility of target selection
                                     Approach – multimethod
• Set of target sites: s є S
• Observation time-cost              • search for small target sets
     distance                        • for larger sets, method depends
     flight dynamics                   on uniformity/clumpiness
     required observe action               spatial clumps
• Criterial events: ei,s є Es              cost and “deadline” clumps
     baseline p(ei,s ) and mods
     cumulative cost(ei,s ,t)        Research Area – resource mgt.

            Theft            Fire    Target selection is special case
    cost




                    cost




                                     of allocating unary resources
           time            time
                                     under time-pressure/uncertainty.
Best choice = min opportunity cost
  Apex Architecture
  Execution-time action-selection using stored-plans


                                       Exec-time Action-Selection
                          bootstrap    + High uncertainty tolerance
                                       - Little time to deliberate
            enable        select
                                       Stored Plans
                                       + Fast decisions
match                                  - Not sound or complete
        refine              allocate   + Adapted to stat struc of env
                                       + Mutual evolution with env
                                       + SOP compliance
                  start      execute
                                       + Easy to construct, debug
                 terminate             + Amenable to expert evaluat’n
                                       + More predictable behavior

								
To top