This repository archives the code used for the paper "Instrumental Causal Learning".
The WebPPL code used to compute the posteriors for the base epistemic and instrumental causal learning models can be found in the "icl-model-base.txt" file. This code outputs the posteriors (and confidence intervals) for both models. The observations can be modified to fit different learning scenarios (e.g., "two-event", "three-event", "repeated-event", "varied-event", and "uniintentional-event" described in the paper).
The WebPPL code used to compute the posteriors for the "epistemic + intentionality" and "instrumental + intentionality" causal learning models can be found in the "icl-model-intentionality.txt" file. This code was used only for the "intentional-event" condition described in the paper.
The WebPPL code used to compute the Bayes Factors to compare different models can be found in "bayes-factor-base.txt" and "bayes-factor-intentionality.txt". The code in these 2 files are similar. However, "bayes-factor-base.txt" was used to compare between the Epistemic and Instrumental Learning Models (Studies 1-3) while "bayes-factor-intentionality.txt" was used to compare models assuming intentionality against their respective baseline models (Study 4).
The analyzed data (for each study) and video stimuli (shown in each experimental condition) can be found in the "Data" and "Stimuli" folders respectively. The original experimental materials can be found in the following web links (note that the names of the weblinks conflict with the studies' titles as we renamed these studies after their conception):
Study 1's Experiment
https://github.com/Instrumental-Causal-Learning-Studies/pcl-study1
Study 2's Experiment:
https://github.com/Instrumental-Causal-Learning-Studies/pcl-study2
Study 3's Experiment:
https://github.com/Instrumental-Causal-Learning-Studies/pcl-nus12
Study 4's Experiment (Crowdsourced):
https://instrumental-causal-learning-studies.github.io/pcl-study3/
Study 4's Experiment (Student):
https://instrumental-causal-learning-studies.github.io/pcl-nus3/