; This is the simulation for the Rosenberg-Lee et al experiment ; This requires a running LISP and the ACT-R simulation code ; To run the model call (test-model-bold n t) where n is the number of iterations through the Rosenberg-Lee problem set below. ; Note that to run just 1 iteration requires about 5 minutes on my MAC. ; Note that this presents an aggregate BOLD response for motor and does not separate out left and right. ; Since there is not a left and right motor module in ACT-R getting this data requires going outside of ACT-R's module structure. (defparameter *position* 75) (defvar *results*) (defvar *timer*) (defvar *top*) (defvar *bottom*) (defparameter *enable-random* nil) (defun sq (x) (* x x)) (defun weaken (lis n) (sdp-fct (list lis :reference-count n))) (defparameter *school-3* '((2 698 1396) (4 549 2196) (3 982 2946) (8 357 2856) (2 574 1148) (8 392 3136) (7 926 6482) (6 687 4122) (5 239 1195) (7 475 3325) (8 867 6936) (4 783 3132) (3 492 1476) (9 948 8532) (6 524 3144) (5 375 1875) (5 587 2935) (2 856 1712) (9 795 7155) (7 462 3234) (9 247 2223) (4 578 2312) (3 429 1287) (6 632 3792) (8 867 6936) (5 239 1195) (7 475 3325) (4 783 3132) (6 524 3144) (5 375 1875) (3 492 1476) (9 948 8532) (2 856 1712) (5 587 2935) (7 462 3234) (9 795 7155) (3 429 1287) (6 632 3792) (4 578 2312) (9 247 2223) (3 982 2946) (8 357 2856) (4 549 2196) (2 698 1396) (6 687 4122) (2 574 1148) (8 392 3136) (7 926 6482) (4 783 3132) (8 867 6936) (7 475 3325) (5 239 1195) (5 375 1875) (9 948 8532) (3 492 1476) (6 524 3144) (7 462 3234) (9 795 7155) (2 856 1712) (5 587 2935) (6 632 3792) (4 578 2312) (3 429 1287) (9 247 2223) (4 549 2196) (2 698 1396) (8 357 2856) (3 982 2946) (2 574 1148) (6 687 4122) (8 392 3136) (7 926 6482) (7 475 3325) (5 239 1195) (4 783 3132) (8 867 6936) (5 375 1875) (9 948 8532) (6 524 3144) (3 492 1476) (9 795 7155) (2 856 1712) (5 587 2935) (7 462 3234) (4 578 2312) (6 632 3792) (3 429 1287) (9 247 2223) (8 357 2856) (3 982 2946) (4 549 2196) (2 698 1396) (6 687 4122) (7 926 6482) (8 392 3136) (2 574 1148) (4 783 3132) (7 475 3325) (5 239 1195) (8 867 6936) (6 524 3144) (9 948 8532) (5 375 1875) (3 492 1476) (9 795 7155) (2 856 1712) (5 587 2935) (7 462 3234) (3 429 1287) (6 632 3792) (4 578 2312) (9 247 2223) (3 982 2946) (8 357 2856) (4 549 2196) (2 698 1396) (7 926 6482) (6 687 4122) (8 392 3136) (2 574 1148) (4 783 3132) (7 475 3325) (8 867 6936) (5 239 1195) (5 375 1875) (9 948 8532) (3 492 1476) (6 524 3144) (2 856 1712) (7 462 3234) (9 795 7155) (5 587 2935) (4 578 2312) (9 247 2223) (3 429 1287) (6 632 3792) (8 357 2856) (4 549 2196) (2 698 1396) (3 982 2946) (6 687 4122) (2 574 1148) (8 392 3136) (7 926 6482) (4 783 3132) (7 475 3325) (8 867 6936) (5 239 1195) (3 492 1476) (9 948 8532) (5 375 1875) (6 524 3144) (9 795 7155) (2 856 1712) (5 587 2935) (7 462 3234) (6 632 3792) (4 578 2312) (9 247 2223) (3 429 1287) (3 982 2946) (8 357 2856) (2 698 1396) (4 549 2196) (8 392 3136) (6 687 4122) (2 574 1148) (7 926 6482) (8 867 6936) (4 783 3132) (5 239 1195) (7 475 3325) (3 492 1476) (5 375 1875) (6 524 3144) (9 948 8532) (9 795 7155) (5 587 2935) (7 462 3234) (2 856 1712) (6 632 3792) (3 429 1287) (9 247 2223) (4 578 2312) (4 783 3132) (8 867 6936) (7 475 3325) (5 239 1195) (9 948 8532) (3 492 1476) (5 375 1875) (6 524 3144) (5 587 2935) (9 795 7155) (7 462 3234) (2 856 1712) (3 429 1287) (9 247 2223) (6 632 3792) (4 578 2312) (2 574 1148) (6 687 4122) (8 392 3136) (7 926 6482) (5 239 1195) (4 783 3132) (7 475 3325) (8 867 6936) (3 492 1476) (9 948 8532) (6 524 3144) (5 375 1875) (9 795 7155) (7 462 3234) (5 587 2935) (2 856 1712) (3 429 1287) (4 578 2312) (9 247 2223) (6 632 3792) (2 698 1396) (3 982 2946) (8 357 2856) (4 549 2196) (8 392 3136) (2 574 1148) (7 926 6482) (6 687 4122) (7 475 3325) (4 783 3132) (8 867 6936) (5 239 1195) (9 948 8532) (3 492 1476) (6 524 3144) (5 375 1875) (6 632 3792) (9 247 2223) (4 578 2312) (3 429 1287) (2 698 1396) (8 357 2856) (3 982 2946) (4 549 2196) (6 687 4122) (2 574 1148) (7 926 6482) (8 392 3136) (7 475 3325) (5 239 1195) (4 783 3132) (8 867 6936) (9 948 8532) (3 492 1476) (6 524 3144) (5 375 1875) (2 856 1712) (5 587 2935) (7 462 3234) (9 795 7155) (6 632 3792) (3 429 1287) (4 578 2312) (9 247 2223) (2 698 1396) (8 357 2856) (4 549 2196) (3 982 2946) (2 574 1148) (8 392 3136) (7 926 6482) (6 687 4122) (8 867 6936) (5 239 1195) (4 783 3132) (7 475 3325) (5 375 1875) (6 524 3144) (3 492 1476) (9 948 8532) (2 856 1712) (5 587 2935) (7 462 3234) (9 795 7155) (6 632 3792) (3 429 1287) (4 578 2312) (9 247 2223) (2 698 1396) (4 549 2196) (3 982 2946) (8 357 2856) (2 574 1148) (7 926 6482) (8 392 3136) (6 687 4122) (4 783 3132) (5 239 1195) (8 867 6936) (7 475 3325) (5 375 1875) (9 948 8532) (3 492 1476) (6 524 3144) (7 462 3234) (2 856 1712) (5 587 2935) (9 795 7155) (9 247 2223) (4 578 2312) (6 632 3792) (3 429 1287) (3 982 2946) (8 357 2856) (2 698 1396) (4 549 2196) (2 574 1148) (6 687 4122) (7 926 6482) (8 392 3136) (7 475 3325) (8 867 6936) (5 239 1195) (4 783 3132) (6 524 3144) (3 492 1476) (5 375 1875) (9 948 8532) (5 587 2935) (9 795 7155) (7 462 3234) (2 856 1712) (9 247 2223) (4 578 2312) (3 429 1287) (6 632 3792))) (defparameter *school-5* '((9 59736 537624) (7 85647 599529) (5 74865 374325) (6 97283 583698) (9 54827 493443) (3 38496 115488) (5 27569 137845) (4 95342 381368) (2 93758 187516) (3 56284 168852) (6 79643 477858) (9 82437 741933) (8 36749 293992) (2 79463 158926) (4 48532 194128) (7 85324 597268) (3 57324 171972) (6 35286 211716) (4 98462 393848) (8 74659 597272) (5 78695 393475) (2 59274 118548) (8 83549 668392) (7 34826 243782) (6 79643 477858) (9 82437 741933) (2 93758 187516) (3 56284 168852) (2 79463 158926) (4 48532 194128) (7 85324 597268) (8 36749 293992) (4 98462 393848) (6 35286 211716) (8 74659 597272) (3 57324 171972) (8 83549 668392) (2 59274 118548) (5 78695 393475) (7 34826 243782) (6 97283 583698) (7 85647 599529) (9 59736 537624) (5 74865 374325) (4 95342 381368) (5 27569 137845) (3 38496 115488) (9 54827 493443) (9 82437 741933) (6 79643 477858) (3 56284 168852) (2 93758 187516) (8 36749 293992) (2 79463 158926) (7 85324 597268) (4 48532 194128) (3 57324 171972) (4 98462 393848) (6 35286 211716) (8 74659 597272) (5 78695 393475) (7 34826 243782) (8 83549 668392) (2 59274 118548) (9 59736 537624) (6 97283 583698) (5 74865 374325) (7 85647 599529) (4 95342 381368) (9 54827 493443) (5 27569 137845) (3 38496 115488) (3 56284 168852) (9 82437 741933) (2 93758 187516) (6 79643 477858) (7 85324 597268) (2 79463 158926) (4 48532 194128) (8 36749 293992) (6 35286 211716) (4 98462 393848) (3 57324 171972) (8 74659 597272) (7 34826 243782) (2 59274 118548) (5 78695 393475) (8 83549 668392) (7 85647 599529) (6 97283 583698) (5 74865 374325) (9 59736 537624) (5 27569 137845) (9 54827 493443) (3 38496 115488) (4 95342 381368) (3 56284 168852) (2 93758 187516) (9 82437 741933) (6 79643 477858) (8 36749 293992) (4 48532 194128) (7 85324 597268) (2 79463 158926) (4 98462 393848) (3 57324 171972) (8 74659 597272) (6 35286 211716) (7 34826 243782) (5 78695 393475) (8 83549 668392) (2 59274 118548) (5 74865 374325) (6 97283 583698) (7 85647 599529) (9 59736 537624) (4 95342 381368) (9 54827 493443) (5 27569 137845) (3 38496 115488) (3 56284 168852) (6 79643 477858) (9 82437 741933) (2 93758 187516) (7 85324 597268) (8 36749 293992) (4 48532 194128) (2 79463 158926) (4 98462 393848) (6 35286 211716) (3 57324 171972) (8 74659 597272) (2 59274 118548) (8 83549 668392) (5 78695 393475) (7 34826 243782) (6 97283 583698) (9 59736 537624) (7 85647 599529) (5 74865 374325) (9 54827 493443) (3 38496 115488) (5 27569 137845) (4 95342 381368) (2 93758 187516) (9 82437 741933) (6 79643 477858) (3 56284 168852) (7 85324 597268) (2 79463 158926) (4 48532 194128) (8 36749 293992) (4 98462 393848) (3 57324 171972) (6 35286 211716) (8 74659 597272) (8 83549 668392) (7 34826 243782) (2 59274 118548) (5 78695 393475) (9 59736 537624) (5 74865 374325) (6 97283 583698) (7 85647 599529) (9 54827 493443) (4 95342 381368) (5 27569 137845) (3 38496 115488) (9 82437 741933) (2 93758 187516) (6 79643 477858) (3 56284 168852) (8 36749 293992) (4 48532 194128) (2 79463 158926) (7 85324 597268) (8 74659 597272) (6 35286 211716) (4 98462 393848) (3 57324 171972) (2 59274 118548) (7 34826 243782) (5 78695 393475) (8 83549 668392) (3 56284 168852) (9 82437 741933) (6 79643 477858) (2 93758 187516) (8 36749 293992) (2 79463 158926) (7 85324 597268) (4 48532 194128) (6 35286 211716) (4 98462 393848) (3 57324 171972) (8 74659 597272) (2 59274 118548) (5 78695 393475) (8 83549 668392) (7 34826 243782) (3 38496 115488) (9 54827 493443) (5 27569 137845) (4 95342 381368) (6 79643 477858) (2 93758 187516) (3 56284 168852) (9 82437 741933) (7 85324 597268) (8 36749 293992) (4 48532 194128) (2 79463 158926) (4 98462 393848) (8 74659 597272) (6 35286 211716) (3 57324 171972) (5 78695 393475) (2 59274 118548) (7 34826 243782) (8 83549 668392) (9 59736 537624) (7 85647 599529) (5 74865 374325) (6 97283 583698) (9 54827 493443) (5 27569 137845) (4 95342 381368) (3 38496 115488) (6 79643 477858) (3 56284 168852) (2 93758 187516) (9 82437 741933) (2 79463 158926) (7 85324 597268) (8 36749 293992) (4 48532 194128) (7 34826 243782) (5 78695 393475) (8 83549 668392) (2 59274 118548) (5 74865 374325) (9 59736 537624) (7 85647 599529) (6 97283 583698) (3 38496 115488) (9 54827 493443) (4 95342 381368) (5 27569 137845) (3 56284 168852) (2 93758 187516) (6 79643 477858) (9 82437 741933) (8 36749 293992) (7 85324 597268) (2 79463 158926) (4 48532 194128) (6 35286 211716) (4 98462 393848) (8 74659 597272) (3 57324 171972) (2 59274 118548) (8 83549 668392) (7 34826 243782) (5 78695 393475) (9 59736 537624) (7 85647 599529) (6 97283 583698) (5 74865 374325) (4 95342 381368) (9 54827 493443) (3 38496 115488) (5 27569 137845) (6 79643 477858) (2 93758 187516) (3 56284 168852) (9 82437 741933) (7 85324 597268) (8 36749 293992) (4 48532 194128) (2 79463 158926) (6 35286 211716) (3 57324 171972) (8 74659 597272) (4 98462 393848) (5 78695 393475) (2 59274 118548) (7 34826 243782) (8 83549 668392) (6 97283 583698) (5 74865 374325) (9 59736 537624) (7 85647 599529) (5 27569 137845) (4 95342 381368) (3 38496 115488) (9 54827 493443) (2 93758 187516) (9 82437 741933) (6 79643 477858) (3 56284 168852) (8 36749 293992) (4 48532 194128) (7 85324 597268) (2 79463 158926) (8 74659 597272) (6 35286 211716) (4 98462 393848) (3 57324 171972) (8 83549 668392) (7 34826 243782) (5 78695 393475) (2 59274 118548) (5 74865 374325) (9 59736 537624) (6 97283 583698) (7 85647 599529) (5 27569 137845) (9 54827 493443) (3 38496 115488) (4 95342 381368) (6 79643 477858) (3 56284 168852) (9 82437 741933) (2 93758 187516) (8 36749 293992) (4 48532 194128) (7 85324 597268) (2 79463 158926) (8 74659 597272) (4 98462 393848) (6 35286 211716) (3 57324 171972) (7 34826 243782) (5 78695 393475) (2 59274 118548) (8 83549 668392))) (defparameter *expert-3* '((7 823 5761) (6 264 1584) (5 735 3675) (9 476 4284) (9 859 7731) (3 743 2229) (5 265 1325) (4 438 1752) (2 946 1892) (6 528 3168) (9 392 3528) (3 654 1962) (2 763 1526) (8 289 2312) (4 836 3344) (7 657 4599) (3 924 2772) (4 349 1396) (8 273 2184) (6 638 3828) (5 963 4815) (8 854 6832) (7 385 2695) (2 796 1592) (3 654 1962) (2 946 1892) (9 392 3528) (6 528 3168) (7 657 4599) (2 763 1526) (8 289 2312) (4 836 3344) (4 349 1396) (3 924 2772) (8 273 2184) (6 638 3828) (5 963 4815) (8 854 6832) (2 796 1592) (7 385 2695) (5 735 3675) (6 264 1584) (7 823 5761) (9 476 4284) (3 743 2229) (5 265 1325) (9 859 7731) (4 438 1752) (6 528 3168) (9 392 3528) (3 654 1962) (2 946 1892) (7 657 4599) (4 836 3344) (2 763 1526) (8 289 2312) (6 638 3828) (8 273 2184) (3 924 2772) (4 349 1396) (2 796 1592) (5 963 4815) (7 385 2695) (8 854 6832) (7 823 5761) (9 476 4284) (6 264 1584) (5 735 3675) (4 438 1752) (5 265 1325) (9 859 7731) (3 743 2229) (9 392 3528) (6 528 3168) (3 654 1962) (2 946 1892) (8 289 2312) (4 836 3344) (2 763 1526) (7 657 4599) (3 924 2772) (6 638 3828) (4 349 1396) (8 273 2184) (7 385 2695) (8 854 6832) (5 963 4815) (2 796 1592) (7 823 5761) (6 264 1584) (9 476 4284) (5 735 3675) (3 743 2229) (5 265 1325) (4 438 1752) (9 859 7731) (2 946 1892) (9 392 3528) (6 528 3168) (3 654 1962) (2 763 1526) (4 836 3344) (8 289 2312) (7 657 4599) (4 349 1396) (6 638 3828) (8 273 2184) (3 924 2772) (5 963 4815) (2 796 1592) (8 854 6832) (7 385 2695) (6 264 1584) (7 823 5761) (5 735 3675) (9 476 4284) (4 438 1752) (9 859 7731) (3 743 2229) (5 265 1325) (6 528 3168) (9 392 3528) (2 946 1892) (3 654 1962) (8 289 2312) (7 657 4599) (4 836 3344) (2 763 1526) (3 924 2772) (4 349 1396) (6 638 3828) (8 273 2184) (8 854 6832) (5 963 4815) (7 385 2695) (2 796 1592) (9 476 4284) (5 735 3675) (7 823 5761) (6 264 1584) (5 265 1325) (3 743 2229) (9 859 7731) (4 438 1752) (2 946 1892) (6 528 3168) (3 654 1962) (9 392 3528) (8 289 2312) (2 763 1526) (7 657 4599) (4 836 3344) (6 638 3828) (8 273 2184) (4 349 1396) (3 924 2772) (5 963 4815) (2 796 1592) (8 854 6832) (7 385 2695) (7 823 5761) (9 476 4284) (5 735 3675) (6 264 1584) (5 265 1325) (9 859 7731) (3 743 2229) (4 438 1752) (6 528 3168) (3 654 1962) (2 946 1892) (9 392 3528) (2 763 1526) (4 836 3344) (7 657 4599) (8 289 2312) (4 349 1396) (8 273 2184) (6 638 3828) (3 924 2772) (5 963 4815) (2 796 1592) (8 854 6832) (7 385 2695) (2 946 1892) (9 392 3528) (3 654 1962) (6 528 3168) (4 836 3344) (7 657 4599) (2 763 1526) (8 289 2312) (3 924 2772) (8 273 2184) (4 349 1396) (6 638 3828) (5 963 4815) (2 796 1592) (7 385 2695) (8 854 6832) (3 743 2229) (4 438 1752) (9 859 7731) (5 265 1325) (9 392 3528) (3 654 1962) (6 528 3168) (2 946 1892) (4 836 3344) (2 763 1526) (8 289 2312) (7 657 4599) (4 349 1396) (6 638 3828) (8 273 2184) (3 924 2772) (7 385 2695) (5 963 4815) (2 796 1592) (8 854 6832) (7 823 5761) (9 476 4284) (5 735 3675) (6 264 1584) (3 743 2229) (9 859 7731) (4 438 1752) (5 265 1325) (2 946 1892) (3 654 1962) (9 392 3528) (6 528 3168) (4 836 3344) (8 289 2312) (2 763 1526) (7 657 4599) (5 963 4815) (2 796 1592) (8 854 6832) (7 385 2695) (9 476 4284) (7 823 5761) (5 735 3675) (6 264 1584) (5 265 1325) (4 438 1752) (9 859 7731) (3 743 2229) (3 654 1962) (9 392 3528) (6 528 3168) (2 946 1892) (7 657 4599) (4 836 3344) (2 763 1526) (8 289 2312) (8 273 2184) (6 638 3828) (3 924 2772) (4 349 1396) (8 854 6832) (7 385 2695) (5 963 4815) (2 796 1592) (6 264 1584) (9 476 4284) (7 823 5761) (5 735 3675) (5 265 1325) (9 859 7731) (3 743 2229) (4 438 1752) (9 392 3528) (3 654 1962) (6 528 3168) (2 946 1892) (4 836 3344) (7 657 4599) (8 289 2312) (2 763 1526) (3 924 2772) (4 349 1396) (6 638 3828) (8 273 2184) (8 854 6832) (2 796 1592) (7 385 2695) (5 963 4815) (5 735 3675) (9 476 4284) (7 823 5761) (6 264 1584) (9 859 7731) (5 265 1325) (3 743 2229) (4 438 1752) (2 946 1892) (3 654 1962) (9 392 3528) (6 528 3168) (8 289 2312) (7 657 4599) (4 836 3344) (2 763 1526) (4 349 1396) (8 273 2184) (3 924 2772) (6 638 3828) (5 963 4815) (7 385 2695) (8 854 6832) (2 796 1592) (5 735 3675) (7 823 5761) (9 476 4284) (6 264 1584) (3 743 2229) (9 859 7731) (4 438 1752) (5 265 1325) (6 528 3168) (9 392 3528) (2 946 1892) (3 654 1962) (4 836 3344) (2 763 1526) (8 289 2312) (7 657 4599) (6 638 3828) (3 924 2772) (4 349 1396) (8 273 2184) (7 385 2695) (8 854 6832) (2 796 1592) (5 963 4815))) (defparameter *expert-5* '((2 62478 124956) (4 38529 154116) (3 43952 131856) (8 26394 211152) (6 73658 441948) (8 69283 554264) (2 82974 165948) (7 46735 327145) (8 45892 367136) (5 24365 121825) (7 37926 265482) (4 68579 274316) (6 97658 585948) (9 52976 476784) (3 63285 189855) (5 24897 124485) (9 69537 625833) (2 82743 165486) (5 23895 119475) (7 46978 328846) (9 27468 247212) (6 62753 376518) (3 96387 289161) (4 45932 183728) (4 68579 274316) (8 45892 367136) (7 37926 265482) (5 24365 121825) (9 52976 476784) (5 24897 124485) (3 63285 189855) (6 97658 585948) (2 82743 165486) (5 23895 119475) (7 46978 328846) (9 69537 625833) (6 62753 376518) (3 96387 289161) (4 45932 183728) (9 27468 247212) (3 43952 131856) (2 62478 124956) (4 38529 154116) (8 26394 211152) (8 69283 554264) (7 46735 327145) (2 82974 165948) (6 73658 441948) (7 37926 265482) (8 45892 367136) (4 68579 274316) (5 24365 121825) (6 97658 585948) (3 63285 189855) (9 52976 476784) (5 24897 124485) (7 46978 328846) (5 23895 119475) (9 69537 625833) (2 82743 165486) (6 62753 376518) (9 27468 247212) (3 96387 289161) (4 45932 183728) (3 43952 131856) (4 38529 154116) (2 62478 124956) (8 26394 211152) (6 73658 441948) (8 69283 554264) (2 82974 165948) (7 46735 327145) (8 45892 367136) (4 68579 274316) (5 24365 121825) (7 37926 265482) (9 52976 476784) (5 24897 124485) (6 97658 585948) (3 63285 189855) (2 82743 165486) (9 69537 625833) (7 46978 328846) (5 23895 119475) (9 27468 247212) (3 96387 289161) (4 45932 183728) (6 62753 376518) (4 38529 154116) (3 43952 131856) (2 62478 124956) (8 26394 211152) (6 73658 441948) (8 69283 554264) (7 46735 327145) (2 82974 165948) (7 37926 265482) (8 45892 367136) (4 68579 274316) (5 24365 121825) (3 63285 189855) (9 52976 476784) (6 97658 585948) (5 24897 124485) (2 82743 165486) (7 46978 328846) (9 69537 625833) (5 23895 119475) (4 45932 183728) (9 27468 247212) (6 62753 376518) (3 96387 289161) (4 38529 154116) (2 62478 124956) (8 26394 211152) (3 43952 131856) (7 46735 327145) (6 73658 441948) (8 69283 554264) (2 82974 165948) (5 24365 121825) (8 45892 367136) (4 68579 274316) (7 37926 265482) (5 24897 124485) (9 52976 476784) (3 63285 189855) (6 97658 585948) (9 69537 625833) (5 23895 119475) (2 82743 165486) (7 46978 328846) (4 45932 183728) (6 62753 376518) (3 96387 289161) (9 27468 247212) (4 38529 154116) (2 62478 124956) (8 26394 211152) (3 43952 131856) (6 73658 441948) (2 82974 165948) (7 46735 327145) (8 69283 554264) (4 68579 274316) (7 37926 265482) (5 24365 121825) (8 45892 367136) (9 52976 476784) (6 97658 585948) (5 24897 124485) (3 63285 189855) (5 23895 119475) (9 69537 625833) (7 46978 328846) (2 82743 165486) (4 45932 183728) (9 27468 247212) (6 62753 376518) (3 96387 289161) (3 43952 131856) (8 26394 211152) (2 62478 124956) (4 38529 154116) (6 73658 441948) (2 82974 165948) (7 46735 327145) (8 69283 554264) (4 68579 274316) (5 24365 121825) (7 37926 265482) (8 45892 367136) (5 24897 124485) (9 52976 476784) (6 97658 585948) (3 63285 189855) (2 82743 165486) (9 69537 625833) (7 46978 328846) (5 23895 119475) (6 62753 376518) (9 27468 247212) (4 45932 183728) (3 96387 289161) (5 24365 121825) (7 37926 265482) (4 68579 274316) (8 45892 367136) (3 63285 189855) (9 52976 476784) (5 24897 124485) (6 97658 585948) (5 23895 119475) (7 46978 328846) (9 69537 625833) (2 82743 165486) (3 96387 289161) (4 45932 183728) (9 27468 247212) (6 62753 376518) (8 69283 554264) (2 82974 165948) (6 73658 441948) (7 46735 327145) (5 24365 121825) (8 45892 367136) (7 37926 265482) (4 68579 274316) (5 24897 124485) (6 97658 585948) (9 52976 476784) (3 63285 189855) (2 82743 165486) (9 69537 625833) (7 46978 328846) (5 23895 119475) (3 96387 289161) (4 45932 183728) (9 27468 247212) (6 62753 376518) (8 26394 211152) (2 62478 124956) (3 43952 131856) (4 38529 154116) (6 73658 441948) (7 46735 327145) (8 69283 554264) (2 82974 165948) (5 24365 121825) (4 68579 274316) (8 45892 367136) (7 37926 265482) (9 52976 476784) (3 63285 189855) (5 24897 124485) (6 97658 585948) (9 27468 247212) (3 96387 289161) (6 62753 376518) (4 45932 183728) (4 38529 154116) (3 43952 131856) (8 26394 211152) (2 62478 124956) (8 69283 554264) (7 46735 327145) (2 82974 165948) (6 73658 441948) (8 45892 367136) (4 68579 274316) (7 37926 265482) (5 24365 121825) (6 97658 585948) (3 63285 189855) (5 24897 124485) (9 52976 476784) (5 23895 119475) (9 69537 625833) (7 46978 328846) (2 82743 165486) (9 27468 247212) (3 96387 289161) (6 62753 376518) (4 45932 183728) (2 62478 124956) (3 43952 131856) (4 38529 154116) (8 26394 211152) (7 46735 327145) (8 69283 554264) (2 82974 165948) (6 73658 441948) (4 68579 274316) (5 24365 121825) (7 37926 265482) (8 45892 367136) (6 97658 585948) (3 63285 189855) (9 52976 476784) (5 24897 124485) (7 46978 328846) (9 69537 625833) (2 82743 165486) (5 23895 119475) (6 62753 376518) (4 45932 183728) (3 96387 289161) (9 27468 247212) (3 43952 131856) (8 26394 211152) (4 38529 154116) (2 62478 124956) (6 73658 441948) (8 69283 554264) (2 82974 165948) (7 46735 327145) (7 37926 265482) (5 24365 121825) (8 45892 367136) (4 68579 274316) (9 52976 476784) (6 97658 585948) (5 24897 124485) (3 63285 189855) (2 82743 165486) (9 69537 625833) (7 46978 328846) (5 23895 119475) (4 45932 183728) (3 96387 289161) (6 62753 376518) (9 27468 247212) (8 26394 211152) (3 43952 131856) (4 38529 154116) (2 62478 124956) (6 73658 441948) (2 82974 165948) (7 46735 327145) (8 69283 554264) (7 37926 265482) (4 68579 274316) (5 24365 121825) (8 45892 367136) (6 97658 585948) (3 63285 189855) (5 24897 124485) (9 52976 476784) (2 82743 165486) (9 69537 625833) (7 46978 328846) (5 23895 119475) (4 45932 183728) (3 96387 289161) (6 62753 376518) (9 27468 247212))) (defun calculate-average (problems instruction) (let* ((results (mapcar #'(lambda (x y z) (let ((zz (present-trial x y instruction))) (cond ((not (= (extract-number (mapcar 'second zz)) z)) (print (list x y z)) nil) (t (mapcar 'car zz))))) (mapcar 'second problems) (mapcar 'first problems) (mapcar 'third problems))) (final (mapcar #'(lambda (x) (cons 2 x)) (remove nil results)))) (do ((temp final (mapcar 'cdr temp)) (latencies nil (cons (counts (mapcar 'scan-difs (mapcar 'second temp) (mapcar 'car temp))) latencies))) ((null (cdr (car temp)))(reverse latencies))))) (defun calculate-bold (problems instruction template) (let* ((results (mapcar #'(lambda (x y z) (let ((zz (present-trial x y instruction))) (cond ((not (= (extract-number (mapcar 'second zz)) z)) (print (append (list x y z) (no-output (sgp :lf :imaginal-delay)))) nil) (t (cons (mapcar 'car zz) (mapcar #'(lambda (x) (warp-fincham x template)) (no-output (predict-bold-response)))))))) (mapcar 'second problems) (mapcar 'first problems) (mapcar 'third problems))) keys times) (do ((temp (mapcar 'cdr results) (mapcar 'cdr temp)) (bolds nil (cons (average-bolds (mapcar 'car temp)) bolds))) ((null (car temp)) (setf keys (remove nil (mapcar 'car results))) (do ((temp keys (mapcar 'cdr temp)) (result nil (cons (/ (apply '+ (mapcar 'car temp)) (* 1.0 (length keys))) result))) ((null (car temp)) (setf times (reverse result)))) (do ((temp (mapcar #'(lambda (x) (cons 2000 x)) keys) (mapcar 'cdr temp)) (latencies nil (cons (counts (mapcar 'scan-difs (mapcar 'second temp) (mapcar 'car temp))) latencies))) ((null (cdr (car temp))) (distribution instruction times (reverse latencies)))) (setf (bold-module-v (get-module bold)) t) (output-bold-response-data (mapcar #'(lambda (x) (append (list (car x) 0) (cdr x))) (reverse bolds)) (get-module bold) 0 (* 2 (length (car bolds)))) (setf (bold-module-v (get-module bold)) nil))))) (defun distribution (name times lis) (terpri) (princ name) (princ " Keys have mean times (msec): ") (mapcar #'(lambda (x) (princ (round x)) (princ " ")) times) (do ((temp lis (cdr temp)) (i 1 (1+ i))) ((null temp) nil) (terpri) (princ "Distribution of scans for key ") (princ i) (princ ": ") (mapcar #'(lambda (x) (princ (round x)) (princ " ")) (car temp)))) (defun average-bolds (lis) (setf lis (remove nil lis)) (do ((temp (mapcar 'cdr lis) (mapcar 'cdr temp)) (result (list (caar lis)) (cons (/ (apply '+ (mapcar 'car temp)) (length lis)) result))) ((null (car temp)) (reverse result)))) (defun get-lengths (results) (do ((temp (cons (list 2000) results) (cdr temp)) (lengths nil (cons (- (ceiling (/ (car (second temp)) 2000)) (ceiling (/ (caar temp) 2000))) lengths))) ((null (cddddr temp)) (append (reverse lengths) (list (- (ceiling (/ (car (fourth temp)) 2000)) (ceiling (/ (caar temp) 2000))) 8))))) (defun warp-fincham (lis template) (cons (car lis) (fincham-all (cdr lis) (get-lengths (reverse *results*)) template))) (defun fincham-all (data 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)) (result nil (append result (fincham-one (first-n (car temp-dl) temp-data) (car temp-sl))))) ((null temp-dl) result))) (defun first-n (n lis) (if (< n 2) (list (car lis)) (reverse (nthcdr (- (length lis) n) (reverse lis))))) (defun fincham-one (data length) (let ((front (first-half data)) (back (reverse (second-half data)) )) (do ((data1 front (cdr data1)) (data2 back (cdr data2) ) (count (/ length 2) (1- count)) (result1 nil (cons (or (car data1) (car (last front))) result1)) (result2 nil (if (>= count 1) (cons (or (car data2) (car (last back)) (car data)) result2) result2))) ((<= count 0) (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 scan-difs (a b) (- (floor (/ a 2000)) (floor (/ b 2000)))) (defparameter *large* nil) (defun large () *large*) (defun counts (lis) (do ((i 0 (1+ i)) (result nil (cons (count i lis) result))) ((= i 30) (reverse result)))) (defun test-model-bold (n flag) (setf *enable-random* flag) (list (calculate-bold (n-copies *school-3* n) 'school (list 6 1 1 8)) (calculate-bold (n-copies *school-5* n) 'school (list 12 1 1 1 1 8)) (calculate-bold (n-copies *expert-3* n) 'expert (list 4 3 1 8)) (calculate-bold (n-copies *expert-5* n) 'expert (list 4 3 3 2 1 8)) )) (defun n-copies (lis n) (do ((i 0 (1+ i)) (result nil (append lis result))) ((= i n) result))) (defun present-trial (top bottom instruction) (let ((window (open-exp-window "Arithmetic Experiment" :visible nil))) (if (> top 1000) (setf *large* t) (setf *large* nil)) (setf *position* (if (> top 1000) 75 125)) (setf *results* nil *top* top *bottom* bottom) (reset) (install-device window) (goal-focus-fct (first (add-dm-fct '((isa goal step get-ready))))) (add-text-to-exp-window :text (case instruction (expert ">") (t "<")) :x 175 :y 150 :width 25) (proc-display :clear t) (schedule-event 2 'present-problem) ; (sgp :v t) (run 4))) (run 60) (cond ( (<(get-time) 59999) (run-full-time (- 2 (mod (/ (get-time) 1000) 2))) (clear-exp-window) (add-text-to-exp-window :text "+" :x 175 :y 150 :width 25) (proc-display :clear t) (run-full-time 16) (reverse *results*))))) (defun present-problem () (clear-exp-window) (do ((temp (reverse (break-up *top*)) (cdr temp)) (x 200 (- x 25))) ((null temp) nil) (add-text-to-exp-window :text (car temp) :x x :y 125 :width 25)) (add-text-to-exp-window :text "x" :x 175 :y 150 :width 25) (add-text-to-exp-window :text (num-string *bottom*) :x 200 :y 150 :width 25) (proc-display :clear t)) (defun present-trials (lis) (do ((temp lis (cdr temp)) (result nil (cons (present-trial (first (car temp)) (second (car temp))) result))) ((null temp) (reverse result)))) (defun extract-number (lis) (do ((temp (mapcar 'string-num lis) (cdr temp)) (result 0 (+ (car temp) (* result 10)))) ((null (cdr temp)) result))) (defun string-num (st) (position st '(#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9))) (defun num-string (n) (nth n '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9"))) (defun break-up (n) (do ((targ n (floor (/ targ 10))) (result nil (cons (num-string (mod targ 10)) result))) ((= targ 0) result))) (defmethod rpm-window-key-event-handler ((win rpm-window) key) (setf key (case key ((#\g #\G) #\5) ((#\h #\H) #\6) (t key))) (add-text-to-exp-window :text (string key) :x *position* :y 175 :width 25) (proc-display) (push (list (get-time) key) *results*) (setf *position* (+ *position* 25)) ) (defun number (num) (position (chunk-slot-value-fct num 'ones) '(zero one two three four five six seven eight nine))) (defun calculate (base start p1) (let* ((nbase (number base)) (nstart (number start)) (np1 (number p1))) (if (> (+ np1 nstart) 9) (1+ nbase) nbase))) (defun figure-hand (base start p1) (if (> (calculate base start p1) 5) 'right 'left)) (defun figure-finger (base start p1) (nth (max 0 (1- (calculate base start p1))) '(pinkie ring middle index thumb thumb index middle ring))) (clear-all) (define-model miriam (sgp :esc t :egs 0.1 :ol t :rt -1 :bll .5 :ul nil :epl nil :lf .9 :v nil :optimize-visual nil :model-warnings nil :do-not-harvest imaginal :MODEL-WARNINGS nil :MOTOR-INITIATION-TIME .2 :ga 0 :trace-detail low :show-focus t :alpha .2 :visual-finst-span 60 :VISUAL-NUM-FINSTS 100 :needs-mouse nil :bold-inc 2 :imaginal-delay .9 :bold-scale 1.5 :bold-exp 3) (sgp :save-buffer-trace t :traced-buffers (visual production goal retrieval imaginal manual)) (setf *timer* (random 1.0)) (if *enable-random* (eval `(sgp :lf ,(+ *timer* (random .9)) :IMAGINAL-DELAY ,(+ *timer* (random .9)) ))) (chunk-type number tens ones half remainder key hand finger next) (chunk-type image first second third fourth fifth sixth multiplier type size) (chunk-type goal method step screen-x) (chunk-type instructions method image) (chunk-type addition-fact arg1 arg2 sum) (chunk-type multiplication-fact arg1 arg2 product) (define-chunks (center-loc isa visual-location screen-x 200 screen-y 155)) ;(set-visloc-default :nearest center-loc) (set-hand-location left 4 2) (set-hand-location right 7 2) (add-dm (instructions1 isa instructions method expert image ">") (instructions2 isa instructions method school image "<") (image isa image type storage) (zero isa number tens zero ones zero half zero remainder zero key "0" next one) (one isa number tens zero ones one half zero remainder one key "1" hand left finger pinkie next two) (two isa number tens zero ones two half one remainder zero key "2" hand left finger ring next three) (three isa number tens zero ones three half one remainder one key "3" hand left finger middle next four) (four isa number tens zero ones four half two remainder zero key "4" hand left finger index next five) (five isa number tens zero ones five half two remainder one key "5" hand left finger thumb next six) (six isa number tens zero ones six half three remainder zero key "6" hand right finger thumb next seven) (seven isa number tens zero ones seven half three remainder one key "7" hand right finger index next eight) (eight isa number tens zero ones eight half four remainder zero key "8" hand right finger middle next nine) (nine isa number tens zero ones nine half four remainder one key "9" hand right finger ring) (ten isa number tens one ones zero half five remainder zero) (eleven isa number tens one ones one half five remainder one) (twelve isa number tens one ones two half six remainder zero) (thirteen isa number tens one ones three half six remainder one) (fourteen isa number tens one ones four half seven remainder zero) (fifteen isa number tens one ones five half seven remainder one) (sixteen isa number tens one ones six half eight remainder zero) (seventeen isa number tens one ones seven half eight remainder one) (eightteen isa number tens one ones eight half nine remainder zero) (nineteen isa number tens one ones nine half nine remainder one) (n20 isa number tens two ones zero) (n21 isa number tens two ones one) (n22 isa number tens two ones two) (n23 isa number tens two ones three) (n24 isa number tens two ones four) (n25 isa number tens two ones five) (n26 isa number tens two ones six) (n27 isa number tens two ones seven) (n28 isa number tens two ones eight) (n29 isa number tens two ones nine) (n30 isa number tens three ones zero) (n31 isa number tens three ones one) (n32 isa number tens three ones two) (n33 isa number tens three ones three) (n34 isa number tens three ones four) (n35 isa number tens three ones five) (n36 isa number tens three ones six) (n37 isa number tens three ones seven) (n38 isa number tens three ones eight) (n39 isa number tens three ones nine) (n40 isa number tens four ones zero) (n41 isa number tens four ones one) (n42 isa number tens four ones two) (n43 isa number tens four ones three) (n44 isa number tens four ones four) (n45 isa number tens four ones five) (n46 isa number tens four ones six) (n47 isa number tens four ones seven) (n48 isa number tens four ones eight) (n49 isa number tens four ones nine) (n50 isa number tens five ones zero) (n51 isa number tens five ones one) (n52 isa number tens five ones two) (n53 isa number tens five ones three) (n54 isa number tens five ones four) (n55 isa number tens five ones five) (n56 isa number tens five ones six) (n57 isa number tens five ones seven) (n58 isa number tens five ones eight) (n59 isa number tens five ones nine) (n60 isa number tens six ones zero) (n61 isa number tens six ones one) (n62 isa number tens six ones two) (n63 isa number tens six ones three) (n64 isa number tens six ones four) (n65 isa number tens six ones five) (n66 isa number tens six ones six) (n67 isa number tens six ones seven) (n68 isa number tens six ones eight) (n69 isa number tens six ones nine) (n70 isa number tens seven ones zero) (n71 isa number tens seven ones one) (n72 isa number tens seven ones two) (n73 isa number tens seven ones three) (n74 isa number tens seven ones four) (n75 isa number tens seven ones five) (n76 isa number tens seven ones six) (n77 isa number tens seven ones seven) (n78 isa number tens seven ones eight) (n79 isa number tens seven ones nine) (n80 isa number tens eight ones zero) (n81 isa number tens eight ones one) (n82 isa number tens eight ones two) (n83 isa number tens eight ones three) (n84 isa number tens eight ones four) (n85 isa number tens eight ones five) (n86 isa number tens eight ones six) (n87 isa number tens eight ones seven) (n88 isa number tens eight ones eight) (n89 isa number tens eight ones nine) (n90 isa number tens nine ones zero) (n91 isa number tens nine ones one) (n92 isa number tens nine ones two) (n93 isa number tens nine ones three) (n94 isa number tens nine ones four) (n95 isa number tens nine ones five) (n96 isa number tens nine ones six) (n97 isa number tens nine ones seven) (n98 isa number tens nine ones eight) (n99 isa number tens nine ones nine) (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 20000 :creation-time -1000000) (no-output (weaken (append '(instructions1 instructions2 image) (sdm isa addition-fact) (sdm isa multiplication-fact)) 250)) #| PRODUCTIONS SHARED BY BOTH METHODS|# (p read-direction =goal> isa goal step get-ready =VISUAL-LOCATION> ISA VISUAL-LOCATION ==> +VISUAL> ISA MOVE-ATTENTION SCREEN-POS =VISUAL-LOCATION) (p check-instructions =goal> isa goal step get-ready =visual> isa visual-object value =val ==> +visual> isa clear +retrieval> isa instructions image =val +goal> step reading +imaginal> isa image size small) (p find-multiplier =goal> isa goal step start method =method =imaginal> isa image multiplier nil =visual-location> isa visual-location < screen-y 140 ==> +goal> step start +visual-location> isa visual-location > screen-y 140 > screen-x 185) (p encode-multiplier =goal> isa goal step start method =method =visual-location> isa visual-location > screen-y 140 ?visual> state free ==> +goal> step start +visual> ISA move-attention screen-pos =visual-location) (p encode-multiplier1 =goal> isa goal step start method =method =visual> isa visual-object value =image ==> +goal> step start +retrieval> isa number key =image) (p store-multiplier-expert =goal> isa goal step start method expert =retrieval> isa number ones =num =imaginal> isa image multiplier nil ==> +VISUAL-LOCATION> ISA VISUAL-LOCATION <= SCREEN-Y 140 SCREEN-X LOWEST +imaginal> multiplier =num +goal> step encoding) (p store-multiplier-school =goal> isa goal step start method school =retrieval> isa number ones =num =imaginal> isa image multiplier nil ==> +visual> isa clear +VISUAL-LOCATION> ISA VISUAL-LOCATION <= SCREEN-Y 140 SCREEN-X highest +imaginal> multiplier =num +goal> step encoding) (p encode-top =goal> isa goal step encoding method =method =visual-location> isa visual-location screen-x =x < screen-y 140 ?visual> state free buffer empty ==> =goal> screen-x =x +visual> isa move-attention screen-pos =visual-location ) (p find-product =goal> isa goal step encoding =retrieval> isa number tens zero ones =num =imaginal> isa image multiplier =val ==> +goal> step multiplying +retrieval> isa multiplication-fact arg1 =num arg2 =val) (p encode-others =goal> isa goal - step encoding =visual-location> isa visual-location > screen-y 170 ?visual> state free ==> +visual> isa move-attention screen-pos =visual-location) #|should be firing in later stages, come back to this|# (p expand-sum =goal> isa goal step adding =retrieval> isa addition-fact sum =sum ==> +retrieval> =sum) (p expand-sum-while-carry =goal> isa goal step carrying =retrieval> isa addition-fact sum =sum ==> +retrieval> =sum) #| PRODUCTIONS ONLY USED IN SCHOOL |# (p start-school =goal> isa goal =retrieval> isa instructions method school =imaginal> isa image multiplier nil =visual> isa visual-object value =val ?visual> state free ==> +retrieval> isa number key =val +goal> step encoding method school +visual-location> isa visual-location <= screen-y 140 screen-x highest) (p continue-school =goal> isa goal method school =visual-location> isa visual-location < screen-y 140 =imaginal> isa image multiplier =mult =visual> isa visual-object value =val ?visual> state free ?retrieval> state free buffer empty ==> +visual> isa clear +goal> step multiplying +retrieval> isa number key =val) (p first-expand-product-school =goal> isa goal step multiplying method school =retrieval> isa multiplication-fact product =num =imaginal> isa image second nil sixth nil ?imaginal> state free ==> +retrieval> =num) (p rest-expand-product-school =goal> isa goal step multiplying method school =retrieval> isa multiplication-fact product =num =imaginal> isa image sixth =sixth ==> +retrieval> =num) (p rest-expand-product-school1 =goal> isa goal step multiplying method school =retrieval> isa multiplication-fact product =num =imaginal> isa image second =sixth ==> +retrieval> =num) (p first-expand-school =goal> isa goal method school step multiplying screen-x =x =retrieval> isa number tens =tens ones =ones =imaginal> isa image second nil sixth nil ?imaginal> state free ==> !bind! =lower (- =x 35) +imaginal> fifth =tens sixth =ones +goal> step encoding +visual-location> isa visual-location <= screen-y 140 < screen-x =x > screen-x =lower) (p second-expand-school =goal> isa goal step multiplying =retrieval> isa number tens =tens ones =ones =imaginal> isa image fourth nil fifth =num ?imaginal> state free ==> +goal> step adding +imaginal> fourth =tens +retrieval> isa addition-fact arg1 =num arg2 =ones) (p third-expand-school =goal> isa goal step multiplying =retrieval> isa number tens =tens ones =ones =imaginal> isa image third nil fourth =num ?imaginal> state free ==> +goal> step adding +imaginal> third =tens +retrieval> isa addition-fact arg1 =num arg2 =ones) (p fourth-expand-school =goal> isa goal step multiplying =retrieval> isa number tens =tens ones =ones =imaginal> isa image multiplier =multiplier second nil third =num ?imaginal> state free ==> +visual> isa clear +goal> step rehearsing1 +imaginal> first =ones second =tens third =num +visual-location> isa visual-location > screen-y 150 < screen-y 170 SCREEN-X HIGHEST) (p fourth-expand-school1 =goal> isa goal step rehearsing1 =visual-location> isa visual-location ==> +goal> step rehearsing2 +VISUAL> ISA MOVE-ATTENTION SCREEN-POS =VISUAL-LOCATION +retrieval> isa image type storage) (p fourth-expand-school2 =goal> isa goal step rehearsing2 =retrieval> isa image =VISUAL> ISA VISUAL-OBJECT VALUE =IMAGE =imaginal> isa image first =ones second =tens third =num fourth =fourth fifth =fifth sixth =sixth multiplier =multiplier ==> +visual> isa clear +goal> step adding +imaginal> isa image multiplier =multiplier second =tens third =num size large =retrieval> fourth =fourth fifth =fifth sixth =sixth +RETRIEVAL> ISA ADDITION-FACT ARG1 =NUM ARG2 =ONES) (p change-image =goal> isa goal method school screen-x =val =imaginal> isa image size small ?imaginal> state free !eval! (large) ==> +imaginal> size large) (p fifth-expand-school =goal> isa goal step multiplying =retrieval> isa number tens =tens ones =ones =imaginal> isa image first nil second =num ?imaginal> state free ==> +visual> isa clear +goal> step adding +imaginal> first =tens +retrieval> isa addition-fact arg1 =num arg2 =ones) (p imaginal-update-school-no-carry-1 =goal> isa goal step adding method school screen-x =x =retrieval> isa number tens zero ones =ones =imaginal> isa image third nil fifth =num ?imaginal> state free ==> !bind! =lower (- =x 35) =goal> step encoding +imaginal> fifth =ones +visual-location> isa visual-location <= screen-y 140 < screen-x =x > screen-x =lower) (p imaginal-update-school-carry-1 =goal> isa goal step adding method school screen-x =x =retrieval> isa number - tens zero tens =tens ones =ones =imaginal> isa image third nil fourth =num1 fifth =num2 ?imaginal> state free ==> =goal> step carrying +imaginal> fifth =ones +retrieval> =num1) (p imaginal-update-school-finish-carry-1 =goal> isa goal step carrying method school screen-x =x =retrieval> isa number next =ones =imaginal> isa image third nil fourth =num ?imaginal> state free ==> !bind! =lower (- =x 35) =goal> step encoding +imaginal> fourth =ones +visual-location> isa visual-location <= screen-y 140 < screen-x =x > screen-x =lower) (p imaginal-update-school-no-carry-2 =goal> isa goal step adding method school screen-x =x =retrieval> isa number tens zero ones =ones =imaginal> isa image second nil third =num1 fourth =num2 ?imaginal> state free ==> !bind! =lower (- =x 35) =goal> step encoding +imaginal> fourth =ones +visual-location> isa visual-location <= screen-y 140 < screen-x =x > screen-x =lower) (p imaginal-update-school-carry-2 =goal> isa goal step adding method school screen-x =x =retrieval> isa number tens =tens - tens zero ones =ones =imaginal> isa image second nil third =num1 fourth =num2 ?imaginal> state free ==> =goal> step carrying +imaginal> fourth =ones +retrieval> =num1) (p imaginal-update-school-finish-carry-2 =goal> isa goal step carrying method school screen-x =x =retrieval> isa number next =ones =imaginal> isa image second nil third =num ?imaginal> state free ==> !bind! =lower (- =x 35) =goal> step encoding +imaginal> third =ones +visual-location> isa visual-location <= screen-y 140 < screen-x =x > screen-x =lower) (p imaginal-update-school-no-carry-3 =goal> isa goal step adding method school screen-x =x =retrieval> isa number tens zero ones =ones =imaginal> isa image first nil second =num1 third =num2 ?imaginal> state free ==> !bind! =lower (- =x 35) =goal> step encoding +imaginal> third =ones +visual-location> isa visual-location <= screen-y 140 < screen-x =x > screen-x =lower) (p imaginal-update-school-carry-3 =goal> isa goal step adding method school screen-x =x =retrieval> isa number tens =tens - tens zero ones =ones =imaginal> isa image first nil second =num1 third =num2 ?imaginal> state free ==> =goal> step carrying +imaginal> third =ones +retrieval> =num1) (p imaginal-update-school-finish-carry =goal> isa goal step carrying method school screen-x =x =retrieval> isa number next =ones =imaginal> isa image first nil second =num ?imaginal> state free ==> !bind! =lower (- =x 35) =goal> step encoding +imaginal> second =ones +visual-location> isa visual-location <= screen-y 140 < screen-x =x > screen-x =lower) (p imaginal-update-school-no-carry-4 =goal> isa goal step adding method school screen-x =x =retrieval> isa number tens zero ones =ones =imaginal> isa image first =num1 second =num2 ?imaginal> state free ==> !bind! =lower (- =x 35) =goal> step encoding +imaginal> second =ones +visual-location> isa visual-location <= screen-y 140 < screen-x =x > screen-x =lower) (p imaginal-update-school-carry-4 =goal> isa goal step adding screen-x =x method school =retrieval> isa number tens =tens - tens zero ones =ones =imaginal> isa image first =num1 second =num2 ?imaginal> state free ==> =goal> step carrying +imaginal> second =ones +retrieval> =num1) (p imaginal-update-school-finish-carry-4 =goal> isa goal step carrying method school screen-x =x =retrieval> isa number next =ones =imaginal> isa image first =num1 second =num2 ?imaginal> state free ==> !bind! =lower (- =x 35) =goal> step encoding +imaginal> first =ones +visual-location> isa visual-location <= screen-y 140 < screen-x =x > screen-x =lower) (p finishing-school-short =goal> isa goal step encoding method school =imaginal> isa image first nil second nil third =num ?visual-location> state error ?imaginal> state free ?retrieval> state free ?manual> state free ==> +retrieval> =num +goal> step done3) (P finish-school-1 =goal> isa goal step done1 screen-x =x method school =imaginal> isa image second =num =RETRIEVAL> ISA NUMBER HAND =HAND FINGER =FINGER ?MANUAL> STATE FREE ==> +retrieval> =num +goal> step done2 +MANUAL> ISA PUNCH HAND =HAND FINGER =FINGER) (P finish-school-2 =goal> isa goal step done2 screen-x =x method school =imaginal> isa image =RETRIEVAL> ISA NUMBER HAND =HAND FINGER =FINGER ?MANUAL> STATE FREE ==> +retrieval> isa image type storage - sixth nil +goal> step retrieving-rest +MANUAL> ISA PUNCH HAND =HAND FINGER =FINGER) (P finish-school-3 =goal> isa goal step retrieving-rest =RETRIEVAL> ISA image =imaginal> isa image third =num ==> +imaginal> =retrieval +retrieval> =num +goal> step done3) (P finish-school-4 =goal> isa goal step done3 screen-x =x method school =imaginal> isa image fourth =num =RETRIEVAL> ISA NUMBER HAND =HAND FINGER =FINGER ?MANUAL> STATE FREE ==> +retrieval> =num +goal> step done4 +MANUAL> ISA PUNCH HAND =HAND FINGER =FINGER) (P finish-school-5 =goal> isa goal step done4 screen-x =x method school =imaginal> isa image fifth =num =RETRIEVAL> ISA NUMBER HAND =HAND FINGER =FINGER ?MANUAL> STATE FREE ==> +retrieval> =num +goal> step done5 +MANUAL> ISA PUNCH HAND =HAND FINGER =FINGER) (P finish-school-6 =goal> isa goal step done5 screen-x =x method school =imaginal> isa image sixth =num =RETRIEVAL> ISA NUMBER HAND =HAND FINGER =FINGER ?MANUAL> STATE FREE ==> +retrieval> =num +goal> step done6 +MANUAL> ISA PUNCH HAND =HAND FINGER =FINGER) (P finish-school-7 =goal> isa goal step done6 screen-x =x method school =RETRIEVAL> ISA NUMBER HAND =HAND FINGER =FINGER ?MANUAL> STATE FREE ==> +goal> step really-done +MANUAL> ISA PUNCH HAND =HAND FINGER =FINGER) (p push-enter-school =goal> isa goal step really-done ?manual> state free =imaginal> isa image ==> +manual> ISA punch hand right finger pinkie +goal> step totaldone +imaginal> first nil second nil third nil fourth nil fifth nil sixth nil ) #| PRODUCTIONS ONLY USED IN EXPERT |# (p start-method =goal> isa goal step reading =retrieval> isa instructions method =method ==> +goal> step start method =method) (p continue =goal> isa goal method =method step encoding =visual> isa visual-object value =val ?visual> state free ?retrieval> state free buffer empty ==> +visual> isa clear +retrieval> isa number key =val) (p first-expand-expert =goal> isa goal step multiplying method expert screen-x =x =retrieval> isa number tens =tens ones =ones =imaginal> isa image first nil ?imaginal> state free ==> !bind! =upper (+ =x 35) +imaginal> first =tens second =ones +goal> step encoding +visual-location> isa visual-location <= screen-y 140 > screen-x =x < screen-x =upper) (p rest-expand-expert =goal> isa goal step multiplying method expert =retrieval> isa number tens =tens ones =ones =imaginal> isa image first =first second =num third nil ?imaginal> state free ==> #|!bind! =hand (figure-hand =first =num =tens) !bind! =finger (figure-finger =first =num =tens) +MANUAL> ISA PUNCH HAND =HAND FINGER =FINGER|# +imaginal> third =ones +retrieval> isa addition-fact arg1 =num arg2 =tens +goal> step adding) (p expand-product-expert =goal> isa goal step multiplying method expert =retrieval> isa multiplication-fact product =num ==> +retrieval> =num) (p no-carry-expert =goal> isa goal step adding method expert screen-x =x =retrieval> isa number tens zero ones =ones =imaginal> isa image first =num1 third =num2 ?imaginal> state free ?MANUAL> STATE FREE ==> !bind! =hand (figure-hand =num1 'one 'one) !bind! =finger (figure-finger =num1 'one 'one) +MANUAL> ISA PUNCH HAND =HAND FINGER =FINGER -VISUAL> !BIND! =UPPER (+ =X 35) +imaginal> first =retrieval second =num2 third nil +visual-location> ISA visual-location <= screen-y 140 > screen-x =x < screen-x =upper =goal> step encoding) (p carry-expert =goal> isa goal step adding method expert =retrieval> isa number tens one ones =ones =imaginal> isa image first =num1 third =num2 ?imaginal> state free ==> =goal> step carrying +imaginal> second =ones +retrieval> =num1) (p finish-carry-expert =goal> isa goal method expert step carrying screen-x =x =retrieval> isa number next =ones =imaginal> isa image second =num1 third =num2 ?imaginal> state free ?manual> state free ==> -VISUAL> !BIND! =UPPER (+ =X 35) +imaginal> first =num1 second =num2 third nil +visual-location> ISA visual-location <= screen-y 140 > screen-x =x < screen-x =upper =GOAL> STEP encoding !bind! =hand (figure-hand =ones 'one 'one) !bind! =finger (figure-finger =ones 'one 'one) +MANUAL> ISA PUNCH HAND =HAND FINGER =FINGER ) (p finishing =goal> isa goal step encoding =imaginal> isa image first =num ?visual-location> state error ==> +visual> isa clear =goal> step donea) (p finishing1 =goal> isa goal step donea =imaginal> isa image first =num ?imaginal> state free ==> +retrieval> =num +goal> step done1) (p finish-expert2 =goal> isa goal step done1 method expert =retrieval> isa number hand =hand finger =finger =imaginal> isa image second =num ?manual> state free ==> +retrieval> =num +manual> ISA punch hand =hand finger =finger +goal> step done2) (p finish-expert3 =goal> isa goal step done2 method expert =retrieval> isa number hand =hand finger =finger ?manual> state free ==> +manual> ISA punch hand =hand finger =finger +goal> step done4) (P key-out-expert =goal> isa goal STEP output screen-x =x method expert =RETRIEVAL> ISA NUMBER HAND =HAND FINGER =FINGER ?MANUAL> STATE FREE ==> -visual> !bind! =upper (+ =x 35) +goal> step encoding +MANUAL> ISA PUNCH HAND =HAND FINGER =FINGER +visual-location> ISA visual-location <= screen-y 140 > screen-x =x < screen-x =upper) (p push-enter-expert =goal> isa goal step done4 method expert ?manual> state free =imaginal> isa image ==> +manual> ISA punch hand right finger pinkie +goal> step done +imaginal> first nil second nil third nil fourth nil fifth nil sixth nil ) ) #| ENDING PROGRAM BRACE|#