jsPsych / Behavioral experimentsRead · predict · build · inspect

Programming Behavioral Experiments in jsPsych

Teaching edition: October 2026. Dates and submission links are announced through the course learning platform.

Course title

Programming Behavioral Experiments in jsPsych

Instructor(s)

Bartosz Maćkiewicz

Contact details

b.mackiewicz@uw.edu.pl; consultations online via Google Meet

Affiliation

Faculty of Philosophy, University of Warsaw

Course format

Class (workshop / computer lab).

Number of hours

20 academic hours (5 meetings x 4 academic hours, i.e. 5 meetings x 180 minutes of instruction; breaks are additional).

Number of ECTS credits

2 ECTS

Brief course description

This elective introduces students to building browser-based behavioral experiments in jsPsych. Students learn how to present stimuli, collect responses, organize experiment timelines, implement randomization and counterbalancing, customize experiment appearance, and deploy studies online using JATOS and Cognition.run. The course is practical and project-based, with an emphasis on turning research questions from cognitive psychology, psycholinguistics, and related areas into runnable online studies.

Full course description

The course offers a hands-on introduction to programming behavioral experiments in jsPsych for students who already know basic programming concepts from Python or R but have no prior background in JavaScript, HTML, or CSS. The course begins with the core architecture of a jsPsych study: plugins, trials, timelines, response collection, and data output. It then moves to more realistic research designs, including blocked procedures, timeline variables, randomization, counterbalancing, conditional logic, loops, and feedback-controlled flow. Students also learn how to improve the presentation layer of an experiment through basic HTML/CSS customization and how to check practical browser and device constraints that matter in online data collection.

The final part of the course focuses on online deployment and selected advanced browser-based measures. In line with current jsPsych documentation, this includes mouse tracking and introductory webcam-based eye tracking with WebGazer, together with calibration, validation, and discussion of data-quality limits. The course also briefly introduces selected community extensions from the jsPsych ecosystem, especially examples from jspsych-contrib, such as device-motion and MediaPipe face-mesh integrations. These are presented as optional advanced examples rather than as core, fully stable competencies for a 20-hour course. By the end of the course, students should be able to design, implement, test, and deploy a small online behavioral study that is methodologically coherent and technically runnable.

Learning outcomes

After successfully completing the course, the student will be able to:

  1. Explain the logic, affordances, and methodological limits of browser-based behavioral experiments implemented in jsPsych. (K_W03, K_W07)
  2. Build a simple jsPsych experiment that presents stimuli, records participant responses, and exports usable behavioral data. (K_U04, K_U12)
  3. Implement blocked, randomized, counterbalanced, and feedback-controlled procedures using jsPsych timelines and control flow. (K_U03, K_U04, K_U12)
  4. Customize the appearance and interaction logic of an experiment with basic HTML/CSS and test it against realistic browser and device constraints. (K_U12, K_K06)
  5. Critically evaluate the suitability and limitations of mouse tracking, webcam-based eye tracking, and selected community-supported motion or face-tracking extensions for a given research question. (K_W03, K_U03, K_K01)
  6. Design, document, and deploy a small online study in jsPsych using JATOS or Cognition.run. (K_U02, K_U11, K_U12, K_K06)

Learning activities and teaching methods

List of topics/classes and bibliography

Meeting 1. From research question to first jsPsych experiment

Suggested reading:

Meeting 2. Timelines, data, and repeated experimental structure

Suggested reading:

Meeting 3. More complex designs

Suggested reading:

Meeting 4. Customization, robustness, and online readiness

Suggested reading:

Meeting 5. Advanced measures, ecosystem extensions, and online deployment

Suggested reading:

Core bibliography:

Assessment methods and criteria

  1. Assessment methods
  1. Components of the final grade and their weights
  1. Grading scale

Apply these bands to the unrounded total; a score of 59.5% remains in the first passing band.

  1. Requirements for retaking the assessment
  1. Exams in the exam session

  2. Requirements for taking the exam

  1. Possibility (and requirements) for retaking the exam in case of a positive grade
  1. Early Exam Session (“Zerowka”)

Project assessment criteria:

Attendance rules

Prerequisites

Academic honesty

Students must respect the principles of academic integrity. Plagiarism, copying code or text without attribution, falsifying data, and submitting work that the student does not understand are serious violations.

AI policy:

Remarks

Workload and assessment alignment

The 2 ECTS design budgets approximately 55 hours: 15 hours of instruction, 5 hours of setup/readings, 9 hours for three coding assignments, 3 hours for proposal/pilot documentation, and 23 hours for the final project and revision. This is a planning estimate, not a time-based grading rule. Existing programme outcome codes above are carried forward from the supplied draft; the instructor should reconcile them with the programme’s approved syllabus before administrative submission.

Outcome Evidence
1: explain structure and limits Assignment 1 explanation; project method and limitations
2: build and export Assignments 1-2; project runnable files and data
3: design and control flow Assignment 3; project design/data audit
4: presentation and robustness Meeting 4 pilot; project quality checklist
5: evaluate advanced methods Meeting 5 observation/reflection; project limitations
6: document and deploy Proposal, pilot, and final reproducible package

Submission schedule and documents

The default relative schedule is usable without semester dates. Assignment 1 is due before Meeting 2; Assignment 2 before Meeting 3; Assignment 3 and the proposal before Meeting 4; the pilot before Meeting 5; the final project 14 days after Meeting 5 at 23:59 Europe/Warsaw. The instructor posts the corresponding calendar dates and upload links before Meeting 1. Extension and reassessment arrangements follow the existing course rules above and any binding programme rules.

See assessment for all briefs and scoring, the student guide for preparation, and the project brief for the complete deliverable. In-class pair work is encouraged; graded work is individual, with borrowed code and assistance acknowledged. A classroom pilot uses synthetic or voluntary classmate test inputs and makes no scientific inference about a population.