Abstract: Fluids pervade complex systems, ranging from fish schools, to bacterial colonies and nanoparticles in drug delivery. Despite its importance, little is known about the role of fluid mechanics in such applications. Is schooling the result of vortex dynamics synthesized by individual fish wakes or the result of behavioral traits? Is fish schooling energetically favorable? I will present multifidelity computational studies of collective swimming in 2D and 3D flows. Our studies demonstrate that classical models of collective swimming (like the Reynolds model) fail to maintain coherence in the presence of long-range hydrodynamic interactions. We demonstrate in turn that collective swimming can be achieved through reinforcement learning. We extend these studies to 2D and 3D viscous flows governed by the Navier Stokes equations. We examine various hydrodynamic benefits with a progressive increase of the school size and demonstrate the importance of controlling the vorticity field generated by up to 300 synchronized swimmers.