strakammm/generals_io_replays
โ๏ธ Generals.io High-Rank Replay Dataset ๐ Overview This dataset contains a curated collection of 1v1 game replays from the online strategy game generals.io, specifically designed for training high-level reinforcement learning agents ๐ค. ๐ High-Quality Matches: Includes games where at least one participant had a star rating of 70 or higher ๐, ensuring a baseline of quality and strategic depth. โ Clean Data: Carefully filtered to remove outliers, games with AFKโฆ See the full description on the dataset page: https://huggingface.co/datasets/strakammm/generals_io_replays.
โ๏ธ Generals.io High-Rank Replay Dataset ๐
Overview
This dataset contains a curated collection of 1v1 game replays from the online strategy game generals.io, specifically designed for training high-level reinforcement learning agents ๐ค.
- ๐ High-Quality Matches: Includes games where at least one participant had a star rating of 70 or higher ๐, ensuring a baseline of quality and strategic depth.
- โ Clean Data: Carefully filtered to remove outliers, games with AFK players, and trolls, providing a clean and focused dataset for agent training.
- ๐ Proven Effectiveness: An agent trained exclusively on this dataset has been shown to be capable of reaching a 60-star rating, demonstrating the sufficiency and quality of the provided replays.
Game Version
All replays were recorded on the game patch featuring an alternating priority turn system. However, extensive testing has shown that agents trained on this data generalize effectively to the newer priority system without requiring further training.
Dataset Structure & Documentation
The dataset is composed of individual JSON files, where each file represents a single game replay. For a detailed technical description of the replay format, please refer to the official (archived) documentation:
โก๏ธ [http://dev.generals.io/replays (via Archive.org)](https://web.archive.org/web/20190917202205/http://dev.generals.io/replays)
The structure of each JSON object is as follows:
Usage Example
This dataset is hosted on the Hugging Face Hub and can be loaded directly using the datasets library. Here is a showcase of how to load the dataset and inspect its contents.
from datasets import load_dataset
# 1. Load the dataset directly from the Hugging Face Hub
# You may need to log in first: huggingface-cli login
print("Loading dataset...")
dataset = load_dataset("strakammm/generals_io_replays")
# The dataset is loaded into a DatasetDict, we'll use the 'train' split
train_dataset = dataset['train']
# 2. Print the total number of replays in the dataset
print(f"\nTotal number of replays: {len(train_dataset)}")
# 3. Iterate over the first few replays to showcase the data
print("\n--- Showcasing first 5 replays ---")
for i in range(5):
replay = train_dataset[i]
# Get the players and the number of moves
players = replay['usernames']
num_moves = len(replay['moves'])
print(f"\nReplay {i+1}:")
print(f" Players: {players[0]} vs {players[1]}")
print(f" Total moves: {num_moves}")
print("\n------------------------------------")Citation
If you use this dataset in your research, please cite the following paper:
@misc{generals_rl,
author = {Matej Straka, Martin Schmid},
title = {Artificial Generals Intelligence: Mastering Generals.io with Reinforcement Learning},
year = {2025},
eprint = {2507.06825},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
}