Adaptation of Formation According to Opponent Analysis Jaroslav ZAJAC Slovak University of Technology Faculty of Informatics and Information Technologies Ilkovičova 3, 842 16 Bratislava, Slovakia ka zajacjaro@orangemail.sk Abstract. The positional game is an important factor on the path of achieving good results in football. The ability to predict the behavior of the opponent can have a major role in making the correct decisions in a partially observable environment, like robotic football. This work proposes a new method of using the coach and formations, which has not been used in the world so far. The method analyzes the movement of opponents and recommends formation changes to our team. The coach recommends optimal positioning of his players on the playfield based on the statistical analysis of opponent players position. 1 Introduction Simulated soccer is a client-server multi-agent distributed system, in which the agents have limited methods of communication. The server handles the simulation of a virtual soccer field. 24 clients (2 teams), consisting of 10 players, a goalie and an online coach each, connect to the server to play a simulated soccer game. Each type of client has its own limitations. The limitations of players include a sight channel limitation. The player has a field of view (FOV), which never covers the whole playfield (thus partially observable environment). The server sends to the player only visual information about object in his FOV at a frequency depending on the quality and width of the FOV. Thus the player has usually too little information about his surroundings, which makes it difficult for him to determine a position for him, where he would be most beneficial to the team. Also, the sight channel is affected by noise generated by the server, which distorts the positional information about object in the players FOV. Supervisor: Ing. Marián Lekavý, Institute of Informatics and Software Engineering, Faculty of Informatics and Information Technologies STU in Bratislava M. Bieliková (Ed.), IIT.SRC 2005, April 27, 2005, pp. 22-26.
Adaptation of Formation According to Opponent Analysis 23 Various attempts have been made to reduce this limitation using the communication channel to send information about the surrounding objects and players to team members. However the communication channel is limited by a message length of 10 characters. Also the number of messages a player can receive per play cycle, which are 1 message from his teammates and 1 message from the opponent team, is limited. The purpose of the method proposed in this paper is to reduce the effects of the players sight and communication channel limitations by using one of the main online coach advantages: his sight channel covers the entire playfield, and it is not affected by noise. 2 The method The coach receives visual information about the entire playfield each play cycle. The positional information about the enemy team is collected. After a period of time the gathered information is being evaluated and an optimal formation is composed and sent to the team. The formation is assembled from sub-formations. For each part of the subformation a different criteria of determining the most appropriate sub-formation is used. 3 The modules There are two modules, which cooperate on the task of determining the optimal formation. The analyzer module named CoachAnalyzer and the Formation module. 3.1 CoachAnalyzer The CoachAnalyzer has its own interpretation of the playfield. It divides the playfield into sectors of 2x2 meters (the playfield dimensions are 105x68 meters, the remaining 1 meter is added to the last column of sectors), making a sector map of 52x34 sectors. This map of the playfield contains for each sector the number of cycles the coach has observed an enemy player in the given sector. Each play cycle the coach passes visual information gathered in the cycle to the CoachAnalyzer. The CoachAnalyzer analyses this information and increments the values of each sector containing an enemy player by 1 per enemy. The result after a period of time is a map containing relative amounts of time the enemy spent in each sector. After a period of time the CoachAnalyzer uses the data in the map to compute an optimal sub-formation for the defense and offence part of the sub-formation. The goal of the algorithm for finding the optimal attack formation is to find corridors from the centerline to the enemy goal line, which are least occupied by the enemy. For each possible sub-formation consisting of 3 to 6 players the algorithm sums the sector values of corridors with a width of 5 sectors (10 meters). The goal is to find the sub-formation with a minimal value of the sum (minimal resistance). After finding such sub-formation, this is then proposed to the coach.
24 Jaroslav Zajac The algorithm of finding the best defense sub-formation uses a different approach. Each sub-formation comes with a field coverage, which is computed externally (by the application UnitCreator, developed by Jaroslav Belluš, more information can be found at [6]) from the positions of players in the given subformation. The sector the player stands on has coverage of 1.0, the sector, which is 10 sectors away from the home sector (the one the player stands on according to the subformation), has coverage of 0.0. The sectors in-between have a linearly decreasing coverage. The algorithm looks for a maximum value of the sum (1), where, f(x, y) is the value of the sector x, y from the map created by the CoachAnalyzer, c(x, y) is the coverage of the sector x, y for the given sub-formation and offset is a value between 0 and 25 representing the offset in sectors of the defensive sub-formation from the home goal line (1 sector = 2 meters, thus the defensive sub-formation can cover any part of the defensive half of the playfield). 10 34 fitness = f ( i + offset, j) * c( i, j) (1) i= 0 j= 0 The sum is computed for each sub-formation and for each sub-formation offset. The result of the sum is then averaged to represent the average coverage per player in a sub-formation, so the algorithm doesn t overvalue large numbers of defensemen. The best sub-formation and its offset are then recommended to the coach, who includes it in the formation. The midfield part of the formation then consists of the rest of the players not assigned to either offence or defense, aligned in a line. This method uses the midfield part of the formation as a player stack, from which the offence and defense part take players into the respective sub-formations. 3.2 Formations The formation module is a result of cooperation with Jaroslav Belluš. It is based on the work of Ján Pidych [5], to which modifications have been made to better suit the dynamic formation generation and changes. In the previous version there have been some factors limiting the composition of formations from available sub-formations. Also the set of available sub-formations was inadequately implemented. The offset mentioned in the previous section has been added to the module. The hard coded formations have been removed and a sub-formation loading routine implemented to easily change the sub-formations available for composition via a configuration file generated by the UnitCreator. The mechanism of assigning roles to players in a formation, defining the style of play, needed to be rewritten to better suit the new features the formation module. The coverage of players in each sub-formation has been implemented. These changes were necessary for the CoachAnalyzer module to find an optimal formation composed of a defensive, center and offensive subformation.
4 Conclusions Adaptation of Formation According to Opponent Analysis 25 The method has been implemented on top of the team Stjupit Dox 2004 [3]. The method has been tested in a number of matches against the teams Stjupit Dox 2004, Leaky Cleats [1, 4] (Deravá Kopačka in Slovak), Glass [2] (Sklo in Slovak). The impact on the scoring is controversial. The results were varying from a 2:0 victory to a 1:3 loss. By closely examining the development of the matches a better understanding of the effects of this method can be seen. The reasons of a lack of a definite improvement in the scoring of the team can be found in the lower layers of the player, on top of which this method has been implemented. The main reasons are the inability of defensemen to get in possession of the ball even from a closely covered enemy player and the overall kick inaccuracy of the team, for which the reasons have not been found and are not the subject of this paper. The best observable results produced by this method are excellent coverage of enemy attackers by the defensive sub-formation, basically producing an implementation of personal defense, in which usually each defenseman is always near an enemy attacker. In the offensive part of the formation the method successfully chooses sub-formations exploiting weaknesses in the enemy defense. The best results are in situations, where the enemy team has the defense formed in front of the goal, while the wings are uncovered. The method correctly chooses a wide sub-formation, in which the wings are uncovered most of the time. A disadvantage of the current implementation of the algorithm recommending the optimal offense sub-formation doesn t take into account the distribution of players along the x axis of the playfield, thus all sub-formations with identical player counts and y coordinates of its players yield the same fitness, resulting in choosing the first found sub-formation, which usually is a line formation composed of n players. By refining this method, for example by dividing the formations into aggressive, defensive, neutral a more appropriate selection of sub-formations can be achieved. However the question has to be answered, which sub-formations can be categorized as aggressive. Those with the middle players in front of wingmen or the other way around? The same question has to be answered for neutral and defensive types. The devised method was fully implemented and tests showed that it improved the quality of players displacement policy. Because of the lower player logic, we were not able to achieve substantial score improvement, however the new formation algorithm was able to improve the game style and adapt to the opponent formation. Acknowledgement: This work was supported by Science and Technology Assistance Agency under the contract No. APVT-20-007104. References 1. Dirga, P. et al.: Deravá Kopačka Softvér. Bratislava, FEI STU, 2003, Team 2. Gorbatchev, S., et al.: RoboCup Simulácia robotického futbalu. 2004, Team
26 Jaroslav Zajac 3. Horváth, M., et al.: Robocup Vyššie schopnosti hráča. Bratislava, FEI STU, 2003, Team 4. Lekavý, M., et al.: Multiagent coordination in the domain of robotic soccer. In: ZNALOSTI 2005, Poster proceedings, 2005, pp. 65-68. 5. Pidych, J.: Diplomový projekt. Bratislava, FEI STU, 2002. 6. Zajac, J., et al.: Simulácia robotického futbalu. Bratislava, FIIT STU, 2005, Team