Python Script for parsing and analyzing agent2D soccer simulation rcl and rcg log files. This has been used in NAMIRA TPAS, a Tournament Planning and Analyzer Software.
- Generating comprehensive data about your team performance on different matches.
- Evaluating different capabilities of your team .
- Using extracted data to train machine learning algorithm.
You just need python 3.x! and setuptools running on any OS.
sudo apt-get update
sudo apt-get install python3 python3-pip python3-setuptools python3-numpy python3-matplotlib
git clone https://github.com/cserobotic/R3-log-analyzer.git
cd R3-log-analyzer
Then you can do one of the following methods:
sudo python3 ./setup.py install
pip install .
pip uninstall loganalyzer
This analyzer can report following match facts and information:
- Pass
- Pass Counting
- In Width
- In Length
- In 9 determined regions (A, B, ... I)
- True Passes
- Pass Interception
- Pass Accuracy
- Pass Counting
- Shoot
- Shoot Counting
- In Width
- In Length
- In 9 determined regions (A, B, ... I)
- On Target Shoots
- Off Target Shoots
- Shoot Accuracy
- Shoot Counting
- Possession
- Possession in 9 determined regions (A, B, ... I) for the teams
- Possession in 9 determined regions for each player (A, B, ... I)
- Possession of any team or player in any custom region
- Position
- Cycles each player is in 9 determined regions (A, B, ... I)
- Cycles each player is in any of custom regions (A, B, ... I)
- Players' moved distance
- Players' stamina usage
- Players' stamina used per distance
- Game Heatmap of teams
- Kick count
- Tackle count
- Say count
To check how to retrieve data, take a look at Testcase.py file.
You can also gain a summary of your gamesb by running the GameSummary.py file.
ATTENTION you will need to give a path which contains both rcg
and rcl
files.
This file will automatically analyzes and gives brief summary about your games in an arbitrary path which you give as parameteres when running. also prints the whole game tables at the end and also saves a .csv
file in the path that you gave.
Run:
python3 GameSummary.py <folder path1> <folder path2> <folder path3> ...
This runs analyzer summary for all rcg
and rcl
files in the path
folders.
Example Run (there are two folders as parameters):
python GameSummary.py /home/arya/APH505/Robotics/robotics-lab/projects/Data-Analysis/data/vs-ThunderLeague/develop-ThunderLeague/log.d /home/arya/APH505/Robotics/robotics-lab/projects/Data-Analysis/data/vs-ThunderLeague/Arya-ThunderLeague/log.d
it will automatically ignore all non-rcl non-rcg files.
loganalyzer --path <log file without .rcl or .rcg >
import loganalyzer
from loganalyzer import Parser
from loganalyzer import Game
from loganalyzer import Analyzer
parser = Parser('path to log file without .rcl or .rcg')
game = Game(parser)
analyzer = Analyzer(game)
analyzer.analyze()
left_team_pass = analyzer.pass_l
left_team_in_target_shoot = analyzer.in_target_shoot_l
left_team_agent_1 = game.left_team.agents[0].data
If you found this work useful in your research, please give credits to the authors by citing:
- Asali, E., Negahbani, F., Tafazzol, S., Maghareh, M.S., Bahmeie, S., Barazandeh, S., Mirian, S., & Moshkelgosha, M. (2018). Namira Soccer 2 D Simulation Team Description Paper 2018. PDF
- Asali, E., Moravej, A., Akbarpoor, S., Asali, O., Katebzadeh, M., Tafazol, S., ... & Haghighi, A. B. (2017). Persian Gulf Soccer 2D Simulation Team Description Paper 2017. In The 21th annual RoboCup International Symposium, Japan, Nagoya. PDF
- Adding pass and shoot lenght attributes