; This is the simulation for the second experiment in Anderson, Anderson, Ferris, Fincha, & Jung ;This requires a running LISP and the ACT-R simulation code ;The predictions can be generated by calling (get-bold). ;Multiplying these values by the magnitudes given in the paper yield the predicted values. (defvar *item1*) (defvar *item2*) (defvar *item3*) (defvar *result*) (defun present-trial (base) (let ((goal (new-name-fct 'goal)) (window (open-exp-window "Insight Experiment" :visible nil))) (setf *result* 10) (reset) (run-full-time 4) (eval `(sdp item :base-level ,base)) (install-device window) (proc-display) (schedule-event-relative 0 'start) (schedule-event-relative 10 'prompt) (schedule-event-relative 20 'respond) (schedule-event-relative 22 'answer) (schedule-event-relative 24 'feedback) (run-full-time 40) *result*)) (defun get-bold () (let (result) (princ "Success:")(terpri) (present-trial -.5) (setf (bold-module-v (get-module bold)) t) (no-output (setf result (predict-bold-response 10 34))) (output-bold-response-data result (get-module bold) -4 20) (princ "Failure:")(terpri) (present-trial -2.5) (setf (bold-module-v (get-module bold)) t) (no-output (setf result (predict-bold-response 10 34))) (output-bold-response-data result (get-module bold) -4 20) nil)) (defun start () (setf *item1* (add-text-to-exp-window :text "bAbAbA" :x 100 :y 50 :width 100)) (proc-display) ) (defun prompt () (setf *item2* (add-text-to-exp-window :text "Hockey" :x 100 :y 150 :width 100)) (proc-display) ) (defun respond () (setf *item3* (add-text-to-exp-window :text "Respond" :x 100 :y 250 :width 100)) (proc-display) ) (defun answer () (remove-items-from-exp-window *item3*) (setf *item3* (add-text-to-exp-window :text "abcde" :x 100 :y 250 :width 100)) (proc-display) ) (defun feedback () (remove-items-from-exp-window *item3*) (setf *item3* (add-text-to-exp-window :text "CANADA" :x 100 :y 250 :width 100)) (proc-display) ) (clear-all) (define-model insight (eval `(sgp :esc t :rt -1.5 :lf 1.5 :v nil :MODEL-WARNINGS nil :ans nil :MOTOR-FEATURE-PREP-TIME .1 :model-warnings nil :do-not-harvest imaginal :bold-inc 2.0 :bold-scale .8 :bold-exp 6 :trace-detail low :imaginal-delay .6)) (chunk-type goal step) (chunk-type image fragment word assoc finger) (chunk-type word string meaning) (add-dm (item isa image fragment "bababa" word "Canada" assoc hockey) (goal isa goal step get-ready) (word1 isa word string "hockey" meaning hockey) (word2 isa word string "canada" meaning canada)) (goal-focus goal) (sgp :save-buffer-trace t :traced-buffers (visual production goal retrieval imaginal manual)) (sdp item :base-level -1) (sdp word1 :base-level 3) (sdp word2 :base-level 3) (p get-ready =goal> isa goal step get-ready ==> +goal> step ready +MANUAL> ISA prepare style punch HAND right FINGER index) (p attend-fragment =goal> isa goal step ready =visual-location> isa visual-location ==> +goal> isa goal step ready +visual> ISA move-attention screen-pos =visual-location ) (p encode-fragment =goal> isa goal step ready =visual> isa text value =val ==> +visual> isa clear +imaginal> isa image fragment =val ) (p attend-meaning =goal> isa goal step ready =visual-location> isa visual-location ?imaginal> state free =imaginal> isa image ==> +goal> step meaning +visual> ISA move-attention screen-pos =visual-location ) (p encode-meaning =goal> isa goal step meaning =visual> isa text value =val ?imaginal> state free =imaginal> isa image ==> =imaginal> assoc =val +visual> isa clear +retrieval> isa word string =val ) (p retrieve-meaning =goal> isa goal step meaning ?imaginal> state free =imaginal> isa image fragment =frag =retrieval> isa word meaning =val ==> +imaginal> assoc =val +retrieval> isa image fragment =frag assoc =val +MANUAL> ISA prepare style punch HAND right FINGER middle ) (p hold-meaning =goal> isa goal step meaning ?imaginal> state free =imaginal> isa image =retrieval> isa image word =word ==> +goal> step respond-ready +MANUAL> ISA prepare style punch HAND right FINGER index !eval! (setf *result* (- (/ (get-time) 1000) 9.175)) +imaginal> word =word ) (p retrieval-error =goal> isa goal step meaning ?imaginal> state free =imaginal> isa image - word bad ?retrieval> state error ==> +imaginal> word bad ) (p attend-respond =goal> isa goal step respond-ready =visual-location> isa visual-location ?imaginal> state free =imaginal> isa image word =word ==> +goal> step respond +MANUAL> ISA execute ) (p attend-respond-error =goal> isa goal step meaning =visual-location> isa visual-location ?imaginal> state free =imaginal> isa image word bad ==> +retrieval> isa image - word nil +goal> step respond +MANUAL> ISA execute ) (p attend-answer =goal> isa goal step respond =visual-location> isa visual-location ==> +goal> step answer +visual> ISA move-attention screen-pos =visual-location ) (p give-answer =goal> isa goal step answer =visual> isa text value "abcde" ?imaginal> state free =imaginal> isa image word "Canada" finger nil ==> +visual> isa clear +imaginal> finger middle +MANUAL> ISA punch HAND right FINGER ring) (p give-answer-wrong =goal> isa goal step answer =visual> isa text value "abcde" ?imaginal> state free =imaginal> isa image word bad finger nil ==> +visual> isa clear +imaginal> finger right +MANUAL> ISA execute) (p attend-feedback =goal> isa goal step answer =visual-location> isa visual-location ==> +goal> step feedback +visual> ISA move-attention screen-pos =visual-location ) (p encode-feedback =goal> isa goal step feedback =visual> isa text value =val =imaginal> isa image ==> +goal> step get-ready +imaginal> word =val !output! =val +visual> isa clear ) )