; This is the simulation for the Ravizza et al experiment ;This requires a running LISP and the ACT-R simulation code ; To run the model call (collect-data n t) where n is the number of iterations through the Ravizza problem set below. ; Note that to run just 1 iteration requires about a minute on my MAC. (defparameter *problems* '(( 2 + 4 * 5 30 Small First first ) ( 2 + 6 * 8 50 Small Second second ) ( 3 + 4 * 6 42 Small First second ) ( 3 + 5 * 2 13 Small Second third ) ( 4 + 2 * 6 36 Small First first ) ( 4 + 3 * 2 10 Small Second second ) ( 5 + 3 * 7 56 Small First second ) ( 5 + 4 * 5 25 Small Second third ) ( 6 + 2 * 4 32 Small First first ) ( 6 + 2 * 5 16 Small Second second ) ( 7 + 2 * 7 63 Small First second ) ( 7 + 2 * 8 23 Small Second third ) ( 5 + 2 * 4 28 Small First first ) ( 4 + 5 * 3 19 Small Second second ) ( 5 + 3 * 12 96 Large First second ) ( 14 + 7 * 3 35 Large Second third ) ( 9 + 8 * 5 85 Large First first ) ( 61 + 3 * 4 73 Large Second second ) ( 19 + 2 * 4 84 Large First second ) ( 17 + 12 * 3 53 Large Second third ) ( 10 + 4 * 7 98 Large First first ) ( 43 + 9 * 4 79 Large Second second ) ( 21 + 2 * 3 69 Large First second ) ( 19 + 13 * 4 71 Large Second third ) ( 12 + 7 * 3 57 Large First first ) ( 21 + 11 * 3 54 Large Second second ) ( 26 + 6 / 4 8 Small First second ) ( 7 + 63 / 9 14 Small Second third ) ( 87 + 3 / 9 10 Small First first ) ( 3 + 45 / 9 8 Small Second second ) ( 23 + 5 / 7 4 Small First second ) ( 3 + 48 / 8 9 Small Second third ) ( 58 + 5 / 7 9 Small First first ) ( 7 + 32 / 8 11 Small Second second ) ( 16 + 8 / 4 6 Small First second ) ( 9 + 28 / 7 13 Small Second third ) ( 37 + 5 / 6 7 Small First first ) ( 9 + 30 / 6 14 Small Second second ) ( 37 + 3 / 8 5 Small First second ) ( 9 + 15 / 5 12 Small Second third ) ( 24 + 32 / 8 7 Large First first ) ( 36 + 96 / 8 48 Large Second second ) ( 49 + 5 / 18 3 Large First second ) ( 57 + 81 / 9 66 Large Second third ) ( 28 + 8 / 12 3 Large First first ) ( 26 + 45 / 15 29 Large Second second ) ( 73 + 5 / 13 6 Large First second ) ( 36 + 91 / 13 43 Large Second third ) ( 51 + 5 / 14 4 Large First first ) ( 10 + 96 / 4 34 Large Second second ) ( 5 + 67 / 18 4 Large First second ) ( 43 + 85 / 5 60 Large Second third ) ( 63 + 17 / 16 5 Large First first ) ( 71 + 46 / 2 94 Large Second second ) ( 5 - 3 * 7 14 Small First second ) ( 19 - 5 * 3 4 Small Second third ) ( 6 - 3 * 9 27 Small First first ) ( 21 - 3 * 6 3 Small Second second ) ( 7 - 4 * 8 24 Small First second ) ( 18 - 4 * 3 6 Small Second third ) ( 8 - 2 * 6 36 Small First first ) ( 34 - 6 * 5 4 Small Second second ) ( 8 - 6 * 9 18 Small First second ) ( 26 - 5 * 4 6 Small Second third ) ( 9 - 3 * 7 42 Small First first ) ( 9 - 3 * 2 3 Small Second second ) ( 88 - 76 * 6 72 Large First second ) ( 99 - 8 * 12 3 Large Second third ) ( 60 - 16 * 2 88 Large First first ) ( 48 - 2 * 16 16 Large Second second ) ( 80 - 73 * 12 84 Large First second ) ( 51 - 4 * 12 3 Large Second third ) ( 77 - 64 * 7 91 Large First first ) ( 95 - 4 * 21 11 Large Second second ) ( 32 - 18 * 4 56 Large First second ) ( 63 - 3 * 19 6 Large Second third ) ( 51 - 32 * 5 95 Large First first ) ( 91 - 6 * 13 13 Large Second second ) ( 91 - 82 * 4 36 Large First second ) ( 83 - 7 * 10 13 Large Second third ) ( 75 - 3 / 8 9 Small First first ) ( 11 - 45 / 5 2 Small Second second ) ( 50 - 6 / 4 11 Small First second ) ( 16 - 36 / 9 12 Small Second third ) ( 47 - 5 / 6 7 Small First first ) ( 14 - 64 / 8 6 Small Second second ) ( 62 - 8 / 6 9 Small First second ) ( 9 - 24 / 8 6 Small Second third ) ( 27 - 6 / 3 7 Small First first ) ( 12 - 64 / 8 4 Small Second second ) ( 48 - 3 / 9 5 Small First second ) ( 20 - 25 / 5 15 Small Second third ) ( 20 - 6 / 7 2 Small First first ) ( 8 - 30 / 10 5 Small Second second ) ( 50 - 17 / 11 3 Large First second ) ( 83 - 56 / 28 81 Large Second third ) ( 66 - 12 / 9 6 Large First first ) ( 59 - 85 / 17 54 Large Second second ) ( 72 - 44 / 4 7 Large First second ) ( 54 - 80 / 5 38 Large Second third ) ( 74 - 38 / 9 4 Large First first ) ( 36 - 84 / 7 24 Large Second second ) ( 72 - 33 / 13 3 Large First second ) ( 33 - 69 / 23 30 Large Second third ) ( 75 - 19 / 8 7 Large First first ) ( 43 - 72 / 9 35 Large Second second ) ( 9 * 8 + 7 79 Small First second ) ( 8 * 3 + 7 80 Small Second third ) ( 9 * 6 + 7 61 Small First first ) ( 9 * 5 + 6 99 Small Second second ) ( 8 * 7 + 5 61 Small First second ) ( 8 * 6 + 3 72 Small Second third ) ( 8 * 5 + 9 49 Small First first ) ( 8 * 4 + 3 56 Small Second second ) ( 7 * 5 + 4 39 Small First second ) ( 7 * 4 + 5 63 Small Second third ) ( 7 * 3 + 6 27 Small First first ) ( 6 * 5 + 2 42 Small Second second ) ( 5 * 4 + 8 28 Small First second ) ( 5 * 3 + 4 35 Small Second third ) ( 4 * 9 + 26 62 Large First first ) ( 7 * 8 + 6 98 Large Second second ) ( 12 * 5 + 39 99 Large First second ) ( 13 * 3 + 2 65 Large Second third ) ( 5 * 6 + 14 44 Large First first ) ( 18 * 3 + 2 90 Large Second second ) ( 17 * 5 + 6 91 Large First second ) ( 6 * 8 + 6 84 Large Second third ) ( 7 * 5 + 24 59 Large First first ) ( 4 * 7 + 8 60 Large Second second ) ( 9 * 7 + 28 91 Large First second ) ( 3 * 5 + 18 69 Large Second third ) ( 24 * 3 + 5 77 Large First first ) ( 5 * 12 + 7 95 Large Second second ) ( 9 * 6 - 7 47 Small First second ) ( 9 * 5 - 3 18 Small Second third ) ( 9 * 4 - 8 28 Small First first ) ( 9 * 6 - 3 27 Small Second second ) ( 8 * 5 - 3 37 Small First second ) ( 8 * 6 - 3 24 Small Second third ) ( 8 * 3 - 5 19 Small First first ) ( 7 * 8 - 5 21 Small Second second ) ( 7 * 3 - 9 12 Small First second ) ( 6 * 9 - 4 30 Small Second third ) ( 6 * 4 - 5 19 Small First first ) ( 6 * 9 - 3 36 Small Second second ) ( 6 * 16 - 23 73 Large First second ) ( 3 * 21 - 8 39 Large Second third ) ( 9 * 7 - 42 21 Large First first ) ( 4 * 16 - 2 56 Large Second second ) ( 7 * 6 - 35 7 Large First second ) ( 12 * 13 - 5 96 Large Second third ) ( 6 * 9 - 38 16 Large First first ) ( 14 * 27 - 22 70 Large Second second ) ( 9 * 8 - 46 26 Large First second ) ( 6 * 19 - 4 90 Large Second third ) ( 10 * 5 - 28 22 Large First first ) ( 5 * 20 - 7 65 Large Second second ) ( 16 * 5 - 25 55 Large First second ) ( 4 * 95 - 81 56 Large Second third ) ( 72 / 9 + 4 12 Small First first ) ( 33 / 4 + 7 3 Small Second second ) ( 36 / 9 + 7 11 Small First second ) ( 80 / 3 + 7 8 Small Second third ) ( 56 / 8 + 7 14 Small First first ) ( 63 / 4 + 3 9 Small Second second ) ( 24 / 8 + 6 9 Small First second ) ( 56 / 2 + 6 7 Small Second third ) ( 35 / 7 + 4 9 Small First first ) ( 25 / 3 + 2 5 Small Second second ) ( 24 / 6 + 5 9 Small First second ) ( 44 / 6 + 5 4 Small Second third ) ( 20 / 5 + 7 11 Small First first ) ( 49 / 5 + 2 7 Small Second second ) ( 25 / 5 + 37 42 Large First second ) ( 96 / 16 + 8 4 Large Second third ) ( 90 / 5 + 11 29 Large First first ) ( 82 / 17 + 24 2 Large Second second ) ( 99 / 11 + 46 55 Large First second ) ( 84 / 2 + 5 12 Large Second third ) ( 72 / 9 + 58 66 Large First first ) ( 98 / 13 + 36 2 Large Second second ) ( 75 / 3 + 11 36 Large First second ) ( 72 / 5 + 7 6 Large Second third ) ( 68 / 4 + 29 46 Large First first ) ( 96 / 5 + 43 2 Large Second second ) ( 21 / 3 - 5 2 Small First second ) ( 12 / 5 - 2 4 Small Second third ) ( 99 / 9 - 6 5 Small First first ) ( 54 / 9 - 3 9 Small Second second ) ( 50 / 5 - 7 3 Small First second ) ( 35 / 8 - 3 7 Small Second third ) ( 45 / 5 - 7 2 Small First first ) ( 56 / 9 - 2 8 Small Second second ) ( 36 / 4 - 5 4 Small First second ) ( 14 / 8 - 6 7 Small Second third ) ( 27 / 3 - 6 3 Small First first ) ( 18 / 6 - 3 6 Small Second second ) ( 32 / 4 - 5 3 Small First second ) ( 28 / 10 - 3 4 Small Second third ) ( 84 / 7 - 3 9 Large First first ) ( 84 / 17 - 5 7 Large Second second ) ( 90 / 5 - 13 5 Large First second ) ( 56 / 17 - 3 4 Large Second third ) ( 72 / 6 - 5 7 Large First first ) ( 81 / 54 - 45 9 Large Second second ) ( 69 / 3 - 9 14 Large First second ) ( 48 / 67 - 63 12 Large Second third ) ( 92 / 4 - 11 12 Large First first ) ( 96 / 12 - 4 12 Large Second second ) ( 70 / 5 - 6 8 Large First second ) ( 72 / 77 - 69 9 Large Second third ) ( 87 / 3 - 17 12 Large First first ) ( 91 / 21 - 14 13 Large Second second ) ( 91 / 21 - 14 13 Large Second second ))) (defvar *results*) (defparameter *screen-x* 0) (defvar *last-screen-x*) (defvar *timer*) (defvar *string*) (defvar *small-bold*) (defvar *large-bold*) (defvar *count*) (defparameter *randomize* nil) (defun seed-count () (setf *count* "0")) (defun inc-count () (setf *count* (second (member *count* '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") :test 'equal)))) (defun match-count (x) (equal x *count*)) (defun sq (x) (* x x)) (defun weaken (lis n) (sdp-fct (list lis :reference-count n))) (defun solve (arg1 op arg2) (let* ((ans (eval (list op (encode arg1) (encode arg2)))) (val (princ-to-string ans))) (car (no-output (sdm-fct (list 'isa 'number 'image val)))))) (defun encode (chunk) (read-from-string (chunk-slot-value-fct chunk 'image))) (defun analyze-sets (sets ref) (let ((times (mapcar 'car sets))) (do ((temp (mapcar 'cdr sets) (mapcar 'cdr temp)) (result nil (cons (cons (caaar temp) (analyze-set (mapcar 'cons times (mapcar 'cdar temp)) ref)) result))) ((null (car temp)) (reverse result))))) (defun analyze-set (set ref) (do ((temp set (cdr temp)) (result (make-list 21 :initial-element 0) (update-bold-fincham (cdr (car temp)) result (list (max 1 (floor (/ (caar temp) 2))) (- 21 (max 1 (floor (/ (caar temp) 2))) )) (list ref (- 21 ref))))) ((null temp) (cons 0 (mapcar #'(lambda (x) (/ x (length set))) result))))) (defun update-bold-fincham (data set data-lengths set-lengths) (do ((temp-dl data-lengths (cdr temp-dl)) (temp-sl set-lengths (cdr temp-sl)) (temp-data (mapcar #'(lambda (x) (- x (car data))) (cdr data)) (nthcdr (car temp-dl) temp-data)) (temp-set set (nthcdr (car temp-sl) temp-set)) (result nil (append result (split-fincham (first-n (car temp-dl) temp-data) (first-n (car temp-sl) temp-set))))) ((null temp-dl) result))) (defun first-n (n lis) (reverse (nthcdr (- (length lis) n) (reverse lis)))) (defun split-fincham (data set) (let ((front (first-half data)) (back (reverse (second-half data)) )) (do ((data1 front (cdr data1)) (data2 back (cdr data2) ) (set1 (first-half set) (cdr set1)) (set2 (reverse (second-half set)) (cdr set2)) (result1 nil (cons (+ (or (car data1) (car (last front))) (car set1)) result1)) (result2 nil (if set2 (cons (+ (or (car data2) (car (last back)) (car data)) (car set2)) result2) result2))) ((null set1) (append (reverse result1) result2))))) (defun second-half (lis) (nthcdr (ceiling (/ (length lis) 2)) lis)) (defun first-half (lis) (reverse (nthcdr (floor(/ (length lis) 2)) (reverse lis)))) (defun represent (n1 op1 n2 op2 n3 n4 size paren x) (let ((sn1 (princ-to-string n1)) (sn2 (princ-to-string n2)) (sn3 (princ-to-string n3)) (sn4 (princ-to-string n4)) (sop1 (princ-to-string op1)) (sop2 (princ-to-string op2))) (case x (first (setf sn1 "x")) (second (setf sn2 "x")) (third (setf sn3 "x"))) (case paren (first (list "(" sn1 sop1 sn2 ")" sop2 sn3 "=" sn4)) (second (list sn1 sop1 "(" sn2 sop2 sn3 ")" "=" sn4))))) (defun distribution (lis) (let ((results (make-array '(22)))) (do ((temp lis (cdr temp))) ((null temp) (do ((i 0 (1+ i))) ((= i 22) (terpri)) (princ (aref results i)) (princ " "))) (if (car temp) (incf (aref results (floor (/ (caar temp) 2)))))))) (defun collect-data (n flag) (let (small large (bm (get-module bold))) (setf (bold-module-v bm) nil) (setf *randomize* flag) (setf *small-bold* nil) (setf *large-bold* nil) (do ((i 0 (1+ i))) ((= i n) (setf (bold-module-v bm) t) (princ "Small Data has mean time of response ") (princ (1- (/ (apply '+ (mapcar 'car *small-bold*)) (length *small-bold*)))) (terpri) (princ "Distribution: ") (distribution small) (output-bold-response-data (analyze-sets *small-bold* 7) bm 0 44) (terpri) (princ "Large Data has mean time of response ") (princ (1- (/ (apply '+ (mapcar 'car *large-bold*)) (length *large-bold*)))) (terpri) (princ "Distribution: ") (distribution large) (output-bold-response-data (analyze-sets *large-bold* 7) bm 0 44) nil) (do ((temp *problems* (cdr temp))) ((null temp) nil) (case (seventh (car temp)) (small (push (present-trial (car temp)) small) (cond ( (and (numberp (caar small)) (< (caar small) 40)) (push (cons (caar small) (predict-bold-response)) *small-bold*)))) (large (push (present-trial (car temp)) large) (cond ((and (numberp (caar large)) (< (caar large) 40)) (push (cons (caar large)(predict-bold-response)) *large-bold*))))))))) (defvar *wait*) (defvar *wait-count*) (defvar *event*) (defun wait () (setf *wait* t) (setf *wait-count* 0) (if *event* (delete-event *event*)) (setf *event* (schedule-event-relative (* 9 (no-output (car (sgp :lf)))) 'wait-done))) (defun wait-done () (setf *wait* nil)) (defun present-trial (case) (let ((goal (new-name-fct 'goal)) time (problem (apply 'represent case)) (ans (case (car (last case)) (first (first case)) (second (third case)) (third (fifth case)))) (window (open-exp-window "Arithmetic Experiment" :visible nil))) (setf *results* nil *string* "00" *problem* problem *wait* nil *wait-count* 0 *event* nil) (reset) (install-device window) (proc-display :clear t) (eval `(add-dm (,goal isa goal step get-ready))) (eval `(goal-focus ,goal)) (schedule-event 1 'blink) (run-full-time 44) (if *results* (setf time (/ (caar (last *results*)) 1000.0))) (cond ((and (eq (no-output (chunk-slot-value-fct (car (buffer-chunk goal)) 'step)) 'done) time (< time 40)) (list time (equal ans (no-output (read-from-string (chunk-slot-value-fct (chunk-slot-value-fct (car (buffer-chunk imaginal)) 'arg1) 'image))))))) )) (defvar *problem*) (defun blink () (do ((temp *problem* (cdr temp)) (pos 50 (+ pos 25))) ((null temp) nil) (add-text-to-exp-window :text (car temp) :x pos :y 150 :width 25)) (proc-display :clear t) ) (defun find-answers () (let (small large) (do ((temp *problems* (cdr temp))) ((null temp) (list (reverse small) (reverse large))) (case (seventh (car temp)) (small (push (case (car (last (car temp))) (first (first (car temp))) (second (third (car temp))) (third (fifth (car temp)))) small)) (large (push (case (car (last (car temp))) (first (first (car temp))) (second (third (car temp))) (third (fifth (car temp)))) large)))))) (defmethod rpm-window-key-event-handler ((win rpm-window) key) (setf key (case key (#\Space (if (equal *string* "00") '("0" "0") nil)) (#\j (list (princ-to-string (1+ (read-from-string (car *string*)))) (second *string*))) (#\k (list (car *string*)(princ-to-string (1+ (read-from-string (second *string*)))))))) (setf *string* key) (cond (key (clear-exp-window) (add-text-to-exp-window :text (string (first key)) :x 150 :y 200 :width 15) (add-text-to-exp-window :text (string (second key)) :x 165 :y 200 :width 15) )) (proc-display :clear t) (push (list (get-time) key) *results*) ) (clear-all) (define-model susan (eval `(sgp :esc t :egs 0.1 :ol t :rt -2.85 :bll .5 :ul nil :epl nil :lf .5 :v nil :optimize-visual t :egs .01 :model-warnings nil :do-not-harvest imaginal :MODEL-WARNINGS nil :bold-inc 2.0 :bold-scale .7 :bold-exp 6 :trace-detail low :alpha .2 :visual-finst-span 60 :VISUAL-NUM-FINSTS 100 :imaginal-delay .5)) (sgp :save-buffer-trace t :traced-buffers (visual production goal retrieval imaginal manual)) (chunk-type number tens ones half remainder image) (chunk-type image arg1 op arg2) (chunk-type goal step direction) (chunk-type instructions method) (chunk-type addition-fact arg1 arg2 sum) (chunk-type multiplication-fact arg1 arg2 product) (setf *timer* (random 1.0)) (if *randomize* (eval `(sgp :lf ,(* 0.75 (+ *timer* (random 0.5)) ) :IMAGINAL-DELAY ,(* 1.0 (+ *timer* (random 0.5))) ))) (add-dm (instructions isa instructions) (zero isa number tens zero ones zero half zero remainder zero image "0") (one isa number tens zero ones one half zero remainder one image "1") (two isa number tens zero ones two half one remainder zero image "2") (three isa number tens zero ones three half one remainder one image "3") (four isa number tens zero ones four half two remainder zero image "4") (five isa number tens zero ones five half two remainder one image "5") (six isa number tens zero ones six half three remainder zero image "6") (seven isa number tens zero ones seven half three remainder one image "7") (eight isa number tens zero ones eight half four remainder zero image "8") (nine isa number tens zero ones nine half four remainder one image "9") (ten isa number tens one ones zero half five remainder zero image "10") (eleven isa number tens one ones one half five remainder one image "11") (twelve isa number tens one ones two half six remainder zero image "12") (thirteen isa number tens one ones three half six remainder one image "13") (fourteen isa number tens one ones four half seven remainder zero image "14") (fifteen isa number tens one ones five half seven remainder one image "15") (sixteen isa number tens one ones six half eight remainder zero image "16") (seventeen isa number tens one ones seven half eight remainder one image "17") (eightteen isa number tens one ones eight half nine remainder zero image "18") (nineteen isa number tens one ones nine half nine remainder one image "19") (n20 isa number tens two ones zero image "20") (n21 isa number tens two ones one image "21") (n22 isa number tens two ones two image "22") (n23 isa number tens two ones three image "23") (n24 isa number tens two ones four image "24") (n25 isa number tens two ones five image "25") (n26 isa number tens two ones six image "26") (n27 isa number tens two ones seven image "27") (n28 isa number tens two ones eight image "28") (n29 isa number tens two ones nine image "29") (n30 isa number tens three ones zero image "30") (n31 isa number tens three ones one image "31") (n32 isa number tens three ones two image "32") (n33 isa number tens three ones three image "33") (n34 isa number tens three ones four image "34") (n35 isa number tens three ones five image "35") (n36 isa number tens three ones six image "36") (n37 isa number tens three ones seven image "37") (n38 isa number tens three ones eight image "38") (n39 isa number tens three ones nine image "39") (n40 isa number tens four ones zero image "40") (n41 isa number tens four ones one image "41") (n42 isa number tens four ones two image "42") (n43 isa number tens four ones three image "43") (n44 isa number tens four ones four image "44") (n45 isa number tens four ones five image "45") (n46 isa number tens four ones six image "46") (n47 isa number tens four ones seven image "47") (n48 isa number tens four ones eight image "48") (n49 isa number tens four ones nine image "49") (n50 isa number tens five ones zero image "50") (n51 isa number tens five ones one image "51") (n52 isa number tens five ones two image "52") (n53 isa number tens five ones three image "53") (n54 isa number tens five ones four image "54") (n55 isa number tens five ones five image "55") (n56 isa number tens five ones six image "56") (n57 isa number tens five ones seven image "57") (n58 isa number tens five ones eight image "58") (n59 isa number tens five ones nine image "59") (n60 isa number tens six ones zero image "60") (n61 isa number tens six ones one image "61") (n62 isa number tens six ones two image "62") (n63 isa number tens six ones three image "63") (n64 isa number tens six ones four image "64") (n65 isa number tens six ones five image "65") (n66 isa number tens six ones six image "66") (n67 isa number tens six ones seven image "67") (n68 isa number tens six ones eight image "68") (n69 isa number tens six ones nine image "69") (n70 isa number tens seven ones zero image "70") (n71 isa number tens seven ones one image "71") (n72 isa number tens seven ones two image "72") (n73 isa number tens seven ones three image "73") (n74 isa number tens seven ones four image "74") (n75 isa number tens seven ones five image "75") (n76 isa number tens seven ones six image "76") (n77 isa number tens seven ones seven image "77") (n78 isa number tens seven ones eight image "78") (n79 isa number tens seven ones nine image "79") (n80 isa number tens eight ones zero image "80") (n81 isa number tens eight ones one image "81") (n82 isa number tens eight ones two image "82") (n83 isa number tens eight ones three image "83") (n84 isa number tens eight ones four image "84") (n85 isa number tens eight ones five image "85") (n86 isa number tens eight ones six image "86") (n87 isa number tens eight ones seven image "87") (n88 isa number tens eight ones eight image "88") (n89 isa number tens eight ones nine image "89") (n90 isa number tens nine ones zero image "90") (n91 isa number tens nine ones one image "91") (n92 isa number tens nine ones two image "92") (n93 isa number tens nine ones three image "93") (n94 isa number tens nine ones four image "94") (n95 isa number tens nine ones five image "95") (n96 isa number tens nine ones six image "96") (n97 isa number tens nine ones seven image "97") (n98 isa number tens nine ones eight image "98") (n99 isa number tens nine ones nine image "99") (fact00 isa addition-fact arg1 zero arg2 zero sum zero) (fact01 isa addition-fact arg1 zero arg2 one sum one) (fact02 isa addition-fact arg1 zero arg2 two sum two) (fact03 isa addition-fact arg1 zero arg2 three sum three) (fact04 isa addition-fact arg1 zero arg2 four sum four) (fact05 isa addition-fact arg1 zero arg2 five sum five) (fact06 isa addition-fact arg1 zero arg2 six sum six) (fact07 isa addition-fact arg1 zero arg2 seven sum seven) (fact08 isa addition-fact arg1 zero arg2 eight sum eight) (fact09 isa addition-fact arg1 zero arg2 nine sum nine) (fact10 isa addition-fact arg1 one arg2 zero sum one) (fact11 isa addition-fact arg1 one arg2 one sum two) (fact12 isa addition-fact arg1 one arg2 two sum three) (fact13 isa addition-fact arg1 one arg2 three sum four) (fact14 isa addition-fact arg1 one arg2 four sum five) (fact15 isa addition-fact arg1 one arg2 five sum six) (fact16 isa addition-fact arg1 one arg2 six sum seven) (fact17 isa addition-fact arg1 one arg2 seven sum eight) (fact18 isa addition-fact arg1 one arg2 eight sum nine) (fact19 isa addition-fact arg1 one arg2 nine sum ten) (fact20 isa addition-fact arg1 two arg2 zero sum two) (fact21 isa addition-fact arg1 two arg2 one sum three) (fact22 isa addition-fact arg1 two arg2 two sum four) (fact23 isa addition-fact arg1 two arg2 three sum five) (fact24 isa addition-fact arg1 two arg2 four sum six) (fact25 isa addition-fact arg1 two arg2 five sum seven) (fact26 isa addition-fact arg1 two arg2 six sum eight) (fact27 isa addition-fact arg1 two arg2 seven sum nine) (fact28 isa addition-fact arg1 two arg2 eight sum ten) (fact29 isa addition-fact arg1 two arg2 nine sum eleven) (fact30 isa addition-fact arg1 three arg2 zero sum three) (fact31 isa addition-fact arg1 three arg2 one sum four) (fact32 isa addition-fact arg1 three arg2 two sum five) (fact33 isa addition-fact arg1 three arg2 three sum six) (fact34 isa addition-fact arg1 three arg2 four sum seven) (fact35 isa addition-fact arg1 three arg2 five sum eight) (fact36 isa addition-fact arg1 three arg2 six sum nine) (fact37 isa addition-fact arg1 three arg2 seven sum ten) (fact38 isa addition-fact arg1 three arg2 eight sum eleven) (fact39 isa addition-fact arg1 three arg2 nine sum twelve) (fact40 isa addition-fact arg1 four arg2 zero sum four) (fact41 isa addition-fact arg1 four arg2 one sum five) (fact42 isa addition-fact arg1 four arg2 two sum six) (fact43 isa addition-fact arg1 four arg2 three sum seven) (fact44 isa addition-fact arg1 four arg2 four sum eight) (fact45 isa addition-fact arg1 four arg2 five sum nine) (fact46 isa addition-fact arg1 four arg2 six sum ten) (fact47 isa addition-fact arg1 four arg2 seven sum eleven) (fact48 isa addition-fact arg1 four arg2 eight sum twelve) (fact49 isa addition-fact arg1 four arg2 nine sum thirteen) (fact50 isa addition-fact arg1 five arg2 zero sum five) (fact51 isa addition-fact arg1 five arg2 one sum six) (fact52 isa addition-fact arg1 five arg2 two sum seven) (fact53 isa addition-fact arg1 five arg2 three sum eight) (fact54 isa addition-fact arg1 five arg2 four sum nine) (fact55 isa addition-fact arg1 five arg2 five sum ten) (fact56 isa addition-fact arg1 five arg2 six sum eleven) (fact57 isa addition-fact arg1 five arg2 seven sum twelve) (fact58 isa addition-fact arg1 five arg2 eight sum thirteen) (fact59 isa addition-fact arg1 five arg2 nine sum fourteen) (fact60 isa addition-fact arg1 six arg2 zero sum six) (fact61 isa addition-fact arg1 six arg2 one sum seven) (fact62 isa addition-fact arg1 six arg2 two sum eight) (fact63 isa addition-fact arg1 six arg2 three sum nine) (fact64 isa addition-fact arg1 six arg2 four sum ten) (fact65 isa addition-fact arg1 six arg2 five sum eleven) (fact66 isa addition-fact arg1 six arg2 six sum twelve) (fact67 isa addition-fact arg1 six arg2 seven sum thirteen) (fact68 isa addition-fact arg1 six arg2 eight sum fourteen) (fact69 isa addition-fact arg1 six arg2 nine sum fifteen) (fact70 isa addition-fact arg1 seven arg2 zero sum seven) (fact71 isa addition-fact arg1 seven arg2 one sum eight) (fact72 isa addition-fact arg1 seven arg2 two sum nine) (fact73 isa addition-fact arg1 seven arg2 three sum ten) (fact74 isa addition-fact arg1 seven arg2 four sum eleven) (fact75 isa addition-fact arg1 seven arg2 five sum twelve) (fact76 isa addition-fact arg1 seven arg2 six sum thirteen) (fact77 isa addition-fact arg1 seven arg2 seven sum fourteen) (fact78 isa addition-fact arg1 seven arg2 eight sum fifteen) (fact79 isa addition-fact arg1 seven arg2 nine sum sixteen) (fact80 isa addition-fact arg1 eight arg2 zero sum eight) (fact81 isa addition-fact arg1 eight arg2 one sum nine) (fact82 isa addition-fact arg1 eight arg2 two sum ten) (fact83 isa addition-fact arg1 eight arg2 three sum eleven) (fact84 isa addition-fact arg1 eight arg2 four sum twelve) (fact85 isa addition-fact arg1 eight arg2 five sum thirteen) (fact86 isa addition-fact arg1 eight arg2 six sum fourteen) (fact87 isa addition-fact arg1 eight arg2 seven sum fifteen) (fact88 isa addition-fact arg1 eight arg2 eight sum sixteen) (fact89 isa addition-fact arg1 eight arg2 nine sum seventeen) (fact90 isa addition-fact arg1 nine arg2 zero sum nine) (fact91 isa addition-fact arg1 nine arg2 one sum ten) (fact92 isa addition-fact arg1 nine arg2 two sum eleven) (fact93 isa addition-fact arg1 nine arg2 three sum twelve) (fact94 isa addition-fact arg1 nine arg2 four sum thirteen) (fact95 isa addition-fact arg1 nine arg2 five sum fourteen) (fact96 isa addition-fact arg1 nine arg2 six sum fifteen) (fact97 isa addition-fact arg1 nine arg2 seven sum sixteen) (fact98 isa addition-fact arg1 nine arg2 eight sum seventeen) (fact99 isa addition-fact arg1 nine arg2 nine sum eightteen) (mfact00 isa multiplication-fact arg1 zero arg2 zero product zero) (mfact01 isa multiplication-fact arg1 zero arg2 one product zero) (mfact02 isa multiplication-fact arg1 zero arg2 two product zero) (mfact03 isa multiplication-fact arg1 zero arg2 three product zero) (mfact04 isa multiplication-fact arg1 zero arg2 four product zero) (mfact05 isa multiplication-fact arg1 zero arg2 five product zero) (mfact06 isa multiplication-fact arg1 zero arg2 six product zero) (mfact07 isa multiplication-fact arg1 zero arg2 seven product zero) (mfact08 isa multiplication-fact arg1 zero arg2 eight product zero) (mfact09 isa multiplication-fact arg1 zero arg2 nine product zero) (mfact10 isa multiplication-fact arg1 one arg2 zero product zero) (mfact11 isa multiplication-fact arg1 one arg2 one product one) (mfact12 isa multiplication-fact arg1 one arg2 two product two) (mfact13 isa multiplication-fact arg1 one arg2 three product three) (mfact14 isa multiplication-fact arg1 one arg2 four product four) (mfact15 isa multiplication-fact arg1 one arg2 five product five) (mfact16 isa multiplication-fact arg1 one arg2 six product six) (mfact17 isa multiplication-fact arg1 one arg2 seven product seven) (mfact18 isa multiplication-fact arg1 one arg2 eight product eight) (mfact19 isa multiplication-fact arg1 one arg2 nine product mine) (mfact20 isa multiplication-fact arg1 two arg2 zero product zero) (mfact21 isa multiplication-fact arg1 two arg2 one product two) (mfact22 isa multiplication-fact arg1 two arg2 two product four) (mfact23 isa multiplication-fact arg1 two arg2 three product six) (mfact24 isa multiplication-fact arg1 two arg2 four product eight) (mfact25 isa multiplication-fact arg1 two arg2 five product ten) (mfact26 isa multiplication-fact arg1 two arg2 six product twelve) (mfact27 isa multiplication-fact arg1 two arg2 seven product fourteen) (mfact28 isa multiplication-fact arg1 two arg2 eight product sixteen) (mfact29 isa multiplication-fact arg1 two arg2 nine product eightteen) (mfact30 isa multiplication-fact arg1 three arg2 zero product zero) (mfact31 isa multiplication-fact arg1 three arg2 one product three) (mfact32 isa multiplication-fact arg1 three arg2 two product six) (mfact33 isa multiplication-fact arg1 three arg2 three product nine) (mfact34 isa multiplication-fact arg1 three arg2 four product twelve) (mfact35 isa multiplication-fact arg1 three arg2 five product fifteen) (mfact36 isa multiplication-fact arg1 three arg2 six product eightteen) (mfact37 isa multiplication-fact arg1 three arg2 seven product n21) (mfact38 isa multiplication-fact arg1 three arg2 eight product n24) (mfact39 isa multiplication-fact arg1 three arg2 nine product n27) (mfact40 isa multiplication-fact arg1 four arg2 zero product zero) (mfact41 isa multiplication-fact arg1 four arg2 one product four) (mfact42 isa multiplication-fact arg1 four arg2 two product eight) (mfact43 isa multiplication-fact arg1 four arg2 three product twelve) (mfact44 isa multiplication-fact arg1 four arg2 four product sixteen) (mfact45 isa multiplication-fact arg1 four arg2 five product n20) (mfact46 isa multiplication-fact arg1 four arg2 six product n24) (mfact47 isa multiplication-fact arg1 four arg2 seven product n28) (mfact48 isa multiplication-fact arg1 four arg2 eight product n32) (mfact49 isa multiplication-fact arg1 four arg2 nine product n36) (mfact50 isa multiplication-fact arg1 five arg2 zero product zero) (mfact51 isa multiplication-fact arg1 five arg2 one product five) (mfact52 isa multiplication-fact arg1 five arg2 two product ten) (mfact53 isa multiplication-fact arg1 five arg2 three product fifteen) (mfact54 isa multiplication-fact arg1 five arg2 four product n20) (mfact55 isa multiplication-fact arg1 five arg2 five product n25) (mfact56 isa multiplication-fact arg1 five arg2 six product n30) (mfact57 isa multiplication-fact arg1 five arg2 seven product n35) (mfact58 isa multiplication-fact arg1 five arg2 eight product n40) (mfact59 isa multiplication-fact arg1 five arg2 nine product n45) (mfact60 isa multiplication-fact arg1 six arg2 zero product zero) (mfact61 isa multiplication-fact arg1 six arg2 one product six) (mfact62 isa multiplication-fact arg1 six arg2 two product twelve) (mfact63 isa multiplication-fact arg1 six arg2 three product eightteen) (mfact64 isa multiplication-fact arg1 six arg2 four product n24) (mfact65 isa multiplication-fact arg1 six arg2 five product n30) (mfact66 isa multiplication-fact arg1 six arg2 six product n36) (mfact67 isa multiplication-fact arg1 six arg2 seven product n42) (mfact68 isa multiplication-fact arg1 six arg2 eight product n48) (mfact69 isa multiplication-fact arg1 six arg2 nine product n54) (mfact70 isa multiplication-fact arg1 seven arg2 zero product zero) (mfact71 isa multiplication-fact arg1 seven arg2 one product seven) (mfact72 isa multiplication-fact arg1 seven arg2 two product fourteen) (mfact73 isa multiplication-fact arg1 seven arg2 three product n21) (mfact74 isa multiplication-fact arg1 seven arg2 four product n28) (mfact75 isa multiplication-fact arg1 seven arg2 five product n35) (mfact76 isa multiplication-fact arg1 seven arg2 six product n42) (mfact77 isa multiplication-fact arg1 seven arg2 seven product n49) (mfact78 isa multiplication-fact arg1 seven arg2 eight product n56) (mfact79 isa multiplication-fact arg1 seven arg2 nine product n63) (mfact80 isa multiplication-fact arg1 eight arg2 zero product zero) (mfact81 isa multiplication-fact arg1 eight arg2 one product eight) (mfact82 isa multiplication-fact arg1 eight arg2 two product sixteen) (mfact83 isa multiplication-fact arg1 eight arg2 three product n24) (mfact84 isa multiplication-fact arg1 eight arg2 four product n32) (mfact85 isa multiplication-fact arg1 eight arg2 five product n40) (mfact86 isa multiplication-fact arg1 eight arg2 six product n48) (mfact87 isa multiplication-fact arg1 eight arg2 seven product n56) (mfact88 isa multiplication-fact arg1 eight arg2 eight product n64) (mfact89 isa multiplication-fact arg1 eight arg2 nine product n72) (mfact90 isa multiplication-fact arg1 nine arg2 zero product zero) (mfact91 isa multiplication-fact arg1 nine arg2 one product nine) (mfact92 isa multiplication-fact arg1 nine arg2 two product eightteen) (mfact93 isa multiplication-fact arg1 nine arg2 three product n27) (mfact94 isa multiplication-fact arg1 nine arg2 four product n36) (mfact95 isa multiplication-fact arg1 nine arg2 five product n45) (mfact96 isa multiplication-fact arg1 nine arg2 six product n54) (mfact97 isa multiplication-fact arg1 nine arg2 seven product n63) (mfact98 isa multiplication-fact arg1 nine arg2 eight product n72) (mfact99 isa multiplication-fact arg1 nine arg2 nine product n81)) (sdp :references 2000 :creation-time -1000000) (sdp instructions :references 200) (no-output (weaken (append (sdm isa addition-fact) (sdm isa multiplication-fact)) 100)) (p retrieve-instructions =goal> isa goal step get-ready ?retrieval> state free buffer empty ?imaginal> state free ==> +imaginal> isa image +retrieval> isa instructions) (p start-right =goal> isa goal step get-ready =visual-location> isa visual-location ==> +goal> step solving +visual-location> ISA visual-location > screen-x 250) (p encode =goal> isa goal step solving =visual-location> isa visual-location screen-x =x ==> !eval! (setf *last-screen-x* *screen-x*) !eval! (setf *screen-x* =x) +visual> ISA move-attention screen-pos =visual-location ) (p convert-visual =goal> isa goal step solving =visual> isa text value =val ?retrieval> state free !eval! (not (member =val '(")" "(" "+" "-" "/" "*" "x" "0" "1" "2" "3" "4" "5" "6"" 7" "8" "9") :test 'equal)) ==> +visual> ISA clear +retrieval> isa number image =val) (p convert-visual1 =goal> isa goal step solving =visual> isa text value =val ?retrieval> state free !eval! (member =val '("0" "1" "2" "3" "4" "5" "6"" 7" "8" "9") :test 'equal) ==> +retrieval> isa number image =val) (p start-undo-multiplication =goal> isa goal step solving =visual> isa text value "*" =imaginal> isa image arg1 =v1 arg2 =v2 ?imaginal> state free ==> +visual> isa clear !eval! (wait) +imaginal> op "/" +retrieval> isa multiplication-fact product =v1 arg1 =v2) (p finish-undo-multiplication1 =goal> isa goal step solving =imaginal> isa image arg1 =v1 op "/" arg2 =v2 =retrieval> isa multiplication-fact arg2 =ans ?imaginal> state free ==> +imaginal> arg1 =ans op nil arg2 nil) (p finish-undo-multiplication2 =goal> isa goal step solving =imaginal> isa image arg1 =v1 op "/" arg2 =v2 ?retrieval> state error ?imaginal> state free ==> +visual> ISA clear !bind! =ans (solve =v1 '/ =v2) +imaginal> arg1 =ans op nil arg2 nil) (p start-undo-division1 =goal> isa goal step solving =visual> isa text value "/" =imaginal> isa image arg1 =v1 arg2 =v2 ?imaginal> state free !eval! (> *last-screen-x* *screen-x*) ==> +visual> isa clear !eval! (wait) +imaginal> op "*" +retrieval> isa multiplication-fact arg1 =v1 arg2 =v2) (p start-undo-division2 =goal> isa goal step solving =visual> isa text value "/" =imaginal> isa image arg1 =v1 arg2 =v2 ?imaginal> state free !eval! (< *last-screen-x* *screen-x*) ==> +visual> isa clear !eval! (wait) +imaginal> arg1 =v2 op "/" arg2 =v1 +retrieval> isa multiplication-fact product =v2 arg1 =v1) (p finish-undo-division1 =goal> isa goal step solving =imaginal> isa image arg1 =v1 op "*" arg2 =v2 =retrieval> isa multiplication-fact product =ans ?imaginal> state free ==> +imaginal> arg1 =ans op nil arg2 nil) (p finish-undo-division2 =goal> isa goal step solving =imaginal> isa image arg1 =v1 op "*" arg2 =v2 ?retrieval> state error ?imaginal> state free ==> +visual> ISA clear !bind! =ans (solve =v1 '* =v2) +imaginal> arg1 =ans op nil arg2 nil) (p start-undo-addition =goal> isa goal step solving =visual> isa text value "+" =imaginal> isa image arg1 =v1 arg2 =v2 ?imaginal> state free ==> +visual> isa clear !eval! (wait) +imaginal> op "-" +retrieval> isa addition-fact sum =v1 arg1 =v2) (p finish-undo-addition1 =goal> isa goal step solving =imaginal> isa image arg1 =v1 op "-" arg2 =v2 =retrieval> isa addition-fact arg2 =ans ?imaginal> state free ==> +imaginal> arg1 =ans op nil arg2 nil) (p finish-undo-addition2 =goal> isa goal step solving =imaginal> isa image arg1 =v1 op "-" arg2 =v2 ?retrieval> state error ?imaginal> state free ==> +visual> ISA clear !bind! =ans (solve =v1 '- =v2) +imaginal> arg1 =ans op nil arg2 nil) (p start-undo-subtraction1 =goal> isa goal step solving =visual> isa text value "-" =imaginal> isa image arg1 =v1 arg2 =v2 ?imaginal> state free !eval! (> *last-screen-x* *screen-x*) ==> +visual> isa clear !eval! (wait) +imaginal> op "+" +retrieval> isa addition-fact arg1 =v1 arg2 =v2) (p start-undo-subtraction2 =goal> isa goal step solving =visual> isa text value "-" =imaginal> isa image arg1 =v1 arg2 =v2 ?imaginal> state free !eval! (< *last-screen-x* *screen-x*) ==> +visual> isa clear !eval! (wait) +imaginal> arg1 =v2 op "-" arg2 =v1 +retrieval> isa addition-fact sum =v2 arg1 =v1) (p spin =goal> isa goal step solving =imaginal> isa image arg1 =v1 op =op arg2 =v2 ?retrieval> state busy ?imaginal> state free !eval! (not *wait*) ==> !eval! (incf *wait-count*) +imaginal> arg1 =v1 op =op arg2 =v2) (p spin1 =goal> isa goal step solving =imaginal> isa image arg1 =v1 op =op arg2 =v2 ?retrieval> state busy ?imaginal> state free !eval! (not *wait*) ==> +visual> isa clear +imaginal> arg1 =v1 op =op arg2 =v2) (p finish-undo-subtaction1 =goal> isa goal step solving =imaginal> isa image arg1 =v1 op "+" arg2 =v2 =retrieval> isa addition-fact sum =ans ?imaginal> state free ==> +imaginal> arg1 =ans op nil arg2 nil) (p finish-undo-subtraction2 =goal> isa goal step solving =imaginal> isa image arg1 =v1 op "+" arg2 =v2 ?retrieval> state error ?imaginal> state free ==> +visual> ISA clear !bind! =ans (solve =v1 '+ =v2) +imaginal> arg1 =ans op nil arg2 nil) (p store-right =goal> isa goal step solving =retrieval> isa number =imaginal> isa image arg1 nil ==> +imaginal> isa image arg1 =retrieval +visual-location> ISA visual-location > screen-x 200 < screen-x 225) (p store-left =goal> isa goal step solving direction nil =retrieval> isa number =imaginal> isa image arg1 =val ?imaginal> state free !eval! (and (< *screen-x* 225) (> *screen-x* 200)) ==> !eval! (setf *screen-x* 199) +goal> direction right +imaginal> arg2 =retrieval +visual-location> ISA visual-location > screen-x 175 < screen-x 200) (p store-left1 =goal> isa goal step solving direction right =retrieval> isa number =imaginal> isa image arg1 =val ?imaginal> state free !eval! (and (< *screen-x* 150) (> *screen-x* 125)) ==> !eval! (setf *screen-x* 124) +imaginal> arg2 =retrieval +visual-location> ISA visual-location > screen-x 100 < screen-x 125) (p store-right1 =goal> isa goal step solving direction left =retrieval> isa number =imaginal> isa image arg1 =val ?imaginal> state free !eval! (and (< *screen-x* 75) (> *screen-x* 50)) ==> !eval! (setf *screen-x* 76) +imaginal> arg2 =retrieval +visual-location> ISA visual-location > screen-x 75 < screen-x 100) (p move-left1 =goal> isa goal step solving direction right =imaginal> isa image arg1 =val arg2 nil ?imaginal> state free !eval! (and (< *screen-x* 200) (> *screen-x* 175)) ==> !eval! (setf *screen-x* 149) +visual-location> ISA visual-location > screen-x 125 < screen-x 150) (p move-left2 =goal> isa goal step solving direction nil =visual> isa text value ")" !eval! (and (< *screen-x* 225) (> *screen-x* 200)) ==> !eval! (setf *screen-x* 74) +goal> direction left +visual-location> ISA visual-location > screen-x 50 < screen-x 75) (p move-left3 =goal> isa goal step solving direction left =retrieval> isa number =imaginal> isa image arg1 =val arg2 nil ?imaginal> state free !eval! (and (< *screen-x* 200) (> *screen-x* 175)) ==> !eval! (setf *screen-x* 174) +imaginal> arg2 =retrieval +visual-location> ISA visual-location > screen-x 150 < screen-x 175) (p move-left4 =goal> isa goal step solving direction right =retrieval> isa number =imaginal> isa image arg1 =val arg2 nil ?imaginal> state free !eval! (and (< *screen-x* 100) (> *screen-x* 75)) ==> !eval! (setf *screen-x* 101) +imaginal> arg2 =retrieval +visual-location> ISA visual-location > screen-x 100 < screen-x 125) (p move-right1 =goal> isa goal step solving direction left =imaginal> isa image arg1 =val arg2 nil ?imaginal> state free !eval! (and (< *screen-x* 100) (> *screen-x* 125)) ==> !eval! (setf *screen-x* 176) +visual-location> ISA visual-location > screen-x 175 < screen-x 200) (p move-right2 =goal> isa goal step solving direction left =imaginal> isa image arg1 =val arg2 nil ?imaginal> state free !eval! (and (< *screen-x* 100) (> *screen-x* 75)) ==> !eval! (setf *screen-x* 110) +visual-location> ISA visual-location > screen-x 125 < screen-x 150) (p move-right3 =goal> isa goal step solving direction left =visual> isa text value "x" !eval! (and (< *screen-x* 150) (> *screen-x* 125)) ==> !eval! (setf *screen-x* 176) +visual-location> ISA visual-location > screen-x 175 < screen-x 200) (p move-right4 =goal> isa goal step solving direction right =visual> isa text value "x" !eval! (and (< *screen-x* 150) (> *screen-x* 125)) ==> !eval! (setf *screen-x* 76) +visual-location> ISA visual-location > screen-x 75 < screen-x 100) (p move-right5 =goal> isa goal step solving direction left =retrieval> isa number =imaginal> isa image arg1 =val arg2 nil ?imaginal> state free !eval! (and (< *screen-x* 150) (> *screen-x* 125)) ==> !eval! (setf *screen-x* 151) +imaginal> arg2 =retrieval +visual-location> ISA visual-location > screen-x 150 < screen-x 175) (p done1 =goal> isa goal step solving direction right =imaginal> isa image arg1 =val op nil arg2 nil ?imaginal> state free !eval! (and (< *screen-x* 125) (> *screen-x* 100)) ==> +manual> ISA punch hand right finger thumb +retrieval> =val +goal> step tens direction nil) (p done2 =goal> isa goal step solving direction left =imaginal> isa image arg1 =val op nil arg2 nil ?imaginal> state free !eval! (and (< *screen-x* 175) (> *screen-x* 150)) ==> +manual> ISA punch hand right finger thumb +retrieval> =val +goal> step tens direction nil) (p get-tens =goal> isa goal step tens direction nil =retrieval> isa number ones =ones tens =tens =imaginal> isa image arg2 nil ?imaginal> state free ?manual> state free ==> +visual-location> isa visual-location screen-x 155 +retrieval> =tens +imaginal> op =tens arg2 =ones +visual> isa clear) (p seed-tens =goal> isa goal step tens direction nil =imaginal> isa image arg2 =ones =retrieval> isa number image =image ?imaginal> state free ==> !eval! (seed-count) +goal> direction =image) (p key-tens =goal> isa goal step tens direction =image ?manual> preparation free !eval! (not (match-count =image)) ==> !eval! (inc-count) +manual> ISA punch hand right finger index) (p switch-ones =goal> isa goal step tens direction =image =imaginal> isa image arg2 =ones ?manual> state free =visual-location> isa visual-location !eval! (match-count =image) ==> +VISUAL> ISA MOVE-ATTENTION SCREEN-POS =VISUAL-LOCATION +visual-location> isa visual-location screen-x 170 +retrieval> =ones +goal> step ones direction nil) (p seed-ones =goal> isa goal step ones =retrieval> isa number image =image ?visual> state free ==> +visual> isa clear !eval! (seed-count) +goal> direction =image) (p key-ones =goal> isa goal step ones direction =image ?manual> state free !eval! (not (match-count =image)) ==> !eval! (inc-count) +manual> ISA punch hand right finger middle) (p done =goal> isa goal step ones direction =image ?manual> state free =visual-location> isa visual-location !eval! (match-count =image) ==> +VISUAL> ISA clear +manual> ISA punch hand right finger thumb +goal> step done) )