ITAndroids 2D Soccer Simulation
Team Description Paper 2022
Davi M. Vasconcelos, Gustavo F. Gottschild, Marcos R. O. A. Máximo, Nando
Ferreira Farias, Vinícius F. Almeida, Vinícius P. D. Araújo, and Yuri G. Araújo
Aeronautics Institute of Technology,
São José dos Campos, São Paulo, Brazil{davi.muniz41,gustaferraresi189,nandoffarias12,vinifreitas.d.
a,viniciusdepadua6,yurigama.t23}@gmail.com,mmaximo@ita.br
itandroids-soccer2d@googlegroups.com
http://www.itandroids.com.br/

Abstract The ITAndroids 2D Soccer Simulation team is composed byundergraduate students of the Aeronautics Institute of Technology. The
team is currently one of the strongest teams in Brazil, having won firstplace 4 times consecutively from 2012 to 2015, Vice Champion in 2018
and was the Champion of the 2019 Latin American Competition. Moreover, the team has qualified for the last nine editions of RoboCup, having
participated in eight. This paper describes some of our advances in 2021
and our plans for 2022.

1Introduction

ITAndroids is a competitive robotics team from Aeronautics Institute of Technology reestablished in 2011. The group participates in the following leagues:
RoboCup 2D Soccer Simulation, RoboCup 3D Soccer Simulation, RoboCup Humanoid Kid-Size, IEEE Humanoid Robot Racing, IEEE Very Small Size, andRoboCup Small Size league.
Our Soccer 2D’s team, ITAndroids 2D, has continuously participated in Latin
American Robotics Competition (LARC) and Brazilian Robotics Competition(CBR – acronym for Competição Brasileira de Robótica) since 2011. Moreover,
ITAndroids 2D competed in RoboCup in 2012, 2013, 2015, 2016, 2017, 2018, 2019and 2021. The team also was qualified for RoboCup 2014, but unfortunately it
was not able to attend the competition. Our results in these competitions arerepresented in Table 1.
Lack of continuation and documentation of the project and the spreading of
the team towards other fields slowed down its improvements. This can be seenfrom the leagues results from 2015 to 2017. However, ITAndroids 2D recoveredin 2017, after a complete restructuring of the project [1]. As a result, we won
9th place at RoboCup2018, our best absolute place in the competition.
During 2020 and 2021, our progress slowed down significantly due to theCovid-19 pandemic. Even then, it still can be said that we made some advancements during that troublesome year. In this paper, we describe these advancements.

2ITAndroids 2D Soccer Simulation Team Description Paper 2022
Year RoboCup LARC2012
2013
2014
2015
2016
2017
2018
2019
2020
2021

10th
13th
—
13th
13th
15th
9th
13th
—
11th

1st
1st
1st
1st
2nd
3rd
2nd
1st
4th
5th

Table 1: Placement of ITAndroids 2D in past RoboCup and LARC competitions.

2

Previous Works

Our code base uses agent2d [2] as base team. Since the year 2012, we have focused on improving mechanisms already present in agent2d framework. We have
improved the action chain evaluator with Particle Swarm Optimization (PSO)[3]. Furthermore, we have developed heuristics [1] to increase attack and defense
performance: type of formation (attack or defense) selection based on probabilityof scoring a goal, field evaluator selection based on opponent team, and defender
optimal marking in opponent attack situations. Many early improvement ideas
were inspired by Team HELIOS [4] and Team Nemesis [5].
The team proposed in 2018 a novel technique to determine the in-game ballpossession [6]. The ball possession information without noise is valuable for anyteam, since it can be useful to create dynamic behaviors in players. We haveused a Finite-State Machine called Possession Automaton that takes into account the current and the last game situations to infer the ball possession. The
game situations are determined by InterceptTable simulations, the ball possession estimator in agent2d [2]. Since we do not estimate ball possession based ona single game cycle, we have obtained a classification accuracy 18% higher thanthe default estimator of the base team.
Lately we have experimented Deep Reinforcement Learning (DRL) techniques to improve the goalkeeper defense in penalty situations [7]. After five
training experiments using Proximal Policy Optimization (PPO) algorithm, wehave achieved a penalty defense rate of 40% against agent2d [2], twenty percent
higher than the base team rate.
Our current efforts focused on the development of tools to perform gamelog analysis. An in-depth investigation of game logs brings improvement ideasand guides future work decisions. In fact, RoboCup 2D teams have presentedtools to analyze team performance. Team RoboCIn has developed a graphicaluser interface that has a group of analyzed features for a single game log (e.g.,faults position, player stamina) [8]. Furthermore, an automatic evaluation system

ITAndroids 2D Soccer Simulation Team Description Paper 2022

3of soccer matches was implemented [9], which provides statistical performanceindicators based on a large number of games.

3

Soccer Reporter: a stout tool for statistical analysis

Statistical analysis of match results is a pretty simple, yet highly cost-effective
and sturdy way to improve the performance of any RoboCup team. Moreover,
it is an utterly necessary process so that changes proposed to a team can go
beyond mere theoretical models and their true impact on performance can be
accurately appraised. To implement such evaluation, several techniques can beused, such as p-value, null hypothesis testing, and Bayes factors.
As our team has only a few members, focusing on creating a unified tool
containing all the performance evaluation metrics for statistical analysis is themost feasible solution. Inasmuch as all match events are stored in the log files
generated by the rcssserver, such application will be essentially a log analyzer.
Besides, seeking to achieve the greatest long-term benefits, the solution chosenmust attend the following requirements:– Be as easy to maintain as possible: since only a handful of people will
be maintaining this software, the application has to be modular, internallydecoupled and developer-friendly. In addition, with speed of development inmind, ready-made solutions are likely to be the best alternatives and, as will
be explained ahead, compiler-like front-ends should be preferred. Thus, tosolve this issue it is enough to choose a well suited parser generator. Amongthe many options available, ANTLR (ANother Tool for Language Recognition), a tool used to develop compilers’ front-ends, stands out because itis easy to use and produces human-readable output, as well as has active
support and industrial-level language processing capabilities.
– Be user-friendly: This is necessary in order to speed up training within
ITAndroids 2D and to avoid mistakes during match analysis. This could bedone initially with an easy-to-use CLI (Command Line Interface) developed
using Click, a state-of-the-art Python package for creating CLIs, which ispreferred over other tools like Argparse and Docopt due to its clean syntax
and its superior capabilities. Thereafter, a GUI (Graphical User Interface)
could be implemented in order to increase usability.
– Allow flexible feature analysis: since statistical processing of all match
parameters will not be necessary all the time, aiming the efficient use ofcomputational power, it is clearly necessary to allow the user to pick whichmatch features will be analyzed, and how. The most feasible ways to set
these settings are: CLI options, a configuration file and a GUI. These threesolutions probably would be implemented in such order due to development
complexity issues. The first one is the easiest to implement, but repetitiveand laborious, the second one is the the most promising of them all because
it is easier to develop than the GUI alternative, as well as being the least

4

ITAndroids 2D Soccer Simulation Team Description Paper 2022

repetitive and the most robust choice. Finally, the last one is the most userfriendly option, but, as it is the most difficult to implement, its development
could be, if necessary, left aside.
– Be robust: as long as protocol changes can be rather problematic, theapplication’s front-end must be stout. That is, it has to work in as many
input configurations as possible. A front-end model with the desired stoutness already exists: the one used by compilers. Therefore, building the Soccer
Reporter’s front-end using ANTLR would enable both a much faster development and a far more robust statistical tool.
Unfortunately, due to the COVID-19 pandemic, development of the project
was slowed down, and the only parts finished were the grammars of the client’s
lexer and parser, which were written in ANTLR.

4itas2d-window: A GUI to visualize 2D soccer matches

Work has begun on the itas2d-window application, which is a desktop tool thatconnects to rcssserver to visualize matches between 2D soccer teams, provide
real-time debug information, and much more. Currently, the tool is at a very
early and experimental stage — so early that there can be no meaningful demosto show pictures of the matches. Even then, there are some design choices andother considerations that might be useful knowledge to anyone interested in thetopic. Some of these will be elucidated here.
4.1

The GUI library

To build a desktop application with an interactive user interface, there currently
is a plethora of fully-fledged, robust GUI libraries and frameworks, such as Qt,wxwidgets, GTK+, Flutter, Electron, and many more. Some are C++-based
and run natively on desktop systems(such as Qt and wxwidgets), whereas others
run in a virtual machine or environment, to try and be much more platformindependent(such as Electron, which runs on an instance of Chromium, and iscapable of not only running on major desktop platforms, but also on mobile).
Though this is not, by any metric, an exhaustive analysis of such libraries, anattempt will be made to explain the pros and cons of each of them:– wxwidgets and GTK+: Though they are different projects, it can be said
that their purpose (or use-case) is very similar: making desktop apps withlook, feel and functionality that is as native as possible. Also, both havetheir APIs written in C++ (though there are bindings for other languages,
such as python). With that in mind, using either of these libraries is very
advantageous if having multi-platform support (as in macOS, windows andlinux) with native look-and-feel is a must (it should be noted that, technically, GTK+ fakes the operating system’s style through it’s theming API,though), and the developer has experience working with the C++ language
which, arguably, is not the most well-suited to creating and designing UIs.

ITAndroids 2D Soccer Simulation Team Description Paper 2022

5– Flutter: This is a relatively new UI toolkit to create native applications
that can be deployed to the web, mobile or to desktop. Its main feature, asclaimed by Google, is leveraging the power of the Dart language to enable fastdevelopment times, with an expressive syntax and native performance. Its
main disadvantage, as of the time of writing, is its instability — for example,
many dart packages break due to the rapid evolution of the language and theever-evolving API. Also, even though it supports desktop, its main target ismobile applications.
– Qt: Qt is a GUI library written in C++ which has a very strong emphasison the "Code once, deploy everywhere" philosophy. Qt apps can run on
mobile, desktop, and even embedded devices. Their C++ API does not evenassume features of C++11 (which, as of 2021, was approved a decade ago),such as type inference, range-based for loops, initializer lists, smart pointersetc. Instead, many macros and language extensions are provided, and Qt
developers have to use qmake, which is part of the custom build systemthat Qt provides. Also, from Qt5 onwards, the Qt Quick API started taking
space as the most supported way of developing Qt apps (at the expense of
the much older Qt Widgets, which is exclusively C++-based and only targets
desktop). This newer API works through a declarative language called QML
to create and compose UI elements, and can have embedded javascript code
to provide logic. All of this increases the technical complexity of developmentwith the library. Finally, the documentation is thorough, but monolithic inits size and scope, which only adds to the frustration of working with Qt.
– Electron: This is a framework that enables the developer to create desktop
applications with JavaScript, HTML, and CSS. Therefore, its main use-caseis to easily make desktop applications with web technologies. From a development point of view, it can be argued that these technologies are stateof-the-art in terms of ease of use and development speed, empowering web
developers to create beautiful UIs with great user experiences with simple,
declarative languages mixed with imperative logic (if even standard CSS3and vanilla JavaScript are very capable of doing these tasks, much more canbe done with react, bootstrap, SASS and so on...). The main disadvantage,
as mentioned before, is that this framework depends on Chromium which,in layman’s terms, means that it packages an entire web browser with itself.
This, evidently, adds unnecessary overhead to an otherwise sleek and modernapplication.
4.2

Our choice for the library

After some consideration, Qt was initially chosen as the library for development.
The rationale was pretty much as follows:– Qt is a robust and well-established library (20+ years old)
– It has already been used in other parts of the ITAndroids team
– Qt4 was used to develop our current GUI (soccerwindow2 [2]) which — given
some tweaks and ajustments — would be suitable to our needs

6ITAndroids 2D Soccer Simulation Team Description Paper 2022

– Qt is not just a GUI library: it also provides networking, unit testing, internationalization, multimedia and much more
– Qt runs natively on Ubuntu (our main target platform)– It might not have a native look-and-feel (unless the user is on KDE, which
is based off of Qt), but we’re developing an app for debugging purposes, notfor "great" or "beautiful" user experiences– Qt has better documentation and an easier learning curve than wxwidgets
or GTK+ (though that’s debatable)
After a few months of learning the Qt Quick API, struggling to understandparts of the documentation, and getting frustrated with the complex macros,
object annotations and unintuitive build system, we opted to go with the much
simpler dear imgui library. In the next section, we’ll talk more about why wechose this library.
4.3

Dear Imgui

Before going into the details of the dear imgui library, we will talk about theimmediate-mode GUIs (imgui, as opposed to retained-mode GUIs).
Immediate-mode GUIs try to address the problem of complexity that is common in designing UIs with retained-mode libraries. This complexity often comes
as a consequence of decentralized state, which requires widgets to hold callbacks,
IDs, mouse position and all sorts of other (possibly redundant) references to thestate of the UI. Also, as they are decentralized, working with these retained-mode
GUIs usually means the code will be all over the place, because different logicalparts affect the interface differently. ImGuis, in contrast, are stateless and havea strong binding to their respective logical parts. The key idea behind an ImGuiis that everything is done within an update loop, just like with immediate-mode
graphics1 .
We chose dear imgui because:– Being a very tiny library(only a few C++ source and header files), it hasvery minimal overhead, even compared to the well-performant Qt library– It enables very fast prototyping and development, without needing unnecessarily complex architectures such as those present in Qt– It easily permits the usage and integration of more standard build tools ,such as CMake– Developing with intellisense, and enabling static code analysis tools such asclang-static-analyzer consumes less system resources than with Qt’s monolithic tree of libraries– We can fearlessly use more modern C++ features, as opposed to Qt-style
C++, which is based on the extensions that the library provides to thelanguage
1

Incidentally, the dispute between retained and immediate-mode graphics was theidea behind the name of the ImGui paradigm, according to one of its popularizers,
Casey Muratori[10].

ITAndroids 2D Soccer Simulation Team Description Paper 2022

7– As part of the front-end is developed in OpenGL, any GUI library thatsupports it will suffice. Therefore, using either Qt or dear imgui is irrelevantwith regards to this aspect(actually, it’s easier to integrate dear imgui withOpenGL), and we can migrate to Qt later, if it is ever necessary
4.4

Design choices

Although much of what was done with Qt was eventually scrapped, some design
choices for the UI still remain, such as:– The sidebar– The header and footer– Minimized state for the side panels– The timeline– Ability to select entities and check out their properties
On Figure 1, we can see a mockup which illustrates most of these design
choices for our GUI.

Figure 1: Mockup of the main window

5Conclusions and Future Work

This paper presented the most recent efforts of team ITAndroids 2D. Amongthe several improvements that will be further made, the ones most worthy ofnote are the putting into practice of the plans mentioned in Section 3, and theadvancement of the itas2d-window to a usable state for our team members, withincreasingly better debug and statistical information, along with real-time logging. In addition to those next steps of the Soccer Reporter project, its back-end
could, due to complexity issues, in a first instant, use a simpler statistical technique like Bayesian maximum a posteriori estimation using a conjugate gradient8ITAndroids 2D Soccer Simulation Team Description Paper 2022

method and, later, a more sophisticated one, such as a Bayesian network. Finally, the itas2d-window GUI would have to be integrated with the statisticalanalysis provided by the soccer reporter tool.

6Acknowledgements

We would like to acknowledge the RoboCup community for sharing their developments. In particular, we would like to acknowledge Hidehisa Akiyama for
agent2d, librcsc, soccerwindow2, and fedit2 [2]. We would also like to thank:
Terrence Parr for his ANTLR [11] compiler-compiler, Omar Cornut for his dear
imgui [12] library, and the Pallets Project for the Click [13] library. Finally,
we acknowledge our sponsors: Altium, CENIC, Intel Software, ITAEx, Metinjo,
Micropress, Polimold, Rapid, ST Microeletronics, and Wildlife.

References
[1]
[2]

[3]
[4]
[5]
[6]
[7]
[8]

[9]

[10]
[11]
[12]
[13]

Felipe Coimbra et al. “ITAndroids 2D Team Description 2017” (2017).
Hidehisa Akiyama and Tomoharu Nakashima. “HELIOS Base: An Open
Source Package for the RoboCup Soccer 2D Simulation”. In: The 17th
annual RoboCup International Symposium. July 2013.
Fábio Mello et al. “ITAndroids 2D Team Description 2012” (2012).
Hidehisa Akiyama and Hiroki Shimora. “HELIOS2010 Team Description”(2010).
Mehrab Norouzitallab et al. “Nemesis Team Description 2010” (2010).
Felipe Coimbra and Lucas Lema. “ITAndroids 2D Team Description 2018”(2018).
Diego Fidalgo et al. “ITAndroids 2D Soccer Simulation Team Description
Paper 2020” (2020).
F. N. Pereira, Mateus F. B. Soares, and Edna N. S. Barros. “A Data Analysis Graphical user Interface for RoboCup 2D Soccer Simulation League”.
2020 Latin American Robotics Symposium (LARS), 2020 Brazilian Symposium on Robotics (SBR) and 2020 Workshop on Robotics in Education(WRE) (2020), pp. 1–6.
Ryota Kuga, Yudai Suzuki, and Tomoharu Nakashima. “An Automatic
Team Evaluation System for RoboCup Soccer Simulation 2D”. In: 2020
Joint 11th International Conference on Soft Computing and Intelligent
Systems and 21st International Symposium on Advanced Intelligent Systems (SCIS-ISIS). 2020.
Casey Muratori. Immediate-Mode Graphical User Interfaces. https : / /caseymuratori.com/blog_0001. 2005.
Terrence Parr. antlr4-9.1. https://github.com/antlr/antlr4/releases.
2021.
Omar Cornut. dear imgui. https://github.com/ocornut/imgui. 2021.
click-7.1.2. https://github.com/pallets/click/releases. 2020.