Accidental or deliberate disruption of the coordination function in a multi-agent system has been discussed and referred to in the social sciences literature as leader decapitation; this paper outlines a methodology for making multi-agent networks resilient to this type of failure, enabling a timely restoration of operation normalcy by leveraging machine learning techniques. The approach involves endowing the agents with a cascade of independent learning modules that enable them to discover over time their role in the overall system coordinating strategy, so that they are able to autonomously implement it when central coordination seizes to function. Through these machine learning algorithms, the agents incrementally identify the overall system's task specification and simultaneously optimize their strategy to serve the common goal.