A peristaltic, soft-bodied xy-sorting table manipulates objects by producing moving wave shapes on its surface. The waves exert forces on the objects which can be used for transportation, reorientation, and local repositioning. The control of such peristaltic robots is mostly unsolved, because important properties of the kinematics, dynamics, and effect of actuation are unknown. Fundamental and practical limitations in measuring the system state lead to numerical difficulties in the form of discontinuous signals in non-Euclidean spaces.To solve these problems, we introduce a probabilistic automaton that models the static and dynamic effect of actuation based on a discretized representation of the objects to be manipulated. The automaton only considers the qualitative input-output behavior of the system. It is therefore mostly independent of a particular hardware setup and controls the behavior of objects on the table without explicitly predicting mechanical forces.Our theoretical findings advance the field significantly: We show that the proposed class of automata is suited to model both static and dynamic movements. We introduce a cost function that enables the search and identification of optimal sequences of control patterns to bring the system into a desired state. We prove that the optimal control sequence can be found efficiently and give the respective algorithm.Note to Practitioners-This paper was motivated by the problem of sorting ovine offal in industrial meat processing. The slippery, delicate organs are difficult to handle and easily damaged by rigid robotic grippers. We therefore conceptualized a soft peristaltic xy-sorting table that allows for a compliant manipulation and repositioning of the organs as a preparatory step for onward processing. However, soft-bodied robots have not been used in industrial automation. The existing control methods aim at basic repetitive motions, mostly for self-locomotion and using open-loop control. The complex behaviors required for industrial manipulation tasks are difficult to control in soft-bodied robots. To solve this problem, this paper introduces a probabilistic automaton which allows for a modular approach by concatenating control primitives for basic actuation patterns. The selection of actuation patterns is based on sensor input about the state of the objects on the sorting table. We show how to find the optimum sequence of basic behaviors efficiently, even in the presence of noise and errors.