neurolang-experiment

Human Behavioral Experiment

Phosphene pattern learning experiment comparing Symbol vs Pixel encoding.

Files

human_experiment/
├── generate_stimuli.py   # Export phosphene images from trained encoders
├── experiment.html       # jsPsych experiment (open in browser)
├── analyze_results.py    # Statistical analysis of collected data
├── stimuli/              # Generated phosphene images (after running generate_stimuli.py)
│   ├── symbol/           # Symbol-encoded patterns
│   ├── pixel/            # Pixel-encoded patterns
│   └── manifest.json     # Stimulus metadata
├── data/                 # Raw CSV data from participants
└── figures/              # Analysis output figures

Step 1: Generate Stimuli

Run on the server where trained models exist:

cd human_experiment
python3 generate_stimuli.py

This exports 200 phosphene images per condition (8 classes x 25 samples).

Step 2: Deploy Experiment

Option A - Local (simplest):

cd human_experiment
python3 -m http.server 8000
# Open browser: http://localhost:8000/experiment.html?condition=symbol&pid=P001

Option B - GitHub Pages (for remote participants):

  1. Push this folder to a GitHub repo
  2. Enable GitHub Pages in repo settings
  3. Share the URL with participants

Step 3: Run Participants

Each participant gets ONE link (between-subject design):

Assign participants randomly. Use odd PIDs for symbol, even for pixel (or any scheme).

Aim for 10-20 per group (20-40 total). Each session takes ~25 minutes.

After completion, participants download a CSV file automatically. Collect these files.

Step 4: Analyze

Put all CSV files in data/, then:

python analyze_results.py --data-dir data/

Outputs:

Attention Checks

The experiment includes:

Exclude participants with:

IRB Notes

This experiment requires ethics approval. Key points for your application: