Abstract
Controlling stochastic temporal networks remains an open challenge in control theory. While predictable temporal networks with known future dynamics enhance controllability, real-world networks often exhibit stochasticity and unpredictability, making control harder. Here, we investigate control mechanisms for stochastic temporal networks by analyzing how biological controllers, such as shepherd dogs, manage panicked flocks of sheep. We study a century-old shepherding competition, the sheepdog trials, where small groups of sheep unpredictably switch between fleeing and following behaviors, effectively forming stochastic temporal networks. Unlike large, cohesive flocks, these small, indecisive flocks are difficult to control, yet skilled dog-handler teams excel at both herding and splitting them (shedding) on demand. Using a stochastic choice model to describe the sheep's behavioral shifts, we show that trained dogs exploit indecisiveness, typically seen as an obstacle, as a control tool, enabling both herding and splitting of noisy groups of sheep. Building on these insights, we develop the Indecisive Swarm Algorithm (ISA) for artificial agents and benchmark its performance against standard approaches, including the Averaging-Based Swarm Algorithm (ASA) and the Leader-Follower Swarm Algorithm (LFSA). ISA minimizes control energy in trajectory-following tasks and outperforms alternatives under noisy conditions. Framed within a stochastic temporal network perspective, we show that synchronizing network restructuring with state updates ([Formula: see text]) minimizes control energy for trajectory following tasks even without knowledge of future topology. These findings establish a framework for managing stochastic temporal networks with applications in noisy, indecisive animal collectives, swarm robotics, and opinion dynamics.