  The effectiveness of collective navigation of biological or artificial agents
requires to accommodate for contrasting requirements, such as staying in a
group while avoiding close encounters and at the same time limiting the energy
expenditure for manoeuvring. Here, we address this problem by considering a
system of active Brownian particles in a finite two-dimensional domain and ask
what is the control that realizes the optimal tradeoff between collision
avoidance and control expenditure. We couch this problem in the language of
optimal stochastic control theory and by means of a mean-field game approach we
derive an analytic mean-field solution, characterized by a second-order phase
transition in the alignment order parameter. We find that a mean-field version
of a classical model for collective motion based on alignment interactions
(Vicsek model) performs remarkably close to the optimal control. Our results
substantiate the view that observed group behaviors may be explained as the
result of optimizing multiple objectives and offer a theoretical ground for
biomimetic algorithms used for artificial agents.
