Mobile agent formation control is an important issue for the collective of robots . Especially when they move independently without human oversight, controlling the movement and forming a collective of agents is a critical and challenging task. In this work, we propose a method for applying the training algorithm to assist the formation of groups of agents in a leader scenario. To exercise control through supportive learning, we present the problem of formation as a Markov decision-making process. This allows us to use deep reinforcement learning to obtain the law of leadership of the successor leader. The feasibility and effectiveness of this control approach is tested in simulation.