This is an example code snippet for the causal intervention task used in Experiment 1 of Coenen, Rehder, & Gureckis (2015).
To serve the experiment, please install psiturk and follow the quickstart instructions at psiturk.org. Note that this code is several years old and does not take advantage of all of psiturk's current features. It is also the first bit of JavaScript I've ever written, so please get in touch if I can help with any questions, at coenen.anna@gmail.com. Note that to change the causal structures, you will need to replace the information in static/lib/likelihoods.js.