;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Model file ;;; ;;; File: phone_model.lisp ;;; Author: Andrew R. Freed ;;; Creation date: 2/July/02 ;;; Last modified: 7/April/02 ;;; ;;; This file runs under ACT-R/PM 5.0, RPM v2.17b, Segman v3.1, and ACL 5.0.1 ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Table of Contents ;;; ;;; i Declarative memory - chunk types ;;; ii Declarative memory - memory chunks ;;; iii Smart search parameters ;;; iv Productions to the phone-dialer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; i. declarative memory - chunk types ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; These types define the two kinds of goals used in this model. ;; dial-phone-num is a phone dialing goal and find-feature is a visual ;; searching goal (chunk-type dial-phone-num state name place current-num click) ;; These types represent other declaritive memories the model can have, ;; from simple digits ("number") to the various components of a phone ;; number (chunk-type number value) (chunk-type area-code name digit1 digit2 digit3) (chunk-type exchange name digit1 digit2 digit3) (chunk-type extension name digit1 digit2 digit3 digit4) (chunk-type phone-number name area-code exchange extension) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ii. declarative memory - memory chunks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; add-dm puts these chunks into declaritive memory (add-dm ;; Phone numbers are loaded into memory (my1_area_code ISA area-code name "Me1" digit1 "8" digit2 "1" digit3 "4") (my1_exchange ISA exchange name "Me1" digit1 "8" digit2 "6" digit3 "6") (my1_extension ISA extension name "Me1" digit1 "5" digit2 "0" digit3 "0" digit4 "0") (my1_phone_num ISA phone-number name "Me1" area-code my1_area_code exchange my1_exchange extension my1_extension) (my2_area_code ISA area-code name "Me2" digit1 "1" digit2 "2" digit3 "3") (my2_exchange ISA exchange name "Me2" digit1 "6" digit2 "5" digit3 "4") (my2_extension ISA extension name "Me2" digit1 "7" digit2 "8" digit3 "9" digit4 "0") (my2_phone_num ISA phone-number name "Me2" area-code my2_area_code exchange my2_exchange extension my2_extension) (my3_area_code ISA area-code name "Me3" digit1 "8" digit2 "1" digit3 "4") (my3_exchange ISA exchange name "Me3" digit1 "8" digit2 "6" digit3 "3") (my3_extension ISA extension name "Me3" digit1 "5" digit2 "0" digit3 "0" digit4 "0") (my3_phone_num ISA phone-number name "Me3" area-code my3_area_code exchange my3_exchange extension my3_extension) (my4_area_code ISA area-code name "Me4" digit1 "4" digit2 "1" digit3 "2") (my4_exchange ISA exchange name "Me4" digit1 "2" digit2 "6" digit3 "8") (my4_extension ISA extension name "Me4" digit1 "3" digit2 "0" digit3 "0" digit4 "0") (my4_phone_num ISA phone-number name "Me4" area-code my4_area_code exchange my4_exchange extension my4_extension) (my5_area_code ISA area-code name "Me5" digit1 "6" digit2 "0" digit3 "6") (my5_exchange ISA exchange name "Me5" digit1 "1" digit2 "9" digit3 "3") (my5_extension ISA extension name "Me5" digit1 "3" digit2 "0" digit3 "1" digit4 "2") (my5_phone_num ISA phone-number name "Me5" area-code my5_area_code exchange my5_exchange extension my5_extension) (my6_area_code ISA area-code name "Me6" digit1 "2" digit2 "1" digit3 "5") (my6_exchange ISA exchange name "Me6" digit1 "6" digit2 "5" digit3 "4") (my6_extension ISA extension name "Me6" digit1 "5" digit2 "7" digit3 "8" digit4 "5") (my6_phone_num ISA phone-number name "Me6" area-code my6_area_code exchange my6_exchange extension my6_extension) (my7_area_code ISA area-code name "Me7" digit1 "8" digit2 "1" digit3 "4") (my7_exchange ISA exchange name "Me7" digit1 "2" digit2 "3" digit3 "4") (my7_extension ISA extension name "Me7" digit1 "9" digit2 "6" digit3 "5" digit4 "7") (my7_phone_num ISA phone-number name "Me7" area-code my7_area_code exchange my7_exchange extension my7_extension) (my8_area_code ISA area-code name "Me8" digit1 "7" digit2 "4" digit3 "0") (my8_exchange ISA exchange name "Me8" digit1 "6" digit2 "1" digit3 "1") (my8_extension ISA extension name "Me8" digit1 "9" digit2 "2" digit3 "7" digit4 "3") (my8_phone_num ISA phone-number name "Me8" area-code my8_area_code exchange my8_exchange extension my8_extension) (my9_area_code ISA area-code name "Me9" digit1 "1" digit2 "0" digit3 "1") (my9_exchange ISA exchange name "Me9" digit1 "0" digit2 "1" digit3 "0") (my9_extension ISA extension name "Me9" digit1 "1" digit2 "0" digit3 "1" digit4 "0") (my9_phone_num ISA phone-number name "Me9" area-code my9_area_code exchange my9_exchange extension my9_extension) (my10_area_code ISA area-code name "Me10" digit1 "1" digit2 "0" digit3 "3") (my10_exchange ISA exchange name "Me10" digit1 "2" digit2 "7" digit3 "3") (my10_extension ISA extension name "Me10" digit1 "1" digit2 "0" digit3 "2" digit4 "9") (my10_phone_num ISA phone-number name "Me10" area-code my10_area_code exchange my10_exchange extension my10_extension) ;; Finally, a goal to dial a telephone number is placed in memory (phone-goal isa dial-phone-num state init name "Me1" click no) ) ;;; ;;; iii. smart search parameters ;;; ;; This section defines the parameters that help us create systematic visual search ;; while never fixating off of the keypad after fixating within the keypad ;; these two parameters give us "tunnel vision" in one direction ;; for instance, x-column means to only consider the column that ;; has x+-15 to current x (defparameter *x-column* 15) (defparameter *y-column* 15) ;;to make sure we actually move up, down, left, or right, we force ;; movement of "forward-xxx" pixels in the desired direction (defparameter *forward-width* 10) (defparameter *forward-height* 10) ;;should be set to the width and height of buttons on the phone, respectively ;;these are phone-specific and should be over-estimated slightly ;;they help the model move approximate distance from one target to another (defparameter *one-width* 77) ;75 (defparameter *one-height* 38) ;36 (defparameter *two-width* (* 2 *one-width*)) (defparameter *two-height* (* 2 *one-height*)) (defparameter *three-height* (* 3 *one-height*)) ;;; ;;; iv. Productions to Phone dialer ;;; ;;; These productions work in ACT-R 5.0 and RPM v2.17b and Segman v3.1 ;;; There are two types of productions here, those trying to solve the ;;; goal of dialing a phone (type: dial-phone-num) and those of finding ;;; a feature on the phone (type: find-feature). find-feature is a ;;; subgoal of dial-phone-num, meaning that while working on a ;;; dial-phone-num, a find-feature will have to be performed. After ;;; the find-feature completes, the dial-phone-num resumes. Note that ;;; one find-feature will be performed for each digit in the phone ;;; number ;;; Within each goal, there is an expected pattern of production ;;; firings. ;;; dial-phone-num: ;;; Plan A: The first time through the model after a "reset" ;;; 1) move-hand-to-phone ;;; 2-4) dial-area-code-n (for n=1 to 3) ;;; 5-7) dial-exchange-n (for n=1 to 3) ;;; 8-11) dial-extension-n (for n=1 to 4) ;;; 12) phone-done ;; first, move hand to mouse and retrieve phone number ;; According to Chong 98 (thesis) this is taking advantage ;; of "movement pre-postitioning". See also (Wood, Kieras, ;; & Meyer 1994; Kieras, Wood & Meyer 1995a, 1995b) ;; The phone number is indexed in memory on "name" ;; "place" denotes which place digit is to be dialed next (p start-dialing =goal> ISA dial-phone-num state init name =name ==> +retrieval> ISA area-code name =name =goal> state start place "1" ) ;; For each dial-*-* production, the following occur: ;; a) the type of goal is confirmed (dial-phone-num) ;; b) the place is checked (e.g. only dial 5th digit when place=5) ;; c) the phone number segment (area code, exchange, etc) and ;; the correct digit within that segment are present in WM ;; d) a sub-goal (type: find-feature) is created to find and click on ;; the proper digit, using the !push! command ;; e) when the sub-goal is finished, place is updated ;; For each dial-*-1 production, an additional check is performed, to ;; ensure that the segment to be dialed next is a digit of the original ;; phone number in the goal ;; Using =y in both the left and right hand sides of the production ;; ensures that the digit retrieved from memory is the digit searched for ;;This production checks the result of the phone number retrieval, and ;;sets a subgoal to dial the first number (p dial-area-code-1 =goal> ISA dial-phone-num state start name =name place "1" =retrieval> ISA area-code digit1 =y name =name ==> =goal> place "2" state find-number current-num =y) (p dial-area-code-2 =goal> ISA dial-phone-num - state attend-number - state find-number - state find-number-directed-search - state find-number-location place "2" =retrieval> ISA area-code digit2 =y name =name ==> =goal> place "3" state attend-number current-num =y) (p dial-area-code-3 =goal> ISA dial-phone-num - state attend-number - state find-number - state find-number-directed-search - state find-number-location place "3" =retrieval> ISA area-code digit3 =y name =name ==> +retrieval> ISA exchange name =name =goal> place "4" state attend-number current-num =y) (p dial-exchange-1 =goal> ISA dial-phone-num - state attend-number - state find-number - state find-number-directed-search - state find-number-location place "4" =retrieval> ISA exchange digit1 =y name =name ==> =goal> place "5" state attend-number current-num =y) (p dial-exchange-2 =goal> ISA dial-phone-num - state attend-number - state find-number - state find-number-directed-search - state find-number-location place "5" =retrieval> ISA exchange digit2 =y ==> =goal> place "6" state attend-number current-num =y) (p dial-exchange-3 =goal> ISA dial-phone-num - state attend-number - state find-number - state find-number-directed-search - state find-number-location place "6" =retrieval> ISA exchange digit3 =y name =name ==> +retrieval> ISA extension name =name =goal> place "7" state attend-number current-num =y) (p dial-extension-1 =goal> ISA dial-phone-num - state attend-number - state find-number - state find-number-directed-search - state find-number-location place "7" =retrieval> ISA extension digit1 =y name =name ==> =goal> place "8" state attend-number current-num =y) (p dial-extension-2 =goal> ISA dial-phone-num - state attend-number - state find-number - state find-number-directed-search - state find-number-location place "8" =retrieval> ISA extension digit2 =y name =name ==> =goal> place "9" state attend-number current-num =y) (p dial-extension-3 =goal> ISA dial-phone-num - state attend-number - state find-number - state find-number-directed-search - state find-number-location place "9" =retrieval> ISA extension digit3 =y name =name ==> =goal> place "10" state attend-number current-num =y) (p dial-extension-4 =goal> ISA dial-phone-num - state attend-number - state find-number - state find-number-directed-search - state find-number-location place "10" =retrieval> ISA extension digit4 =y name =name ==> =goal> place "11" state attend-number current-num =y) ;;; We take advantage of buffer-stuffing, so that when a "find-goal" ;;; is created, it already has visual-location to examine ;;; Within each goal, there is an expected pattern of production ;;; firings. ;;; find-goal: ;;; attend-number ;;; SUCCESS?: ;;; S-1) found-number-move-to-button ;;; S-2) left-click-number ;;; FAILURE?: ;;; (execute one of these cases and return to attend-number) ;;; F-1a) wrong-item (unknown target) ;;; fires: find-unattended-number ;;; OR ;;; F-1b) wrong-number ;;; fires the appropriate "smart" search ;;; smart search productions have the following form: ;;; smart-search-found-X-go-Y ;;; where ;;; X is the digit found (0-9) or * or # ;;; Y is one of the following: ;;; "up", "down", "left", "right", ;;; "up-left", "up-right", ;;; "down-left", "down-right" ;;; for adjacent digits, "-to-neighbor" is appended ;;; ;;; for example, if we attended "1" while looking for "5" ;;; smart-search-found-1-go-down-right ;;; ;;; smart-search-found-1-go-right-to-neighbor ;;; goes from the 1 to the 2 ;;; ;;; the "goal" is accomplished when left-click-number fires ;;; ;; To get object in visual-location into the visual buffer, we must ;; request the vision module to encode the object (+visual> section). (P attend-number =goal> ISA dial-phone-num state find-number-location =visual-location> ISA visual-location =visual-state> ISA module-state modality free ==> +visual> ISA visual-object screen-pos =visual-location !eval! (setf *fixations* (+ 1 *fixations*)) ;;running score =goal> state attend-number) ;;fix error (P no-location-to-attend =goal> ISA dial-phone-num state find-number-location =visual-location> ISA ERROR ==> =goal> state find-number !output! (*** wrong-item ERROR ***) ) ;; This fires during a visual search, when it is determined that the ;; object in the visual buffer is not the item that is being searched ;; for. This is reported using the !output! statement, then the model ;; resumes the visual search, starting at the next unvisited object ;; from the left (P wrong-item =goal> ISA dial-phone-num state attend-number current-num =y =visual> ISA text ;;we are searching for =y but have instead found =z - value =y ;;The value we were hoping to find but did NOT value =z ;;The value actually found ;;make sure that the item found is not a digit, *, or # !eval! (and (string/= =z "#") (string/= =z "*") (or (string< =z "0") (string<= "a" =z) (not(= (c-types:strlen =z) 1)) )) ==> =goal> state find-number !output! (*** wrong-item =z ***) ) ;;; What if after wrong-number you searched intelligently based on what ;;; you saw. ie after seeing "1" you looked to the right for "2", "3". ;;; This will catch a sighting of a number and try to direct the new search (P wrong-number =goal> ISA dial-phone-num state attend-number current-num =y =visual> ISA text ;;we are searching for =y but have instead found =z - value =y ;;The value we were hoping to find but did NOT value =z ;;make sure we've spotted a recognizable phone feature !eval! (or (and (string<= "0" =z) (string<= =z "9") (= (c-types:strlen =z) 1)) (or (string= =z "#") (string= =z "*") ) ) ==> =goal> state find-number-directed-search !output! (*** wrong-number =z ***) ) ;; This function performs a "sweep" of the phone surface area. It ;; looks for a feature in a visual-location that has not been ;; visited/encoded yet (attended nil). ;; It moves across the phone area left-to-right (screen-x lowest) and ;; searches only for text objects (kind text) (P find-unattended-number =goal> ISA dial-phone-num state find-number ==> +visual-location> ISA visual-location attended nil ; screen-x lowest kind text =goal> state find-number-location) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;; BEGIN of smart finds ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Searching for 1 and decided to go right (P smart-search-found-1-go-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "1" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "3") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *two-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 1 and decided to go right to 2 (P smart-search-found-1-go-right-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "1" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "2") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 1 and decided to go down (P smart-search-found-1-go-down =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "1" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "7") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *two-height*)) =goal> state find-number-location) ;;; Searching for 1 and decided to go down to 4 (P smart-search-found-1-go-down-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "1" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "4") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 1 and decided to go down-right (P smart-search-found-1-go-down-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "1" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "6") (string= =y "5") (string= =y "9") (string= =y "8") (string= =y "0") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *two-width*)) screen-y (within (+ =sy *forward-height*) (+ =sy *three-height*)) =goal> state find-number-location) ;;; Searching for 2 and decided to go right (P smart-search-found-2-go-right-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "2" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "3") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 2 and decided to go left (P smart-search-found-2-go-left-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "2" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "1") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 2 and decided to go down (P smart-search-found-2-go-down =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "2" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "8") (string= =y "0") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *three-height*)) =goal> state find-number-location) ;;; Searching for 2 and decided to go down (P smart-search-found-2-go-down-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "2" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "5") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 2 and decided to go down-right (P smart-search-found-2-go-down-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "2" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "6") (string= =y "9") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (+ =sy *forward-height*) (+ =sy *two-height*)) =goal> state find-number-location) ;;; Searching for 2 and decided to go down-left (P smart-search-found-2-go-down-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "2" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "4") (string= =y "7") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (+ =sy *forward-height*) (+ =sy *two-height*)) =goal> state find-number-location) ;;; Searching for 3 and decided to go left (P smart-search-found-3-go-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "3" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "1") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *two-width*) (- =sx *forward-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 3 and decided to go left (P smart-search-found-3-go-left-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "3" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "2") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 3 and decided to go down (P smart-search-found-3-go-down =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "3" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "9") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *two-height*)) =goal> state find-number-location) ;;; Searching for 3 and decided to go down (P smart-search-found-3-go-down-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "3" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "6") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 3 and decided to go down-left (P smart-search-found-3-go-down-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "3" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "4") (string= =y "5") (string= =y "7") (string= =y "8") (string= =y "0") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *two-width*) (- =sx *forward-width*)) screen-y (within (+ =sy *forward-height*) (+ =sy *three-height*)) =goal> state find-number-location) ;;; Searching for 4 and decided to go right (P smart-search-found-4-go-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "4" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "6") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *two-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 4 and decided to go right (P smart-search-found-4-go-right-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "4" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "5") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 4 and decided to go up (P smart-search-found-4-go-up-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "4" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "1") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 4 and decided to go down (P smart-search-found-4-go-down-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "4" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "7") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 4 and decided to go up-right (P smart-search-found-4-go-up-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "4" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "3") (string= =y "2") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *two-width*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 4 and decided to go down-right (P smart-search-found-4-go-down-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "4" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "9") (string= =y "8") (string= =y "0") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *two-width*)) screen-y (within (+ =sy *forward-height*) (+ =sy *two-height*)) =goal> state find-number-location) ;;; Searching for 5 and decided to go right (P smart-search-found-5-go-right-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "5" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "6") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 5 and decided to go left (P smart-search-found-5-go-left-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "5" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "4") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 5 and decided to go up (P smart-search-found-5-go-up-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "5" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "2") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 5 and decided to go down (P smart-search-found-5-go-down =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "5" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "0") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *two-height*)) =goal> state find-number-location) ;;; Searching for 5 and decided to go down (P smart-search-found-5-go-down-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "5" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "8") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 5 and decided to go up-right (P smart-search-found-5-go-up-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "5" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "3") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 5 and decided to go up-left (P smart-search-found-5-go-up-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "5" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "1") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 5 and decided to go down-right (P smart-search-found-5-go-down-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "5" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "9") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 5 and decided to go down-left (P smart-search-found-5-go-down-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "5" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "7") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 6 and decided to go left (P smart-search-found-6-go-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "6" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "4") (string= =y "5") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *two-width*) (- =sx *forward-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 6 and decided to go up (P smart-search-found-6-go-up-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "6" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "3") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 6 and decided to go down (P smart-search-found-6-go-down-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "6" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "9") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 6 and decided to go up-left (P smart-search-found-6-go-up-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "6" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "1") (string= =y "2") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *two-width*) (- =sx *forward-width*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 6 and decided to go down-left (P smart-search-found-6-go-down-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "6" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "7") (string= =y "8") (string= =y "0") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *two-width*) (- =sx *forward-width*)) screen-y (within (+ =sy *forward-height*) (+ =sy *two-height*)) =goal> state find-number-location) ;;; Searching for 7 and decided to go right (P smart-search-found-7-go-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "7" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "9") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *two-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 7 and decided to go right (P smart-search-found-7-go-right-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "7" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "8") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 7 and decided to go up (P smart-search-found-7-go-up =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "7" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "1") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *two-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 7 and decided to go up (P smart-search-found-7-go-up-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "7" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "4") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 7 and decided to go up-right (P smart-search-found-7-go-up-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "7" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "6") (string= =y "2") (string= =y "3") (string= =y "5")) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *two-width*)) screen-y (within (- =sy *two-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 7 and decided to go down-right (P smart-search-found-7-go-down-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "7" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "0") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 8 and decided to go right (P smart-search-found-8-go-right-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "8" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "9") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 8 and decided to go left (P smart-search-found-8-go-left-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "8" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "7") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 8 and decided to go up (P smart-search-found-8-go-up =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "8" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "2") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *two-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 8 and decided to go up (P smart-search-found-8-go-up-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "8" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "5")) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 8 and decided to go up-right (P smart-search-found-8-go-up-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "8" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "6") (string= =y "3") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (- =sy *two-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 8 and decided to go up-left (P smart-search-found-8-go-up-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "8" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "4") (string= =y "1") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (- =sy *two-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 8 and decided to go down (P smart-search-found-8-go-down-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "8" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "0") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 9 and decided to go left (P smart-search-found-9-go-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "9" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "7") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *two-width*) (- =sx *forward-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 9 and decided to go left (P smart-search-found-9-go-left-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "9" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "8") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (- =sy *y-column*) (+ =sy *y-column*)) =goal> state find-number-location) ;;; Searching for 9 and decided to go up (P smart-search-found-9-go-up =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "9" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "3") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *two-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 9 and decided to go up (P smart-search-found-9-go-up-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "9" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "6") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 9 and decided to go up-left (P smart-search-found-9-go-up-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "9" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "4") (string= =y "5") (string= =y "1") (string= =y "2") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *two-width*) (- =sx *forward-width*)) screen-y (within (- =sy *two-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 9 and decided to go down-left (P smart-search-found-9-go-down-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "9" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "0") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (+ =sy *forward-height*) (+ =sy *one-height*)) =goal> state find-number-location) ;;; Searching for 0 and decided to go up (P smart-search-found-0-go-up =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "0" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "5") (string= =y "2") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *three-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 0 and decided to go up (P smart-search-found-0-go-up-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "0" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "8") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 0 and decided to go up-right (P smart-search-found-0-go-up-right =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "0" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "9") (string= =y "6") (string= =y "3") ) ==> +visual-location> ISA visual-location kind text screen-x (within (+ =sx *forward-width*) (+ =sx *one-width*)) screen-y (within (- =sy *three-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for 0 and decided to go up-left (P smart-search-found-0-go-up-left =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "0" =visual-location> ISA visual-location screen-x =sx screen-y =sy !eval! (or (string= =y "7") (string= =y "4") (string= =y "1") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *one-width*) (- =sx *forward-width*)) screen-y (within (- =sy *three-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for * and decided to go up (P smart-search-found-star-go-up-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "*" =visual-location> ISA visual-location screen-x =sx screen-y =sy ; !eval! (or (string= =y "8") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;; Searching for # and decided to go up (P smart-search-found-pound-go-up-to-neighbor =goal> ISA dial-phone-num state find-number-directed-search current-num =y =visual> ISA text value "#" =visual-location> ISA visual-location screen-x =sx screen-y =sy ; !eval! (or (string= =y "8") ) ==> +visual-location> ISA visual-location kind text screen-x (within (- =sx *x-column*) (+ =sx *x-column*)) screen-y (within (- =sy *one-height*) (- =sy *forward-height*)) =goal> state find-number-location) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;; END of smart finds ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Found the number, now initiate the move and click sequence (P found-number-move-to-button =goal> ISA dial-phone-num state attend-number current-num =y click no =manual-state> ISA module-state modality free =visual> ISA text value =y screen-pos =visual-location ==> +manual> isa move-cursor loc =visual-location !output! (**** Moving to =y ****) =goal> click yes state start) (spp found-number-move-to-button :effort 0) ;;Once the mouse is moved to the number, we want to click on the ;;button, and make the request of the motor module. remove the ;;find-feature subgoal from the goal stack, thereby returning the model ;;to the phone-dialing goal (P left-click-number =goal> ISA dial-phone-num click yes =manual-state> ISA module-state modality free ==> +manual> ISA click-mouse !output! (**** clicked ****) =goal> click no) (spp left-click-number :P 1 :C 0 :efforts 10000 :successes 10000 :effort 0)