;;;; -*- Mode: Soar -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; ;;;; File : launch.soar6 ;;;; Author : David Steier ;;;; Created On : Tue Feb 18 14:53:55 1992 ;;;; Last Modified By: Greg Nelson ;;;; Last Modified On: Wed Jan 26 19:10:15 1994 ;;;; Update Count : 221 ;;;; Soar Version : 6.0 ;;;; ;;;; PURPOSE ;;;; launch space ;;;; ;;;; Copyright 1991, Carnegie Mellon University. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; HISTORY ;;;; ;;; 10/18/90 DMS File created ;;; 11/11/92 DMS converted to Soar6 ;;; --------------------- ;;; Problem space proposal (sp propose-top-space (goal ^object nil) --> ( ^problem-space

) (

^name top-ps) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;; INITIAL STATE PROPOSAL ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Specific details of initial situation are loaded from an "initsit" file. ;;; to give correct omi location. (sp top*ps*launch (goal ^object nil ^problem-space.name top-ps) --> ( ^state ) ( ^name initial-state ^activity launch ^segment segment7 ^attention-state ^current-situation + &, + & ^current-visual-target ) ( ^item omi) ; (write (crlf) |NTD HEARS: ntd, cvfs|) ; ( ^cur-word ^ended-by ) ; ( ^word-name ntd ^word-number 1 ^next-word ) ; ( ^word-name CVFS ^word-number 2 ^next-word ) ; ( ^word-name %period ^word-number 3 ^next-word ) ( ^properties + &) ( ^name isa ^value self) ( ^properties + &) ( ^name isa ^value launch) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; OPERATOR PROPOSAL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; TASK-DONE ;; This terminates the find-pagenum task if it has completed. (sp launch*po*task-done*page-known (goal ^object nil ^problem-space.name top-ps ^state ) ( ^task ^current-situation ) ( ^name find-pagenum) ( ^properties ^relations ) ( ^name isa ^value launch) ( ^name omipage ^to ) ( ^properties ) ( ^name isa ^value page) ( ^name side ^value ) ( ^name number ^value ) --> ( ^operator ) ( ^name task-done ^old-task ) ) ;; If in the launch space, and some step information has been received, ;; where the ntd is the resp, then propose follow-OMI-procedure. ;; This keys off of a probably incorrect situation-model. #| (sp launch*po*follow-OMI-procedure*step-info (goal ^problem-space.name top-ps ^state ) (goal ^object nil ^state.current-situation ) ( ^activity launch ^current-situation ) ( ^relations ) ( ^name resp ^to ) ( ^properties ) ( ^name isa ^value self) ( ^properties ^relations ) ( ^name isa ^value notification) ( ^name subevent ^to ) ( ^properties ) ( ^name isa ^value assertion) ( ^properties ) ( ^name isa ^value linguistic-event) ( ^properties ^relations ) ( ^name isa ^value omi-step) ( ^name subevent ^to ) --> ( ^operator ) ( ^name follow-OMI-procedure) ) |# (sp launch*po*follow-omi-procedure*ntd-found (goal ^problem-space.name top-ps ^state ) ( ^activity launch ^task ^current-visual-target ) ( ^name search-for-step ^criterion ntd-participation ^criterion-satisfied true) ( ^item omi ^column cmd) --> ( ^operator ) ( ^name follow-OMI-procedure ^old-task ) ) (sp launch*po*follow-omi-procedure*pending-step-found (goal ^problem-space.name top-ps ^state ) ( ^activity launch ^task ^current-visual-target ) ( ^name check-for-step-pending ^criterion-satisfied true) ( ^item omi ^column seq) --> ( ^operator ) ( ^name follow-OMI-procedure ^old-task ) ) (sp launch*po*follow-omi-procedure*find-step-info-succeeded (goal ^problem-space.name top-ps ^state ) ( ^activity launch ^task ^current-visual-target ^current-situation ) ( ^name find-step-info ^criterion ) ( ^item omi) ( ^properties ^relations ) ( ^name isa ^value launch) ( ^name current-step ^to ) ( ^properties ^relations ) ( ^name isa ^value omi-step) ( ^name ^to ) --> ( ^operator ) ( ^name follow-OMI-procedure ^old-task ) ) (sp launch*po*follow-omi-procedure*determine-cdc-time*succeeded (goal ^problem-space.name top-ps ^state ) ( ^activity launch ^task ^current-visual-target ^current-situation ) ( ^name determine-cdc-time) ( ^item cdc) ( ^properties ^relations ) ( ^name isa ^value launch) ( ^name cdc-time ^to ) ( ^properties ) ( ^name isa ^value cdc-time) ( ^name value ^value ) --> ( ^operator ) ( ^name follow-OMI-procedure ^old-task ) ) (sp launch*po*follow-omi-procedure*evaluate-step*ntd-resp*to-be-performed (goal ^problem-space.name top-ps ^state ) ( ^activity launch ^task ^current-visual-target ^current-situation ) ( ^name evaluate-step) ( ^item omi) ( ^properties ^relations ) ( ^name isa ^value launch) ( ^name current-step ^to ) ( ^properties ^relations ) ( ^name isa ^value omi-step) ( ^name status ^value pending) ( ^name resp ^to ) ( ^properties ) ( ^name isa ^value self) ( ^name time ^to ) ( ^properties ^relations ) ( ^name isa ^value cdc-time) ( ^name equal-to ^to ) ( ^name cdc-time ^to ) ( ^properties ) ( ^name isa ^value cdc-time) --> ( ^operator ) ( ^name follow-OMI-procedure ^old-task ) ) (sp launch*po*follow-omi-procedure*step-performed (goal ^problem-space.name top-ps ^state ) ( ^activity launch ^task ^current-step ) ( ^name perform-step) ( ^annotation complete ^properties ^relations ) --> ( ^operator ) ( ^name follow-OMI-procedure ^old-task ) ) ;; This is proposed any time there's nothing in particular for us to do. (sp launch*po*find-next-participation (goal ^problem-space.name top-ps ^state ) -( ^annotation ntd-in-cmd-column -^annotation step-complete) ( ^activity launch -^task ^current-situation ) ( ^properties ) ( ^name isa ^value launch) --> ( ^operator +) ( ^name find-next-participation) ) (sp launch*po*wait*wait-for-cdc (goal ^problem-space.name top-ps ^state ) ( ^activity launch ^task.name wait-for-cdc) --> ( ^operator + <) ( ^name wait) ) (sp launch*po*wait*nothing-visible*resources-in-use (goal ^object nil ^state ) ( -^<< visual-input visual-input-peripheral >> ^resource-in-use ) --> ( ^operator + <) ( ^name wait ^resource ) ) (sp top*ao*wait-for-audio (goal ^object nil ^state ^operator ) ( ^new-audio-available true) ( ^name wait-for-audio) --> ( ^operator @) ) #| ;;; FIND-PAGENUM ;; We are doing this in a different way. Probably don't need this. (sp launch*po*find-pagenum (goal ^object nil ^state ) ( ^activity launch ^current-situation ) ( ^properties ) ( ^name isa ^value launch) -{( ^relations ) ( ^name omipage) } -{( ^task ) ( ^name find-pagenum) } --> ( ^operator ) ( ^name find-pagenum) ) |# ;;; SEARCH-FOR-STEP ;;; This initiates a search for the step being discussed as soon as a summons ;;; has been created. (sp launch*po*search-for-step (goal ^object nil ^state ) ( ^activity launch ^current-discourse ^current-situation ) ( ^name summons) ( ^properties ) ( ^name isa ^value launch) ( ^relations ) ( ^name omipage) -{( ^task ) ( ^name search-for-step ^criterion conversation-match) } --> ( ^operator ) ( ^name search-for-step ^criterion conversation-match) ) ;; Prefer follow-omi-procedure when time info has just been received, ;; FINISH THIS #| (sp launch*po*follow-OMI-procedure*time-info (goal ^problem-space.name top-ps ^state ) ( ^activity launch ...) --> ( ^operator ) ( ^name follow-OMI-procedure)) |# ;; Propose follow-omi-procedure when the next NTD participation ;; has been found ;; FINISH THIS #| (sp launch*po*follow-OMI-procedure*next-ntd-participation (goal ^problem-space.name top-ps ^state ) ( ^activity launch ...) --> ( ^name follow-OMI-procedure) ( ^operator )) |# ;; When nothing else to do, then prefer to look ahead ;; and follow-omi-procedure. Nothing else to do is indicated by ;; by the fact that all attended to input has been comprehended, ;; absence of a received summons (to the NTD or others), ;; no found next participation, location, no step, cdc, or ;; request info has been received. This ;; will result in going into the follow-omi-procedure to ;; find the next place where the NTD is involved and carrying out ;; the action if necessary ;; FINISH THIS #| (sp launch*po*follow-omi-procedure*when-pause-read (goal ^problem-space.name top-ps ^state ) ( ^activity launch ...) --> ( ^name follow-omi-procedure) ( ^operator )) |# ;; If in the launch space, and info about an anomaly has been received, ;; then propose handle-anomaly ;; FINISH THIS #| (sp launch*po*handle-anomaly*anomaly-info-received (goal ^problem-space.name top-ps ^state ) ( ^activity launch ...) --> ( ^operator ) ( ^name handle-anomaly)) |# ;; propose handle-anomaly when a request comes in not in accordance with ;; an OMI step expectation ;; FINISH THIS #| (sp launch*po*handle-anomaly*when-request-comes-in (goal ^problem-space.name top-ps ^state ) ( ^activity launch ...) --> ( ^name handle-anomaly) ( ^operator )) |# ;; when a summons to another has been received, then propose handle-anomaly ;; *** big hack: ntd needs to follow rest of conversation between spe and ;; dps in order to reroute it while handling anomaly. but there ;; is no real clue that this is an anomaly until SPE asks about copying ;; CDR message, and then NTD will check in handle-anomaly space that ;; these are the people who are responsible for handling the problem ;; FINISH THIS #| (sp launch*po*handle-anomaly*when-summons-to-other-comes-in (goal ^problem-space.name top-ps ^state ) ( ^activity launch ...) --> ( ^name handle-anomaly) ( ^operator )) |# ;; ANSWER-SUMMONS ;; Propose to answer a summons when received. This has been taken over ;; (perhaps a little too far) by generation. ; Has the following effects on model: ; sitling ^isa linguistic-event ^icp sitcall ^ocp sitself ; old ; ^subevent sitans ; new ; sitans ^isa answer ; new ; sitcall ^isa person ^name ; old #| (sp launch*po*answer-summons (goal ^problem-space.name top-ps ^state ) ( ^activity launch ^current-situation ) ( ^properties ^relations ) ( ^name isa ^value linguistic-event) ( ^name subevent ^to ) ( ^name icp ^to ) ( ^properties ) ( ^name isa ^value summons) ( ^properties ) ( ^name isa ^value person) ( ^name name ^value ) - { ( ^relations ) ( ^name subevent ^to ) ( ^properties ) ( ^name isa ^value answer) } --> ( ^operator ) ( ^name answer-summons ^dialog ^summons ^caller ^say-caller true) ) |# ;;;;;;;;;;;;;;;;;;;;;;;;;;;; OPERATOR APPLICATION ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; TASK-DONE ;;; This eliminates the current task. Looks like it's not needed... ;; This also seems to overlap with eliminate-task. (sp launch*ao*task-done (goal ^object nil ^state ^operator ) ( ^name initial-state ^activity launch) ( ^name task-done ^old-task ) --> ( ^task -) ( ^operator @) ) ;;; FIND-PAGENUM ;;; This switches to a new task. Looks like it's not needed... (sp launch*ao*find-pagenum (goal ^object nil ^state ^operator ) ( ^name initial-state ^activity launch) ( ^name find-pagenum) --> ( ^new-task ) ( ^operator @) ) ;;; SEARCH-FOR-STEP ;;; This switches to a new task. Looks like it's not needed... (sp launch*ao*search-for-step (goal ^object nil ^state ^operator ) ( ^name initial-state ^activity launch) ( ^name search-for-step) --> ( ^new-task ) ( ^operator @) ) ; $$$ This constant determines how long to wait: ; 5 seconds = 5000 ms = 100 cycles (sp launch*ao*wait*wait-for-cdc*reevaluate-cdc (goal ^object nil ^problem-space.name top-ps ^state ^operator ) ( ^name initial-state ^wait-cycles 100) ( ^name wait) --> ( ^operator @ +) ( ^name new-task ^new-task ) ( ^name reevaluate-cdc-time) ) (sp launch*ao*task-created*reconsider (goal ^problem-space.name top-ps ^state ^operator ) ( ^activity launch ^task ) ( ^name << find-next-participation follow-omi-procedure >> -^old-task) --> ( ^operator @) ) (sp launch*ao*task-changed*reconsider (goal ^problem-space.name top-ps ^state ^operator ) ( ^activity launch ^task ) ( ^name << find-next-participation follow-omi-procedure >> ^old-task { <> }) --> ( ^operator @) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;; DESIRED STATE DETECTION ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; $$$ Conspicuously absent. Hmm.... ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SEARCH CONTROL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This isn't getting used, and *should* be. This switches the task from ;; staring at the page to participation in the conversation. (sp launch*c*complete-conversation-better (goal ^object nil ^state ^operator + +) ( ^name << accept-discourse-segment postpone-discourse-segment reject-discourse-segment ignore-discourse-segment >>) ( ^name complete-conversation) ( ^activity launch) --> ( ^operator < ) ) ; $$$ See how this fares... (sp launch*c*new-task-better (goal ^object nil ^state ^operator + +) ( ^name initial-state ^activity launch) ( ^name new-task) ( -^name new-task) --> ( ^operator > ) ) (sp launch*c*attend-recognize-indifferent (goal ^object nil ^state ^operator + +) ( ^name initial-state ^activity launch) ( ^name attend) ( ^name recognize) --> ( ^operator = ) ) (sp launch*c*wait*resources-indifferent (goal ^object nil ^state ^operator + { <> } +) ( ^name wait ^resource ) ( ^name wait ^resource ) --> ( ^operator = ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; STATE AUGMENTATIONS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (sp launch*augs*has-vision (goal ^object nil ^state ) ( ^<< visual-input visual-input-peripheral >>) --> ( ^has-vision t) )