;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Model file ;;; ;;; File: phone_model_targets.lisp ;;; Author: Andrew R. Freed ;;; Creation date: 2/July/02 ;;; Last modified: 31/March/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 Productions to the target-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-target state place name) (chunk-type find-feature state current-num) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ii. declarative memory - memory chunks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; add-dm puts these chunks into declarative memory (add-dm (phone-goal isa dial-phone-target state init) ) ;;; ;;; iii. Productions to target dialer ;;; ;;; These productions work in ACT-R 5.0 and RPM v2.17b and Segman v3.1 ;; The phone target is keyed in memory on "name" ;; "place" denotes which place digit is to be dialed next (p move-hand-to-phone =goal> ISA dial-phone-target state init ==> =goal> state start place "1" ) (p dial-target-button =goal> ISA dial-phone-target state start place "1" name =y ==> =find-goal> ISA find-feature state find-number current-num =y =goal> place "2" !push! =find-goal ) ;;The final production to dial the phone, resets the phone goal (p phone-done =goal> ISA dial-phone-target state start place "2" ==> =goal> state finished_dialing place "1" ) ;; To get object in visual-location into the visual buffer, we must ;; request the vision module to encode the object (+visual> section). (P attend-item =goal> ISA find-feature 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) ;; 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 find-feature 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 ==> =goal> state find-number !output! (*** wrong-item =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 searches only for text objects (kind text) (P find-unattended-number =goal> ISA find-feature state find-number ==> +visual-location> ISA visual-location attended nil kind text =goal> state find-number-location) ;; Found the target, now initiate the move and click sequence (P found-target-move-to-button =goal> ISA find-feature state attend-number current-num =y =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> state click-number) ;;Once the mouse is moved to the number, we want to click on the ;;button, and make the request of the motor module. !pop! removes the ;;find-feature subgoal from the goal stack, thereby returning the model ;;to the phone-dialing goal (P left-click-number =goal> ISA find-feature state click-number =manual-state> ISA module-state modality free ==> +manual> ISA click-mouse !output! (**** clicked ****) !pop! )