This page is still under construction! For a more detailed description, see the whitepaper, particularly “Program Structure”


Program Structure

Graphical Overview of Autopilot Modules

Autopilot performs experiments by distributing them over a network of desktop computers and Raspberry Pis. Each Computer or Pi runs an Autopilot agent, like the user-facing Terminal or a Raspberry Pi Pilot .

The Terminal agent provides a gui to operate the system, manage Subject s and experimental protocols, and plots for visualizing data from ongoing experiments.

Each Terminal manages a swarm of Pilot s that actually perform the experiments. Each Pilot coordinates hardware and stim uli in a Task. Pilot s can, in turn, coordinate their own swarm of networked Children that can manage additional hardware components – allowing Task s to use effectively arbitrary numbers and combinations of hardware.


Protocol Structure

Behavioral experiments in Autopilot consist of Task s. Tasks define the parameters, coordinate the hardware, and perform the logic of an experiment.

Tasks may consist of one or multiple stages, completion of which constitutes a trial. Stages are analogous to states in a finite-state machine, but don’t share their limitations: Tasks can use arbitrary transitions between stages and have computation or hardware operation persist between stages.

Multiple Tasks can be combined to make protocols, in which subjects move between different tasks according to graduation criteria like accuracy or number of trials. Protocols can thus be used to automate shaping routines that introduce a subject to the experimental apparatus and task structure.

For more details on tasks, see the guide for writing tasks

Module Tour

Autopilot is intended to be used as a toolkit where you can pick and choose which parts of it you want to use for your experiments. Most of the documentation is thus contained in the API-level documentation, though we attempt to keep that as friendly and readable as we can.

  • Terminal - user facing agent class used to control and configure program operation.

  • pilot - Experimental agent that runs tasks on Raspberry Pis

  • data - Data modeling, storage, and interfaces to external formats

  • gui - GUI classes built with PySide2/Qt5 used by the terminal. Plots, menus, and widgets!

  • hardware - Hardware objects that can be used both independently and as part of Tasks

  • networking - Networking modules used for communication between agents, tasks, and hardware objects

  • setup - Setting up and configuring Autopilot and the system it runs on

  • stim - Stimulus generation & presentation, of which sound is currently the most heavily developed

  • tasks - Tasks implement experimental logic, coordinating hardware and data to perform an experiment!

  • transform - Composable data transformations, for analyzing or converting data on the fly for use within a task, as well as implementations of common algorithms and procedures used in experiments.

  • utils - Utility functions, most of which are either basic functions used everywhere, or modules that are placeholders until they can split off into their own more formal organization

    • utils.common - Common operations used across multiple modules

    • utils.decorators - Decorators and mixins that augment the functionality of other Autopilot Objects

    • utils.hydration - Utilities for making serializable versions of autopilot objects that can be recreated in other processes/agents

    • utils.log_parsers - Tools to analyze logs, load them into memory to be able to extract information for better debugging

    • utils.loggers - The main logging facility used by nearly all autopilot objects to coordinate stdout and logs written to disk

    • utils.plugins - Functions for loading plugins

    • utils.registry - the autopilot.get() functions that return autopilot objects from both the main library and plugins

    • - Tools to integrate the Autopilot Wiki with the software