LeftEagle Soccer 2D simulation Description Paper 2016
Ahmed Abdelhafiez, Ahmed Ehab, Ahmed Kamel, Haytham Breaka, Hossam Abdelrahman, Nouran Soliman, Omar Ali, Kareem Youssri
Arab Academy for Science and Technology, Egypt
https://sites.google.com/site/robocuplefteagle/
Abstract LeftEagle is a newly founded soccer 2D simulation team. The base code that LeftEagle uses is agent2d 3.1.1 and librcs 4.1.0. For creating new formations and debugging the matches, fedit2 and soccerwindow2 were used. This description paper discusses the improvements implemented by LeftEagle in dribbling, marking, actions' evaluation, formations and strategy. The main focus of LeftEagle was to improve the defensive mode and enhance the ball possession to decrease the probability of the opponents to score goals. The last section introduces LeftEagle's wiki, the first wiki supported in English to aid newbies in getting started with their development.
Introduction
LeftEagle's call for team started in December, 2015 leaving exactly 3 months for the whole coursework. Due to lack of English resources, LeftEagle's team members spent the first 2 months getting oriented with the competition rules and agent2d base [1] [2]. This left the team with a very time-restricted development period. As a result, LeftEagle directed its efforts to implement greedy algorithms leaving the machine learning algorithms as future improvements. The main focus of LeftEagle was to improve the defensive mode through implementing marking techniques and new formations. To reduce the number of goals by opponents, improvements were made to dribbling and chain action evaluation to enhance LeftEagle's ball possession. LeftEagle succeeded in reaching the desired performance in this very short time. LeftEagle aims to set the foundation base of the development of soccer 2D simulation in Egypt for the coming years. LeftEagle's team members have previous experiences in several programming and robotics competitions since high school: IOI, ACM ICPC, WRO, RoboCup Juniors and ROV. The team members achieved several national and international ranks in these competitions.
This paper describes LeftEagle's proposed solutions, testing, improvements and ineffective changes of each problem. The sections of the paper are divided as follows:
Section 1: Discusses the improvements of the basic actions
Section 2: Describes a number of hand-coded algorithms for marking opponents
Section 3: Introduces a new action-based evaluation to enhance the decision making depending on the region of the field
Section 4: Reviews a number of defensive formations to enhance the defensive strategy
Section 5: Introduces the future improvements of the team
Section 6: Concludes the TDP
Section 7: Introduces the English Wiki created by LeftEagle
Dribbling
In agent2d base, the dribbling action is generated as long as the nearest opponent is farther than a certain distance from the agent. After experimenting, this distance has proven to be very short which subjected the ball to constant interception. As a first solution, this distance was increased, however, this caused the agent to detect non-dangerous opponents behind it. Consequently, the agent checks the opponents with a large distance inside a certain angle range (the range around the dribbling angle) and with a short distance behind him (Fig.1). This has reduced the ball interception without considering the non-dangerous opponents.
Marking
LeftEagle was concerned about improving the defense of the base code as it is a very primitive one. Accordingly, LeftEagle implemented a man-to-man marking technique based on closest-pair matching algorithm.
The algorithm works once an opponent enters LeftEagle's half-side, where each opponent is marked with the nearest agent. The exact marking position was chosen experimentally. At first, the marking position for any opponent, but not the ball holder, was on an exact distance from the opponent on the ray that connects the opponent and the ball position (Fig.2), while the marking position of the ball holder was on an exact distance from the opponent and the center of the goal area (Fig.3). Later after some testing, it was proven to be more efficient to make the marking position on the ray between the opponent and the center of the goal area for all agents.
Practically, this was not the best solution. Exact positions on the ray were not effective in regions near the goal area. Accordingly, the optimum dynamic marking position equation was chosen experimentally to be the minimum of an absolute magic number and a percentage from the length of the ray.
Marking ball holder
The first situation is handled by improving the interception on the ball within the penalty area by sending one of the unmarking defense agents to specifically mark and intercept the ball holder anyway.
Marking nearest unmarked and dangerous opponent to goalie
The second situation is handled by detecting the nearest unmarked opponents to the goalie that are far from the crowd. The crowd is defined as the mean of the positions of the nearest opponents to the goalie (Fig.4).
Strategy and Formations
LeftEagle created 2 additional defensive formations (Fig.6) using fedit2 based on Delaunay triangulation to improve the protection actions during the game play. The formations are thought of in accordance to soccer tactics. Additional enhancements have been implemented after testing each formation with the marking algorithm against Helios 2015, WrightEagle 2015 and agent2d base. The testing stage aided us in modifying the positions of some agents to save as much stamina as possible.
Evaluation
Agent2d's evaluation is mainly based on the expected ball position [3]. However, after debugging several matches, this has proven to be inefficient in some situations when the agent does too much unnecessary dribbling which is a waste of stamina or when the agent is obstructed by opponents as its major focus is to reach a point closer to the opponent's goal only. LeftEagle's assumption is that sometimes it is better for the agent to pass or dribble the ball backwards (towards self-goal) to avoid ball interception by opponents. Accordingly, LeftEagle designed an action-based evaluation system combining the expected ball's position with various action variables. The actions' priorities are arranged in a certain order in every region of the field. The initial order of actions was based on soccer strategic planning and hand-coded rules. The order was then tuned by testing several matches against agent2d base, Helios 2015 binary and WrightEagle 2015 binary. The field is divided into 6 regions as mapped according to the evaluation value in Fig.7. The red colour indicates the highest evaluation which gradually shades down to black indicating least evaluation. Several combinations of the default agent2d evaluation and the new proposed evaluation were tested among different regions of the field by running 10 matches with Helios 2015, WrightEagle 2015 and agent2d base. The new action-based evaluation has increased the ball possession during the match which decreased the probability of offensive shots by opponents.
Future Plans
LeftEagle aims to implement several future improvements some of which are:
- Smart Offensive Positioning of agents to enhance the passing actions, thus, overcoming any obstruction by opponents.
- A more developed non-static evaluation function depending on the strategy and formations of the opponent team using learning algorithms.
All in all, LeftEagle team members are willing to learn and implement artificial intelligence and machine learning techniques.
Conclusion
LeftEagle has succeeded in achieving their goal in a 1-month period. A strong defense is implemented using marking techniques along with new formations. The ball possession is also improved through improving the evaluation function and the dribbling action. The table below shows the results after testing the final code against Helios 2015, WrightEagle 2015 and agent2d base. The average scored goals by the opponents have decreased after applying the improvements. The best results are 0:0 against Helios 2015, 4:1 against WrightEagle and 1:0 against agent2d. Currently, the weak points of our defensive strategy are due to the through passes and free kicks which allow the opponents to score most of the goals. LeftEagle is intending to handle these 2 cases in the future.
Results of testing against Helios 2015, WrightEagle 2015, and agent2d base
| Opponent Team Name | Team Name | M1 | M2 | M3 | M4 | M5 | Total Score | Average Scored goals by opp. | Best Score |
|---|---|---|---|---|---|---|---|---|---|
| Helios 2015 | LeftEagle | 3:0 | 2:0 | 0:0 | 2:0 | 6:0 | 13:0 | 2 | 0:0 |
| Agent2d base | 8:0 | 6:0 | 8:0 | 5:0 | 9:0 | 36:0 | 7 | 5:0 | |
| WrightEagle 2015 | LeftEagle | 4:0 | 10:0 | 4:0 | 10:0 | 4:1 | 32:0 | 6 | 4:1 |
| Agent2d base | 8:0 | 7:0 | 10:0 | 6:0 | 12:0 | 43:0 | 8 | 6:0 | |
| Agent2d base | LeftEagle | 1:0 | 3:0 | 3:0 | 2:0 | 2:0 | 11:0 | 2 | 1:0 |
LeftEagle's Wiki
LeftEagle has been building a wiki during the whole course work in order to be a good English resource for the coming teams. The wiki includes a brief review on agent2d base and its tools such as fedit and soccerwindow.
https://sites.google.com/site/robocuplefteagle/
Acknowledgements
LeftEagle would like to acknowledge Hidehisa Akiyama for agent2d [4], librcs [5], soccerwindow2 [6], and fedit2 [7] softwares.
Thanks to Maryam Karimi from Cyrus Soccer 2D team 2015 for her help in understanding the code
References
[1] Sven Behnke, Manuela Veloso, Arnoud Visser, Rong Xiong, RoboCup 2013: Robot World Cup XVII. [2] RoboCup Server Manual, online, available at: http://dangermouse.brynmawr.edu/pyrobot/tars/rcsoccersim.pdf, consulted on January 2016. [3] Hidehisa Akiyama, Hiroki Shimora, Tomoharu Nakashima, Yosuke Narimoto, Tomohiko Okayama, HELIOS2011 Team Description. [4] agent2d-3.1.1, 2012, online, avaliable at: http://pt.sourceforge.jp/projects/rctools/downloads/51943/agent2d-3.1.0.tar.gz/, consulted on February 2012. [5] librese-4.1.0, 2011, online, avaliable at: http://pt.sourceforge.jp/projects/rctools/downloads/51941/librcsc-4.1.0.tar.gz/, consulted on January 2016. [6] soccerwindow2-5.1.0, 2011, online, avaliable at: http://pt.sourceforge.jp/projects/rctools/downloads/51942/soccerwindow2-5.1.0.tar.gz/, consulted on January 2016. [7] fedit2-0.0.0, 2010, online, avaliable at: http://pt.sourceforge.jp/projects/rctools/downloads/48791/fedit2-0.0.0.tar.gz/, consulted on January 2016.