Adaptive quantum optimization algorithms for programmable atom-cavity systems | Synapse