  The Laser Interferometer Gravitational-wave Observatory (LIGO) consists of
two identical yet independent, widely-separated, long-baseline
gravitational-wave detectors. Each Advanced LIGO detector consists of complex
optical-mechanical systems isolated from the ground by multiple layers of
active seismic isolation, all controlled by hundreds of fast, digital, feedback
control systems. This article describes a novel state machine-based automation
platform developed to handle the automation and supervisory control challenges
of these detectors. The platform, called \textit{Guardian}, consists of
distributed, independent, state machine automaton nodes organized
hierarchically for full detector control. User code is written in standard
Python and the platform is designed to facilitate the fast-paced development
process associated with commissioning the complicated Advanced LIGO
instruments. While developed specifically for the Advanced LIGO detectors,
Guardian is a generic state machine automation platform that is useful for
experimental control at all levels, from simple table-top setups to large-scale
multi-million dollar facilities.
