The problem raised in the application of particle swarm (agent) is forming a clearly defined formation in the area around the centroid or in another word how to realize a formation defined before. One method that has been used is Artificial Neural Network Self Organizing Map (ANN-SOM). However, this method has the disadvantage of being inadequate on forming a formation, especially in a pipe obstruction formations. This research proposed a new method of forming a formation using ANN-SOM with 2-leveled strategy, that is offline and online strategy. Initial position of all agents is regulated according to certain rules. The shape of the destination formation has been determined and the final position of each agent is known. ANN-SOM will provide movement sequences for each agent. An offline strategy is done to plan the path (path planning) and the final position from each agent based on the minimum mileage accumulation criteria of all agents. Then online strategy is executed by following the path (path tracking) and the final position that has been planned. Experiments by simulation are carried out using various combinations of desired formations in a given 2D space and proving the superiority of the proposed method. From this experiment, it provides results that indicate that the agent successfully formed the formation as desired with the total distance traveled by all agents is minimum.