Task Examples (Bpod)

Tasks whose trials are run by a Bpod state machine (BEHAVIOR_CONTROLLER set to BPOD). Each page shows the state machine diagram of the task.

Training stages: Follow the Light

Follow the Light is a two-alternative forced choice (2AFC) task: the animal has to poke the side port that lights up first. It is learned in six stages, from habituation to the final task, where the second side light turns on after a delay that gets shorter (and harder) as the animal improves. The six tasks of the training protocol, in order:

File

What it shows

bpod_1_habituation.py

Habituation to the box: one 60-second state per trial; pokes are only registered, no reward.

bpod_2_passive.py

Passive learning: water is delivered as a side LED turns on, and then the animal is expected to poke that port.

bpod_3_active.py

Active learning: a side LED turns on, and water is delivered only after poking that port.

bpod_4_center_initiated.py

The animal starts each trial with a center poke; then only the lit side port is rewarded.

bpod_5_introduce_penalty.py

Like bpod_4_center_initiated, but a wrong-side poke gives a penalty sound and a time-out.

bpod_6_delay.py

Poke the side that lights up first; the other side lights up after a random delay, which adapts to the animal’s performance.

Calibrations they need (see Water Calibration and Sound Calibration):

  • Stages 2 to 6: water, for ports 1 and 3.

  • Stages 5 and 6: also the tone_600 sound, for speaker 0 (left) at 70 dB: the penalty tone.

Other tasks, demos and tools

Not part of the training progression: they are run manually.

File

What it shows

bpod_area2_sound.py

Driven by the box camera: entering box area 2 plays a sound and delivers water, through a Bpod softcode.

bpod_touchscreen.py

Touchscreen task: touching the rectangle that stays on screen gives water; touching the one that disappears sooner doesn’t.

bpod_global_timer.py

Demo, not a training task: a Bpod global timer bounding the whole trial.

bpod_outputs_and_events.py

Demo, not a training task: the Bpod primitives step by step — LEDs, valves, softcodes, TTL outputs and inputs.

bpod_purge_ports.py

Maintenance tool, not a training task: each valve stays open while its port is poked, to flush the water lines.

Calibrations they need:

  • bpod_area2_sound: water, for port 1, and the whitenoise sound, for both speakers at 70 dB.

  • bpod_touchscreen: water, for port 2.