A-maze

Code
jspsych-maze (plugin)
maze-distractor-generator
maze-demos
Maze (older)

Current tools
Distractor generation (Hugging Face models)
Running A-maze in jsPsych
A-maze for kids
A-maze in other languages

Demos
All demos
Kid-friendly reading
Sentences with RT graph
Sentences without redo
Short vignettes
Natural Stories story

Background
What is A-maze?
Papers using A-maze
An argument for 'redo' mode
Adding a delay to 'redo' mode
Experiment design
Parameter considerations

Older tools
Original distractor generation (Boyce et al. 2020; Boyce & Levy 2023)
Install instructions
Basic use
Parameters
Advanced options
Ibex
Using Ibex for Maze
Hosting an Ibex-Maze server

Parameters

Older tools. This page documents the original distractor generation code (maze_automate), as described in Boyce et al. (2020) and Boyce & Levy (2023). It is no longer maintained, and is kept for existing projects. For new projects, see distractor generation with Hugging Face models.

In addition to the input and output file locations, the program also gets a list of parameters from a parameters file. By default, it uses params.txt, but you can specify another file to change parameter values.

A parameter file wil look something like this.

#These are required
min_delta: 10
min_abs: 25
num_to_test: 200
#These are not required, but if they aren't here you get the defaults
dictionary_loc: "wordfreq_distractor"
dictionary_class: "wordfreq_English_dict"
threshold_loc: "wordfreq_distractor"
threshold_name: "get_thresholds"
model_loc: "gulordava"
model_class: "gulordava_model"
exclude_words: "exclude.txt"
include_words: "gulordava_data/vocab.txt"
max_repeat: 0

Three parameters control how hard the program to find good distractors.

In general, high values should yield more surprising distractors, but we don’t know how accurate surprisal values are, so raising them too high may end up just selecting for noise. I wrote more about this potential trade-offs.

Max_repeat also effects what distractors are returned. Distractors never repeat within the same sentence, but by default, they can repeat across different items. If you don’t want repeats, or if you find that some words are coming up as distractors too often, you can set max_repeat to a positive integer and no distractor will appear more than that number of times in the entire set of materials. Setting max_repeat to 0 (the default) means that no limit is applied. Note: this is a new feature, and we don’t have any recommendations about what you might want to set it to. Setting it too high relative to the length of your materials and other parameters may result in worse distractors for sentences later in your materials.

Other parameters tell the program what models and vocabulary sources to use and where to find them.

The next two parameters control what the pool of potential distractor words is:

Parameter options

Available models, thresholds, and distractor dictionaries are currently limited. Include and exclude lists are recommendations, you may want more restricted word lists for some use cases.

For the English Gulordava model, use:

dictionary_loc: "wordfreq_distractor"
dictionary_class: "wordfreq_English_dict"
threshold_loc: "wordfreq_distractor"
threshold_name: "get_thresholds"
model_loc: "gulordava"
model_class: "gulordava_model"
exclude_words: "exclude.txt"
include_words: "gulordava_data/vocab.txt"

For the French model, use:

dictionary_loc: "wordfreq_distractor"
dictionary_class: "wordfreq_French_dict"
threshold_loc: "wordfreq_distractor"
threshold_name: "get_thresholds"
model_loc: "french"
model_class: "french_model"
include_words: "french_data/frwac_vocab.txt"