Python package to create and run ACT-R cognitive models.
This includes the (frozen) version of pyactr for the "Computational Cognitive Modeling and Linguistic Theory" book, with all the book code included in the folder book-code.
The book is available open-access here or by clicking on the link above.
Go to the folder notebooks, then:
- click on the notebook you want to work through
- wait (or refresh) until github renders it for you; if this doesn't work (sometimes github has issues rendering notebooks), download the corresponding pdf and open it locally on your computer
- open the notebook in Google Colab by clicking on the
Open In Colab
badge at the top of the notebook (this works for both the rendered ipynb file or the pdf file opened locally on your computer) - enjoy reading, running the code interactively, modifying the code etc.
The first two notebooks provide a basic introduction to Jupyter notebooks and Python3 based on various resources; feel free to skip them if you've worked with python and notebooks before. The remainder of the notebooks cover Chapters 2 through 7 of the "Computational Cognitive Modeling and Linguistic Theory" book.
Some notebook images might not display correctly in Google Colab, and you'll have to set up access to your google drive if you want to load/save files (e.g., data, models, figures etc.), but you should be able to go through a good number of notebooks by just opening them in Google Colab and working through them interactively.
The current list of notebooks is provided below; click on the links to open the notebooks directly in Google Colab:
- 0a_intro_to_jupyter
- 0b_intro_to_python_for_psycholinguists
- 1_ACTR_cognitive_architecture_in_cog_sci_and_ling
- 2_pyactr_implementation_of_ACTR
- 3_modules_and_buffers_and_writing_productions_in_pyactr
- 4_running_our_first_model
- 5_model_for_counting_in_ACTR
- 6_regular_grammars_in_ACTR
- 7_counter_automata_in_ACTR
- 8_top_down_parsing_model_structure_and_dec_mem
- 9_top_down_parsing_production_rules
- 10_top_down_parsing_running_the_model
- 11_top_down_parsing_failures_to_parse_and_taking_snapshots_of_the_mind
- 12_HOMEWORK1_extending_the_top_down_parser
- 13_intro_to_visual_and_motor_modules
- 14_lexical_decision_model_production_rules
- 15_lexical_decision_model_running_model_understanding_ouput
- 16_HOMEWORK2_optional_add_more_stimuli_to_lex_dec_model
- 17_left_corner_parsing_intro_and_dec_mem
- 18_left_corner_parsing_production_rules
- 19_left_corner_parsing_running_model_understanding_ouput
- 20_HOMEWORK3_extending_the_left_corner_parser
- 21_analyzing_quantitative_data_intro_and_dataset
- 22_basics_of_pymc3_and_normal_priors
- 23_likelihood_function_and_dummy_coding
- 24_HOMEWORK4_synthetic_data_compared_to_observed_data
- 25_half_normal_prior_for_sigma
- 26_posterior_beliefs_and_answering_the_theoretical_question
- 27_HOMEWORK5_changing_priors_and_likelihood
- 28_subsymbolic_dec_mem_ebbinghaus_data_log_transform
- 29_exponential_model_of_forgetting
- 30_power_law_model_of_forgetting
- 31_base_activation
- 32_spreading_activation
- 33_retrieval_probabillity_and_latency
- 34_log_freq_model_of_lex_dec
- 35_lex_dec_ACTR_model_1
- 36_lex_dec_ACTR_model_2
More documentation about the pyactr package can be found in the pyactr GitHub repo. Go to:
https://github.com/jakdot/pyactr
Some of the documents are also available here in the folder docs.
pyactr requires Python3 (>=3.3), numpy, simpy and pyparsing; it also requires tkinter if you want to see visual output of how ACT-R models interact with environment, but this is not necessary to run any models.