Goatherd

  • Updated on 2nd Mar 2026

Goatherd is an R Shiny application for graphically generating experiment scripts for PCIbex experiments without writing JavaScript by hand. It allows users to configure experiment designs, select and order procedure blocks, preview the generated code, and download a ready-to-run script.

This project was developed to simplify experiment creation for researchers and students who work with Ibex Farm but prefer a structured graphical interface over manual coding. Goatherd integrates directly with established PennController templates, enabling a fast, transparent, and reproducible transition from experimental design choices to executable experiment scripts.

Goatherd is currently in Version 0.1.0 (pre-release).

Features

  • Graphical configuration of common psycholinguistic experiment types (acceptability judgments, self-paced reading, self-paced reading with comprehension questions)
  • Language-aware script generation (system messages and labels) in German and English
  • Optional randomization of experimental trials
  • Modular experiment procedure design (instructions, ethics, questionnaire, practice trials, main experiment, aim explanation)
  • Drag-and-drop reordering of experiment blocks
  • Automatic generation of PennController-compatible JavaScript
  • Live preview of:
    • Experiment sequence (Sequence(...))
    • Full generated script
  • Editable and previewable HTML files for:
    • Instructions
    • Ethics agreement
    • Aim explanation
  • Example stimuli file with enforced column structure
  • One-click download of:
    • Experiment script (.js or .txt)
    • Example CSV stimuli file
    • HTML resource files

Usage Guide

  1. Select the type of experiment (e.g., acceptability judgment or self-paced reading).
  2. Choose the language and randomization settings.
  3. Select which procedure elements to include.
  4. Arrange the experiment blocks using drag-and-drop.
  5. (Optional) Edit example HTML files for instructions, ethics, and aim explanation.
  6. Review the sequence preview and full script preview.
  7. Download the generated experiment script and required resource files.
  8. Upload the files to your Ibex Farm experiment.

Troubleshooting

  • Ensure that your stimuli CSV file uses the correct column names and capitalization.
  • All string values in the CSV (e.g., sentences) must be enclosed in quotation marks.
  • Verify that mandatory elements (setcounter, SendResults()) are included in the sequence.
  • Make sure required JavaScript modules (e.g., custom self-paced reading scripts) are available in your Ibex Farm setup.
  • If the experiment does not progress as expected, check the generated script for missing brackets, quotation marks, or semicolons.
  • Advanced customization may require manual editing of the downloaded script.

License

This application is open-source and available for modification and redistribution under the MIT License.