Hades2D soccer2D simulation Team Description
paperFatemeh Akhondi1 , Sama Esmaelifar1 , Sana Esmaelifar1 , Seyedeh RahaRokni1 , Adrina Rajabi1 , and Ghazal Hasanpour2
1Farzanegan 5 Middle School, Aghaghia St., West Eyvanak Blvd., Tehran, Iran2
University of Tehran, Tehran Province, Tehran, Enqelab Square
fatemeh.akhondi35@gmail.com, samaesmaelifar@gmail.com,
sanaesmaelifar@gmail.com, raharokni1385@gmail.com, adrianarajabi@gmail.com

Abstract. This article contains descriptions of the activities of the Hades2Dsoccer 2D simulation team. This year, our team tried to increase the accuracy of both defense and offense strategies. So we developed our ideas bydesigning and developing algorithms. Here are some of these algorithms
and solutions.
Keywords: Robocup · Soccer 2D simulation · Conditional decision ·Machine learning .

1

Introduction

Hades2D soccer simulation team was founded 2 years ago. Our group operated
under the name ANDROMEDA, but the name of the group was changed due tosome issues. We started coding on staterAgent [1] and developed the base code.
Hades2D team participated in the IranOpen2020 and JapanOpen2020. Recently,Hades2D team participated in the JuniorCup2021and took second place.

2Related work

Now we are going to check articles published by other 2D teams. HELIOS employed an action sequence planning framework as well as a knowledge-sharing
system to further optimize its use [2]. Cyrus2D used Deep Reinforcement Learning for defense Decision Making [3]. FRA-UNIted has integrated TensorFlow
into their agent [4]. Razi formed a rating system in chain action [5]. Namirateam worked on Tournament Planning and Analyzing Software and CDDMS
Method [6]. Nexus has implemented Reinforcement Learning for decision making
in the penalty area [7]. The ideas mentioned in this papers helped us improving
our implementations and strategies.

2

Fatemeh Akhondi et al.

3

Defense

3.1

MarkFirst approach To implement this defense strategy, we divided it into twoparts: decision and act.
In the decision part, we assign the players to different roles. In dangerous
situations on our goal, we cover the defenseless areas of the goal by two extraplayers. After making the goal safe, the players analyze the distance of opponents
from our goal and congestion of teammates around them to rate how dangerous
they can be. Then, by recognizing opponents who can be risky for us, the nearest
teammates mark them one by one.
In the acting part, any of the players chosen to block the goal stand near theopponent towards the goal. You can see how the players take place in Fig.1.

Fig. 1. In this image, you can see the defense formation.

Second approach In this strategy, the defense of our players depends on fivefactors. These factors include:
1. Position of our players
2. Position of opponent players
3. Position of goalie
4. Unum of players
5. Ball position
We have defined different layers of decision for our players to be qualified
and be able to find the accurate position for stopping the opponent. Our players
Based on the factors we have determined, choose the best opponent player forthemselves, and then enter the decision circle to pick out the best position.
All possibilities in how to defend:

Hades2D soccer2D simulation Team Description paper3

If our selected player was in the penalty area, our player covers the opponent.
We draw a hypothetical line between our elected player and the top, the bottom,
and the middle of our goal. We collect one of the points of the gate and drawa hypothetical line between the elected player and the Empty part of the gate.
We go to the opponent tackle area on this line.
If our elected player was in our half and wasn’t in the penalty area. Our teamis on defense: we draw a hypothetical line between the selected player and theEmpty part of the gate. Then our players divided the distance into ten parts.
We choose the closest situation to the collect player for our player position.
If our elected player was in the opponent half and our team was on defense:
we draw a hypothetical line between the selected player and ball. Then we divide
the distance into ten parts. We choose the closest part to the elected player forour player position. But for the two last circumstances, if our player Unum equals
2, 3, 4, 5, they don’t do it. They go to the positions we defined for them. We
showed how these four players stand in this position in Fig.2.

Fig. 2. How the 2,3,4,5 players get in their positions in our penalty area when theselected player is outside of it .

3.2

Block

Hades2D team has methods for both the ball holder and the other opponents.
The defense strategy for the opponent’s ball holder is called a block. The act ofblock involves legal movements in which one player obstructs another player’s
path with their body. We try to bring the closest player to the kickable opponent
to implement this.
So each player considers the position of the players and finds our closest
player to the ball holder opponent. Then it measures the position of the twoplayers relative to each other and specifies the best possible place to block.

4

Fatemeh Akhondi et al.

4offense

4.1

Shoot

To catch more scores in matches, we decided to improve the shoot action. To
do this, we implemented a method that generates points at the opponent’s goalfrom top to bottom. You can see the different paths the player considers in Fig.3.
The player rates the points by assigning a value to each of them. The value
is calculated by predicting the chance of the nearest opponent catching the ballon the way to the goal.
Finally, if any of the points had an adequate score, the player shoots towards
it with adjusted energy.

Fig. 3. As you see in the image above the ball holder is generating points to find thebest shoot target.

4.2

Decision change

To sync offense strategy action and decision, we changed the priority of action
selection. Before this, the players passed the ball many times around the penalty

Hades2D soccer2D simulation Team Description paper

5area due to not finding a point safe enough, leading to losing the ball possession.
You can see the results and improvements analyzed by Autotest [8]in the tablebelow.

Table 1. The AutoTest result in 100 games.
Name
Hades2D base code
Goals
867
15
Points300
0
Avg Goals 8.67
0.15
Avg Points 3.00
0.00

4.3

Pass

As the pass is one of the main actions in offense strategy, we decided to improve
the act by solving the existing algorithm’s challenges. In the next sections, weare going to discuss the challenges.

Challenges for the pass receiver As the team formation is strictly based on
the ball position during the game, in some situations there is more than one close
player to the ball. As all the near players go for the ball simultaneously, there
will be a collision instead of getting ball possession. To fix this we implemented
a method that makes a list of players sorted based on proximity and the type ofpass they can receive. Ultimately the best player will be selected from the list
to move forward and receive the ball. In Fig.4, predict the following few cycles,
and in Fig 5, player number 9 is in the correct position.

6

Fatemeh Akhondi et al.

Fig. 4. As you can see a red line is showing the ball’s predicted path.

Fig. 5. In this figure, player 9 caught the ball in the predicted spot

Challenges for the passer When the ball holder decides to pass the ball,there will be lots of choices to make. To make the best decision the player needsHades2D soccer2D simulation Team Description paper

7

to categorize the choices based on their types. One way of grouping can be likethis:
1 - One-on-one with opponent’s goalkeeper
2 - Raise the percentage of ownership by safe short passes
3 - Play and rotate the ball on the ground to create a goal opportunity bylong passes
To select the best point to pass, the player runs an evaluation for each point.
This evaluation is based on some factors such as:+ Number of opponents near the player+ The closest teammate+ Position of teammates
After the evaluation, the player will pick the point with the highest score as
the best target.
In Fig.6, you can see how this algorithm works:

Fig. 6. In this image, player number 7 considers its teammates and passes paths topick the best one.

4.4

DribbleIn this task, we aimed to improve the dribble act by predicting the next actions.
The main target in the game is to create a situation in which the player will beable to shoot the ball inside the opponent’s goal. So, as the player approaches
the opponent’s penalty area, it generates 4 points to its right and left as dribble
states. After that, the player would generate possible shoots from those states.
You can see how the player considers points and rates them in Fig.7. In the end,
all the shoots will be evaluated, and the state with the most valuable shoot will
be picked as the best action.

8Fatemeh Akhondi et al.

Fig. 7. As shown in the image, the player considers 8 points and evaluates them

5

Future ideas- Sequential behavior prediction in offense decision making: if the players predict
the status of the game in the following cycles, they will be able to make better
decisions and increase their teamwork.
- Adding a new dribble action by considering different angles and some newfactors such as safety, pass, etc.

References
1. N. Zare, “StarterAgent2D,” [Online]. Available:https://github.com/naderzare/StarterAgent2D.
2. N. Tomoharu, H. Akiyama, Y. Suzuki, A. Ohori and T. Fukushima, ”HELIOS2018:
Team Description Paper,” in RoboCup 2018, Nagoya, Japan, 2018.
3. N. Zare, M. Sadeghipour, A. Keshavarzi, M. Sarvmaili, A. Nikanjam, R. Aghayari,
A. Firouzkoohi, M. Abolnejad, S. Elahimanesh and A. Akhgari, ”Cyrus 2D Simulation Team Description Paper 2018,” in RoboCup 2018, Montreal, Canada, 2018.
7.
4. T. Gabel, P. Kloppner and E. Godehardt, ”FRA-UNIted — Team Description 2018,”
in RoboCup 2018, Montreal, Canada, 2018.
5. M. Noohpisheh, M. Shekarriz, S. Barzegar, D. Borzoo and A. kariminia, ”Razi Soccer
2D Simulation Team Description Paper 2018,” in RobCup 2018, Montreal, Canada,
2018.
6. E. Asali, F. Negahbani, S. Tafazzol, M. S. Maghareh, S. Bahmeie, S. Barazandeh,
S. Mirian and M. Moshkelgosha, ”Namira Soccer 2D Simulation Team Description
Paper 2018,” in RoboCup 2018, Monreal, Canada, 2018.
7. M. Abolfazli Esfahani, M. Ghafouri, M. Jamili, S. Askari, R. Etemadi, H. Mohebbi,
M. Dara, M. Erafani and M. Malekabadi, ”Nexus2D Team Description Paper,” inRoboCup 2017, Nagoya, Japan, 2017.
8. wrighteagle2d, “autotest2d,” [Online]. Available:https://github.com/wrighteagle2d/autotest2d.