Observed since 20 Oct, 21:21 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A python package for extracting key features of an AOE2 recorded games
This python package mines out key strategic choices and statistics from a recorded Age of Empires 2 game. The intention is to enable for further data analysis, including at scale. The package takes in a .AOE2RECORD file as input and produces a Pandas Series with statistical data about the match. This data includes:
The goal is to create an open source project that enables large scale analytics of the game. Capture Age provides incredible analysis tools for watching replays, however there is a gap in terms of being able to extract statistical data from games en masse for analytics purposes. The task is difficult, given the structure of an mgz file (see appendices below for a more detailed technical explanation).
Aside from this package, some other great projects I have come across which perform something similar are:
The goal of this package is to flesh out the statistical data we can mine from replays, and deliver it en masse to anyone who can bash up a python script. Feel free to contribute in any way (including a code review or building out tests or documentation).
pip install age-alyser
The current version is 0.0.5. The most recent updates contains fixes for:
Currently only the advanced parser is implemented - in the future I intend to flesh out the API with some other options.
import pandas as pd
from agealyser import AgeGame
g = AgeGame("file/path/to/game.aoe2record")
stats: pd.Series = g.advanced_parser() # optional - include_map_analysis = False
Given that:
There may be a number of inaccuracies, errors, and bugs.
I would recommend wrapping the the above code in a try-except block. In the future I also intend to improve the error handling so the whole package fails more gracefully.
AgeMap
GamePlayer
AgeGame
The .AOE2RECORD file type only contains the starting state of the game and the series of actions made by both players. This is extremely limiting when it comes to mining out statistics for a game.
For example, my original idea was to map growth in total resources as a proxy for player development and analyse the decisions that contributed to that. However, resources collected are not stored in the game files, and any modelling of villagers collecting resources would be difficult and woefully inaccurate (Modelling villager gather rates is extremely hard, what with their pathing, bumping, getting stuck, and the changing efficiency as the shape of a resource changes, etc. causing fluctuations in gather rates). In general, what can be mined out of the .aoe2record file is limited.
As such, things like up times might be imprecise, as the game only records when a player clicks the research button, and I have had to completely model the production of each Town Centre to identify when research would be complete, based on queued villagers/techs etc. Currently, the mgz package does not seem to handle unqueing units particularly well, which trickles down into further inaccuracies in this package.
This package has turned into an exploration into what the mgz package can produce, and trying to gleam from that as much as possible.
If the original aoc-mgz is behind the current game update and therefore not functional, check aoeinsights version and use that fork:
git clone https://github.com/aoeinsights/aoc-mgz
then
python setup.py install
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.0.5 | 2 Mar 2025 | 5 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:21 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c56d895b85edd5200bb2fa0c71984e3f1d8e6c9473142ddcea7408b3261d327f