psychologyblog

Add a note

Matthias Mittner

What they did

Mittner documents a 60-90 minute session in which Claude Opus 4.5 in Cursor produced a 646-line PsychoPy N-back experiment with EyeLink eye-tracker integration for pupillometry. His workflow had four phases: Plan Mode report, careful plan review with follow-up prompts, implementation, and line-by-line code review. He provided a reference script from a previous experiment and a rough specifications file, and warns the script has had only cursory testing before going to the lab.

In their words

"It is still crucial to be fluent in the programming language as I would not have been able to spot some of the issues without intimate knowledge of both PsychoPy and Python."

"AI can help you be more productive in areas where you are already an expert but that it can lead you to superficial solutions and grave mistakes where you are not."

"Do not use the script as is!"

Lessons they draw

  • Supply a reference script with lab conventions; it was crucial for eye-tracker setup, logging and structure (Mittner).
  • Interventions he needed: multi-session counterbalancing the AI missed, trigger timing (waitKeys instead of polling would add timing error for pupillometry) and data-format conventions (Mittner).
  • Ask for a dummy mode and a short debug version so the agent can test itself (Mittner).
  • New researchers still need to learn the language and instruments, or they cannot spot the errors (Mittner).

Limits of this account

One experiment script, not yet validated on hardware; the post lists Claude as co-author, and the publication date is given only as "2026".

Search the collection

↑ ↓ move · Enter open · Shift+Enter original source · Esc close · Search index for agents

Keyboard shortcuts

Single keys work when you are not typing and no dialog is open. Turn them off if stray key presses move the page. ⌘K / Ctrl+K and Esc keep working.

/
Search the collection
⌘K / Ctrl+K
Open or close search
?
Show these shortcuts
h
Home
l
Lessons
a
Accounts
r
Replications
p
Papers
g
Guides and tools
d
Timeline
b
Bookmark the record you are reading (press again to remove it)
s
Your saved list and notes
← →
Previous and next record on an account, lesson, replication or paper page, and in a quick look
m
Switch between system, light and dark theme
t
Back to the top of the page
Open full page