Shiraz Soccer 2D Simulation Team Description Paper 2016
Ehsan Asali, Mojtaba Valipour, Ardavan Afshar, Omid Asali, MohammadReza Katebzadeh, Saeed Tafazol, Alireza Moravej, Suhair Salehi, Hosain Karami, Mahsa Mohammadi
Department of Computer Engineering and Information Technology, Shiraz University, Shiraz, Fars, Iran; Shiraz Students Cooperation Office, Shiraz, Fars, Iran; Ghazal High School, Shiraz, Fars, Iran
Abstract This article briefly describes algorithms, methods and goals in Shiraz Soccer 2D Simulation team and presents an overview of its agents actions and decisions capabilities. In this paper, we represent some novel approaches which we implemented in Shiraz Soccer Simulation 2D team since its establishment. We worked on goalie movement decision making, players offensive strategies and actions, coach match analysis, intelligent opponent formation detection and a useful software for running multiple automatic games. The base code that Shiraz used is agent2d-3.1.1. technical paper, Shiraz, soccer 2D simulation, offense positioning, intelligent formation detection, automatic games, game analysis.
1 Introduction
Shiraz RoboCup team has formed by students of Shiraz University recently. This team is a combination of some members of two previous powerful teams in World Cup and Iran Open competitions (Cyrus and Genius) and also a few students of Artificial Intelligence and Information Technology fields in Shiraz University. Leader of the team was a active member of Cyrus 2D team and participated in many competitions since spring 2012. He achieved $1^{st}$ place in Iran Open 2014, $5^{th}$ place in World Cup Brazil 2014, $8^{th}$ place in World Cup Netherlands 2013, $9^{th}$ place in World Cup China 2015, $1^{st}$ place in Kordestan 2013 and so on. He was also a members of soccer2D league technical committee of Kazeroon Robotic Competitions 2015. Moreover, Two of the members of this team participated in the soccer2D competitions like Iran Open 2015 and Kazeroon Robotic Competitions 2015. One of them could also participate in World Cup China 2015 competitions and achieved $11^{th}$ place between accepted teams as the leader of Genius 2D 2015 soccer2D team. The goal of our new established team is to increase the level of knowledge, advance the achievement of the RoboCup competitions' objectives and intelligent learning and using artificial intelligence in RoboCup.
In the following, first Marking strategies will be discussed, and then our offensive and goalie positioning features and parameters will be demonstrated. Then we will introduce our Opponent Formation Detection System and Coach Match Analysis. Eventually, properties and aims of our proposed automatic match holding software will be expressed.
2 Offensive positioning
Winning a game has two sides. First and foremost, preventing the opponent to score any goal and on the other hand, trying to score a goal for ourselves. In mark and block sections we described our strategies that put our rival in trouble to score. Now we change the direction to our offensive strategy which is "Offensive Positioning". Here we have two types of positioning that will be chosen due to the state of the match. Next two subsections explain these methods.
2.1 Escape
This part is designed to guide our offenders to escape from offside line and also by using this function, our offenders strive to put themselves in a decent and proper position so as to make opportunity to receive a pass and score. Strikers walk near the offside line and wait for a long appropriate through pass to create a one-one situation by opponent's goalie.
2.2 Unmark
Our "Escape" method cannot overcome high pressure situations in which we are marked by opponent players. Accordingly, it is required to utilize a different way to find an empty and proper place to locate. Here we used the idea of "Center of Mass" of multi-dimensional points. Clearly, if we consider opponent players as vertexes of polygons, we can easily find the center of mass of them. The biggest problem to solve for us is to find a better way to find the best polygon. We are still working on this part and we hope to finish it before the competitions. The most important and fundamental feature of center of mass is that it is adequately far away from vertexes who are opponents. The below formula shows how we calculate the center of mass generally. m is the weight of each point that we consider this wight for all opponents the same for more simplicity. An example of ideal Unmark target during the match is depicted in figure.
$$X_{CM} = \frac{m_1 X_1 + m_2 X_2 + \dots}{m_1 + m_2 + \dots}$$
$$Y_{CM} = \frac{m_1 Y_1 + m_2 Y_2 + \dots}{m_1 + m_2 + \dots}$$
3 Goalie decision making
Coordination between goalie and players plays a key role in each successful team. Consequently, our goalie tries to match himself to the state of the game. We defined various states and conditions that consider the number of opponents and teammates in a supposed danger area which shooting the ball is potential. The Goalie's decision tree is depicted in Figure . Moreover, current position of the ball, its distance from our goal and its angle to our goal are some of the other effective parameters for decision-making. Goalie looks for the most matching state with predefined states and eventually decides where to go based on the state's instructions.
4 Opponent Formation Detection System
It is of paramount importance to detect the formation of opponents so as to perform the best response and pick the best formation to defeat the detected one. In order to distinguish the opponent's formation, at first, we divided the field into 21*17 grids (each grid has the length of 5 and width of 4). Then, vertices of these grids were being used as target points which we put the ball and get the x coordinate of ball and players as training and test data set inputs. Consequently, each formation can generate a maximum number of 396 samples and each sample consists of 11 features(x coordinates of opponent players and ball). In order to generate training and test data sets, formations of some famous and credible teams of Soccer 2D Simulation League are being used. These teams are AUT, Axiom, Agent2d version 3, csuyunlu, gduttiji, Gliders, gpr2d, HELIOS, Perspolis, Riton and YuShan. The number of total, train, validation and test data sets are being shown in Table 1.
Table 1. The Amount and Percentage of Data Set
| Data set | Total | Train | Validation | Test |
|---|---|---|---|---|
| Amount | 7551 | 5285 | 1133 | 1133 |
| Percentage | 70% | 70% | 15% | 15% |
It is important to notice that this table is just used for offline learning and another data set is generated with the amount of 4752 samples for test. The
Table 2. The relation between formations and classes
| Class Label | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Formation 361 352 343 451 442 433 424 415 541 532 523 613 |
last data set is created using 12 different formations with 15 static points. These formations are being shown in table 2. Each formation has three layers in which layer one (left number) is the number of Defenders, layer two (middle number) is the number of Midfielders and layer three (right number) is the number of offenders. We assumed that none of these layers can be zero and also as it is obvious in Table 2, to simplify the outputs, formations with more or less than three layers are not used in our data set.
4.1 OFDS Method
Various machine learning algorithms are utilized to analyze and find opponent formation. K Nearest Neighbor, an extended version of svm and neural network was used. knn is a lazy learning algorithm and it is one of the simplest algorithms in machine learning. The support vector machine is a learning algorithm for twogroup classification problems and is based on the idea that input vectors are nonlinearly mapped to a very high-dimension feature space. Because the problem here is multi-class, an extended version of original svm was used. Various kernel functions like Linear, Polynomial and RBF are applied to compare and evaluate the performance of different algorithms so as to choose the best one. Three different learning algorithm was used to train the neural networks. Lavenberg-Marquardt, Bayesian Regularization and Scaled Conjugate Gradient utilized in this paper as a network training functions.
5 Coach Match Analysis
Each team needs an adequate knowledge of itself and its opponents and there have been using various methods which can help to do that. We denominated our approach CMA(Coach Match Analysis) which means that we exploit coach to consider the match and extract some information from it. By transforming diverse simple events of the game (such as kicking the ball) to a meaningful knowledge (such as a pass or dribble), it would be possible to have an appropriate statistical data of the match. In fact, by using coach as a fully observable agent, we analyze players actions. These information include the number of goals, shoots, passes, saves(by goalkeepers), tackles, fouls, yellow cards, corner kicks, kick ins and goal kicks. Ball possession, pass accuracy and relative ball possession in each part of the field are other information that can be inferred from this analyzer. These information can be utilized in future to help coach agent to change team's strategy.
6 Automatic Match Holding Software
Running more than one match in the current Soccer 2D server in an automatic manner is not supported in it yet. Accordingly, our team members made a software using Python which has the goal of holding Soccer 2D Simulation games automatically.
By receiving a configuration file which contains number of the teams and matches between them and some other initialization parameters, it saves them all in JSON format and then runs server and monitor and saves the games according to the configuration file. Eventually it returns and maintains the result and log-file of each game in a proper place. We modified soccer server so that it will save some necessary information of each game in a JSON file to use them further. After finishing each game, the software runs the next game according to the mode of the tournament that can be Cup or League. If the mode be Cup, the champion of the cup would be announced finally, and if its mode be League, league table would be depicted at the end of the competition. The application can hold combined or ordered competitions too. Our next target is to make it open source for all participants, dedicate a powerful server and make it on-line for participants of Soccer Simulation 2D League so as to help them take tests faster or to hold on-line leagues. Moreover, we want to add a Log-file Analysis to the software to help users get more information about each match.
7 Conclusion
In this description paper we introduced Shiraz soccer 2D simulation offense, goalie positioning strategies, support software and analyzers and also an AIbased algorithm that detects opponent's formation. Having a good decision system for defense and offense is fundamental and we tried to fill the gap of the base in this parts at first. Moreover, our goalie is also coordinated with our defense and offensive strategies so as to maximize the performance of the whole team. We worked on some useful and powerful software and AI approaches and we are still working on more AI based algorithms to make agents more intelligent and autonomous.
References
- N.Zare, M.karimi, A.Keshavarzi, E.Asali, H.Alipoor, A.Aminian, E.Beheshtian, H.Mola, H.Jafari, M.J.Khademian, CYRUS Soccer 2D Simulation Team Description Paper 2015, The 19th annual RoboCup International Symposium, China, Hefei, 2015.
- R.Khayami, N.Zare, M.karimi, P.Mahor, F.Tekrar, E.Asali, A.Keshavarzi, A.Afshar, M.Asadi, M.Najafi, CYRUS 2D Simulation Team Description Paper 2014, The 18th annual RoboCup International Symposium, Brazil, Joao Pessoa, 2014.
- R.Khayami, N.Zare, H.Zolanvar, M.karimi, P.Mahor, F.Tekara, E.Asali, M.Fatehi, Cyrus Soccer 2D Simulation Team Description Paper 2013, The 17th annual RoboCup International Symposium, The Netherlands, Eindhoven, July 1, 2013.
- O.Asali, S.Tafazol, M.H.Salimi, A.Alavi, A.H.Shokrane, Genius Soccer 2D Simulation Team Description Paper 2015, The 19th annual RoboCup International Symposium, China, Hefei, 2015.
- S.Marian, D.Luca, B.Sarac, O.Contarlea, Oxsy 2014 Team Description,The 18th annual RoboCup International Symposium, Brazil, Joao Pessoa, 2014.
- S. Pourmehr and C. Dadkhah, RoboCup 2011: Robot Soccer World Cup XV. Berlin, Heidelberg: Springer Berlin Heidelberg, 2012, ch. An Overview on Opponent Modeling in RoboCup Soccer Simulation 2D, pp. 402414.
- S. Haykin, Neural Networks: A Comprehensive Foundation, 2nd ed. Upper Saddle River, NJ, USA: Prentice Hall PTR, 1998.
- B. Faria, L. Reis, N. Lau, and G. Castillo, Machine learning algorithms applied to the classification of robotic soccer formations and opponent teams, in Cybernetics and Intelligent Systems (CIS), 2010 IEEE Conference on , June 2010, pp. 344349.
- H. Akiyama, S. Aramaki, and T. Nakashima, Team formation estimation using cluster analysis and triangulation model, in Soft Computing and Intelligent Systems (SCIS) and 13th International Symposium on Advanced Intelligent Systems (ISIS), 2012 Joint 6th International Conference on, Nov 2012, pp. 956959.
- T. Nakashima, T. Uenishi, and Y. Narimoto, Off-line learning of soccer formations from game logs, in World Automation Congress (WAC), 2010, Sept 2010, pp. 16.
- M. F. Mller, A scaled conjugate gradient algorithm for fast supervised learning, NEURAL NETWORKS, vol. 6, no. 4, pp. 525533, 1993.
- K. Tatsumi, M. Akao, R. Kawachi, and T. Tanino, Performance evaluation of multiobjective multiclass support vector machines maximizing geometric margins, Numerical Algebra, Control and Optimization, vol. 1, no. 1, pp. 151169, 2011.
- C.-W. Hsu and C.-J. Lin, A comparison of methods for multiclass support vector machines, Neural Networks, IEEE Transactions on, vol. 13, no. 2, pp. 415425, Mar 2002.
- C. Cortes and V. Vapnik, Support-vector networks, Machine Learning, vol. 20, no. 3, pp. 273297.
- Akiyama, H.: Agent2D Base Code. http://www.rctools.sourceforge.jp (2010).
- HELIOS2010 Team Description. In: RoboCup 2010: Robot Soccer World Cup XIV. Volume 6556 of Lecture Notes in Computer Science., Springer (2011).
- Prokopenko, M., Obst, O., Wang, P., Budden, D., Cli, O.: Gliders2013: Tactical analysis with information dynamics. In: RoboCup 2013 Symposium and Competitions: Team Description Papers, Eindhoven, The Netherlands, June 2013. (2013).
- A. Afshar, B. Ashenagar, N. Eghlidi, M. Jahromi, and A. Hamzeh, Using local utility maximization to detect social networks communities, in Computer Science and Software Engineering (CSSE), 2015International Symposium on, Aug 2015, pp. 18.
- B. Ashenagar, N. F. Eghlidi, A. Afshar, and A. Hamzeh, "Team formation in social networks based on local distance metric," in 12th International Conference on Fuzzy Systems and Knowledge Discovery, FSKD 2015, Zhangjiajie, China, August 15-17, 2015, pp. 946-952. [Online]. Available:http://dx.doi.org/10.1109/FSDK.2015.7382071.