-
Notifications
You must be signed in to change notification settings - Fork 0
/
csm_free_recall_model_depressed.lisp
969 lines (908 loc) · 20.5 KB
/
csm_free_recall_model_depressed.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
;; Copyright 2019 Chi Sam Mac
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;; http://www.apache.org/licenses/LICENSE-2.0
;; Unless required by applicable law or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.
;;; ACT-R Model of the task [depressed]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [BASIC INFORMATION] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Creator: Chi Sam Mac (s2588382)
; Course: First-year Research Project [KIM.FYRP11.2018-2019.2]
; Supervised by: M.K. van Vugt
; ACT-R version: 7.13
; More information: https://bitbucket.org/csmac/fyrp
; Contact: [email protected]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(clear-all)
(define-model freerecall
(sgp
:rt -1 ; retrieval threshold
:v nil ; enable/disable trace
:trace-detail low ; set level of trace detail
:act nil ;t/medium/low/nil ;;tracing activation values
:show-focus t ; show location of visual focus
:er t ; Makes it so ties in productions are determined randomly (nil = fixed order)
:bll .5 ; Set base-level learning, more frequently/recently retrieved items gain higher activation
:esc t ; use subsymbolic processing
:auto-attend t ; visual location requests are automatically accompanied by a request to move attention to the location found
:declarative-num-finsts 21 ; number of items that are kept as recently retrieved
:declarative-finst-span 21 ; how long items stay in the recently-retrieved state
:ans 0.1 ; activation noise
:mas 8 ; maximum associative strength, uses S value in Sji calculation
:egs 0.1 ; noise in utility computation
:ol nil ; use base-level equation that requires complete history of a chunk (instead of formula that uses an approximation)
:model-warnings nil
)
(chunk-type study-words state first valence1 second valence2 third valence3 fourth valence4 position)
(chunk-type memory word valence)
(chunk-type goal state)
(chunk-type recall state position)
(chunk-type subgoal1 state target targetval)
(add-dm
(start isa chunk)
(attend isa chunk)
(beginclear isa chunk)
(beginrecall isa chunk)
(respond isa chunk)
(done isa chunk)
(retrieve isa chunk)
(harvest isa chunk)
(rehearse isa chunk)
(memorize isa chunk)
(first isa chunk)
(second isa chunk)
(third isa chunk)
(fourth isa chunk)
(valence1 isa chunk)
(valence2 isa chunk)
(valence3 isa chunk)
(valence4 isa chunk)
(subgoal1 isa chunk)
(goal isa study-words state start)
(startrecall isa recall state beginrecall)
)
(P find-unattended-word
=goal>
isa study-words
state start
==>
+visual-location>
:attended nil
=goal>
state find-location
)
(P attend-word
=goal>
isa study-words
state find-location
=visual-location>
?visual>
state free
==>
#| +visual>
cmd move-attention
screen-pos =visual-location |#
=goal>
state attend
)
(P high-first
=goal>
isa study-words
state attend
first nil
=visual>
value =word
color =col
?imaginal>
state free
==>
=goal>
state memorize
first =word
position first
valence1 =col
+imaginal>
isa memory
word =word
valence =col
)
(P high-second
=goal>
isa study-words
state attend
second nil
=visual>
value =word
color =col
?imaginal>
state free
==>
=goal>
state memorize
second =word
position first
valence2 =col
+imaginal>
isa memory
word =word
valence =col
)
(P high-third
=goal>
isa study-words
state attend
third nil
=visual>
value =word
color =col
?imaginal>
state free
==>
=goal>
state memorize
third =word
position first
valence3 =col
+imaginal>
isa memory
word =word
valence =col
)
(P high-fourth
=goal>
isa study-words
state attend
fourth nil
=visual>
value =word
color =col
?imaginal>
state free
==>
=goal>
state memorize
fourth =word
position first
valence4 =col
+imaginal>
isa memory
word =word
valence =col
)
(P attend-first
=goal>
isa study-words
state attend
- first nil
- second nil
- third nil
- fourth nil
=visual>
value =word
color =col
?imaginal>
state free
==>
=goal>
state memorize
first =word
position first
valence1 =col
+imaginal>
isa memory
word =word
valence =col
)
(P attend-second
=goal>
isa study-words
state attend
- first nil
- second nil
- third nil
- fourth nil
=visual>
value =word
color =col
?imaginal>
state free
==>
=goal>
state memorize
second =word
position first
valence2 =col
+imaginal>
isa memory
word =word
valence =col
)
(P attend-third
=goal>
isa study-words
state attend
- first nil
- second nil
- third nil
- fourth nil
=visual>
value =word
color =col
?imaginal>
state free
==>
=goal>
state memorize
third =word
position first
valence3 =col
+imaginal>
isa memory
word =word
valence =col
)
(P attend-fourth
=goal>
isa study-words
state attend
- first nil
- second nil
- third nil
- fourth nil
=visual>
value =word
color =col
?imaginal>
state free
==>
=goal>
state memorize
fourth =word
position first
valence4 =col
+imaginal>
isa memory
word =word
valence =col
)
(P add-to-memory-1
=goal>
isa study-words
state memorize
first =word
position first
=imaginal>
isa memory
word =word
==>
=goal>
isa study-words
state rehearse
first =word
position first
)
(P add-to-memory-2
=goal>
isa study-words
state memorize
second =word
position first
=imaginal>
isa memory
word =word
==>
=goal>
isa study-words
state rehearse
second =word
position first
)
(P add-to-memory-3
=goal>
isa study-words
state memorize
third =word
position first
=imaginal>
isa memory
word =word
==>
=goal>
isa study-words
state rehearse
third =word
position first
)
(P add-to-memory-4
=goal>
isa study-words
state memorize
fourth =word
position first
=imaginal>
isa memory
word =word
==>
=goal>
isa study-words
state rehearse
fourth =word
position first
)
(P rehearse-first
=goal>
isa study-words
state rehearse
first =word
valence1 =val
position first
==>
=goal>
state subgoal1
target =word
position second
+retrieval>
isa memory
word =word
valence =val
)
(P rehearse-second
=goal>
isa study-words
state rehearse
second =word
valence2 =val
position second
==>
=goal>
state subgoal1
target =word
position third
+retrieval>
isa memory
word =word
valence =val
)
(P rehearse-third
=goal>
isa study-words
state rehearse
third =word
valence3 =val
position third
==>
=goal>
state subgoal1
target =word
position fourth
+retrieval>
isa memory
word =word
valence =val
)
(P rehearse-fourth
=goal>
isa study-words
state rehearse
fourth =word
valence4 =val
position fourth
==>
=goal>
state subgoal1
target =word
position first
+retrieval>
isa memory
word =word
valence =val
)
(p rehearse-it
=goal>
state subgoal1
target =word
position =pos
=retrieval>
word =word
valence =val
?imaginal>
state free
==>
=goal>
isa study-words
state rehearse
position =pos
+imaginal>
isa memory
word =word
valence =val
!eval! ("rehearsed-word" =word)
)
(p skip-rehearse
=goal>
state subgoal1
target =word
position =pos
=retrieval>
isa memory
word =word
?imaginal>
state free
==>
=goal>
isa study-words
state rehearse
position =pos
)
(p else_new
=goal>
isa study-words
state rehearse
=visual-location>
?visual>
state free
==>
#| +visual>
cmd move-attention
screen-pos =visual-location |#
=goal>
state attend
)
(p skip-first
=goal>
isa study-words
state rehearse
first nil
position first
==>
=goal>
isa study-words
state rehearse
position second
)
(p skip-second
=goal>
isa study-words
state rehearse
second nil
position second
==>
=goal>
isa study-words
state rehearse
position third
)
(p skip-third
=goal>
isa study-words
state rehearse
third nil
position third
==>
=goal>
isa study-words
state rehearse
position fourth
)
(p skip-fourth
=goal>
isa study-words
state rehearse
fourth nil
position fourth
==>
=goal>
isa study-words
state rehearse
position first
)
(p choose-normal-recall
=goal>
isa recall
state beginrecall
==>
=goal>
isa recall
state choose
)
(p choose-negative-recall
=goal>
isa recall
state beginrecall
==>
=goal>
isa recall
state beginrecall-negative
)
(p start-recall-end
=goal>
isa recall
state beginrecall-negative
==>
=goal>
isa recall
state harvest-neg
+retrieval>
isa study-words
- first nil
- second nil
- third nil
- fourth nil
)
(p harvest-one-neg
=goal>
isa recall
state harvest-neg
=retrieval>
isa study-words
first =word
valence1 RED
==>
+retrieval>
isa study-words
first =word
valence1 RED
+imaginal>
valence RED
=goal>
isa recall
state retrieve1
)
(p harvest-two-neg
=goal>
isa recall
state harvest-neg
=retrieval>
isa study-words
first =word
valence2 RED
==>
+retrieval>
isa study-words
first =word
valence2 RED
+imaginal>
valence RED
=goal>
isa recall
state retrieve2
)
(p harvest-three-neg
=goal>
isa recall
state harvest-neg
=retrieval>
isa study-words
first =word
valence3 RED
==>
+retrieval>
isa study-words
first =word
valence3 RED
+imaginal>
valence RED
=goal>
isa recall
state retrieve3
)
(p harvest-four-neg
=goal>
isa recall
state harvest-neg
=retrieval>
isa study-words
first =word
valence4 RED
==>
+retrieval>
isa study-words
first =word
valence4 RED
+imaginal>
valence RED
=goal>
isa recall
state retrieve4
)
(p retrieve-one-neg
=goal>
isa recall
state retrieve1
=retrieval>
isa study-words
first =word
valence1 RED
==>
=goal>
isa recall
state beginrecall-normal
!eval! ("retrieved-word" =word)
)
(p retrieve-two-neg
=goal>
isa recall
state retrieve2
=retrieval>
isa study-words
second =word
valence2 RED
==>
=goal>
isa recall
state beginrecall-normal
!eval! ("retrieved-word" =word)
)
(p retrieve-three-neg
=goal>
isa recall
state retrieve3
=retrieval>
isa study-words
third =word
valence3 RED
==>
=goal>
isa recall
state beginrecall-normal
!eval! ("retrieved-word" =word)
)
(p retrieve-four-neg
=goal>
isa recall
state retrieve4
=retrieval>
isa study-words
fourth =word
valence4 RED
==>
=goal>
isa recall
state beginrecall-normal
!eval! ("retrieved-word" =word)
)
(p choose-first
=goal>
isa recall
state choose
==>
=goal>
isa recall
state retrieve
position first
)
(p choose-second
=goal>
isa recall
state choose
==>
=goal>
isa recall
state retrieve
position second
)
(p choose-third
=goal>
isa recall
state choose
==>
=goal>
isa recall
state retrieve
position third
)
(p choose-fourth
=goal>
isa recall
state choose
==>
=goal>
isa recall
state retrieve
position fourth
)
(p retrieve-first
=goal>
isa recall
state retrieve
position first
?retrieval>
buffer empty
state free
==>
=goal>
isa recall
state harvest
position first
+retrieval>
isa study-words
- first nil
- valence1 nil
)
(p retrieve-second
=goal>
isa recall
state retrieve
position second
?retrieval>
buffer empty
state free
==>
=goal>
isa recall
state harvest
position second
+retrieval>
isa study-words
- second nil
- valence2 nil
)
(p retrieve-third
=goal>
isa recall
state retrieve
position third
?retrieval>
buffer empty
state free
==>
=goal>
isa recall
state harvest
position third
+retrieval>
isa study-words
- third nil
- valence3 nil
)
(p retrieve-fourth
=goal>
isa recall
state retrieve
position fourth
?retrieval>
buffer empty
state free
==>
=goal>
isa recall
state harvest
position fourth
+retrieval>
isa study-words
- fourth nil
- valence4 nil
)
(p harvest-first
=goal>
isa recall
state harvest
position first
=retrieval>
isa study-words
first =word
valence1 =valence
==>
=goal>
isa recall
state retrieve
position second
!eval! ("retrieved-word" =word)
)
(p harvest-second
=goal>
isa recall
state harvest
position second
=retrieval>
isa study-words
second =word
valence2 =valence
==>
=goal>
isa recall
state retrieve
position third
!eval! ("retrieved-word" =word)
)
(p harvest-third
=goal>
isa recall
state harvest
position third
=retrieval>
isa study-words
third =word
valence3 =valence
==>
=goal>
isa recall
state retrieve
position fourth
!eval! ("retrieved-word" =word)
)
(p harvest-fourth
=goal>
isa recall
state harvest
position fourth
=retrieval>
isa study-words
fourth =word
valence4 =valence
==>
=goal>
isa recall
state beginrecall-normal
!eval! ("retrieved-word" =word)
)
(p start-recall-normal
=goal>
isa recall
state beginrecall-normal
==>
=goal>
isa recall
state harvest-normal
+retrieval>
isa memory
- word nil
- valence nil
:recently-retrieved nil ; only get items that were not recently retrieved
)
(p harvest
=goal>
isa recall
state harvest-normal
=retrieval>
isa memory
word =word
valence =val
==>
+retrieval>
isa memory
word =word
valence =val
+imaginal>
valence =val
=goal>
isa recall
state retrieve
)
(p retrieve
=goal>
isa recall
state retrieve
=retrieval>
isa memory
word =word
valence =val
==>
=goal>
isa recall
state beginrecall-normal
!eval! ("retrieved-word" =word)
)
(goal-focus goal)
; :u ;; utility of prodiction
; :at ;; action time of production
(spp skip-rehearse :u .5)
(spp high-first :at 2)
(spp high-second :at 2)
(spp high-third :at 0.5)
(spp high-fourth :at 0.5)
(spp rehearse-it :u 5 :at .3)
(spp else_new :u 10) ; ensure new words are always attended
(spp retrieve :u 2)
(spp start-recall :u 1)
(spp choose-normal-recall :u 0.25)
(spp choose-negative-recall :u 0.26)
(spp choose-first :u .21)
(spp choose-second :u .22)
(spp choose-third :u .23)
(spp choose-fourth :u .24)
)