  Stochastic Nonlinear Optimal Control (SNOC) involves minimizing a cost
function that averages out the random uncertainties affecting the dynamics of
nonlinear systems. For tractability reasons, this problem is typically
addressed by minimizing an empirical cost, which represents the average cost
across a finite dataset of sampled disturbances. However, this approach raises
the challenge of quantifying the control performance against out-of-sample
uncertainties. Particularly, in scenarios where the training dataset is small,
SNOC policies are prone to overfitting, resulting in significant discrepancies
between the empirical cost and the true cost, i.e., the average SNOC cost
incurred during control deployment. Therefore, establishing generalization
bounds on the true cost is crucial for ensuring reliability in real-world
applications. In this paper, we introduce a novel approach that leverages
PAC-Bayes theory to provide rigorous generalization bounds for SNOC. Based on
these bounds, we propose a new method for designing optimal controllers,
offering a principled way to incorporate prior knowledge into the synthesis
process, which aids in improving the control policy and mitigating overfitting.
Furthermore, by leveraging recent parametrizations of stabilizing controllers
for nonlinear systems, our framework inherently ensures closed-loop stability.
The effectiveness of our proposed method in incorporating prior knowledge and
combating overfitting is shown by designing neural network controllers for
tasks in cooperative robotics.
