Rutter

Constrained-optimization planning for multi-probe insertions

Placing six or more Neuropixels probes in one mouse is a packing problem. Each probe has to pass through an implant bore and stay inside the brain. It also has to reach as much of its target structure as possible without colliding with the other probes, their manipulators, or the rig. Planning by hand takes hours per animal and rarely finds the best plan.

3-D render of colored manipulator and probe meshes converging on a translucent mouse skull and implant, with target brain structures highlighted.
A multi-probe plan, with manipulators and implant rendered from their real CAD meshes.

Rutter has two parts that share one runtime:

  • An interactive planner in the browser (trame/PyVista), with live collision checking against real hardware meshes and atlas overlays in each animal’s MRI space.
  • An offline solver. It enumerates assignments of probes to manipulator arcs and implant bores, scores them all at once with a batched JAX relaxation on the GPU, and solves the most promising exactly with IPOPT under hard constraints. It then checks survivors against exact mesh collisions and returns a ranked, diverse set of plans. It can also plan a series of sessions in the same animal.

It builds on aind-mri-utils, my library for rig calibration, arc-angle conversion and MRI-space geometry.