  Hybrid systems are a compact and natural mechanism with which to address
problems in robotics. This work introduces an approach to learning hybrid
systems from demonstrations, with an emphasis on extracting models that are
explicitly verifiable and easily interpreted by robot operators. We fit a
sequence of controllers using sequential importance sampling under a generative
switching proportional controller task model. Here, we parameterise controllers
using a proportional gain and a visually verifiable joint angle goal. Inference
under this model is challenging, but we address this by introducing an
attribution prior extracted from a neural end-to-end visuomotor control model.
Given the sequence of controllers comprising a task, we simplify the trace
using grammar parsing strategies, taking advantage of the sequence
compositionality, before grounding the controllers by training perception
networks to predict goals given images. Using this approach, we are
successfully able to induce a program for a visuomotor reaching task involving
loops and conditionals from a single demonstration and a neural end-to-end
model. In addition, we are able to discover the program used for a tower
building task. We argue that computer program-like control systems are more
interpretable than alternative end-to-end learning approaches, and that hybrid
systems inherently allow for better generalisation across task configurations.
