Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
battle_id: string
sequence: int64
ticks: int64
seconds: double
side: string
event_type: string
card: string
x: int64
y: int64
ability_card: string
attribution: string
ability_icon: string
barbarian-hut: int64
cannon-cart: int64
knight: int64
boss-bandit: int64
zap: int64
wall-breakers: int64
sparky: int64
goblinstein: int64
goblin-drill: int64
inferno-dragon: int64
void: int64
dart-goblin: int64
monk: int64
x-bow: int64
goblin-hut: int64
rage: int64
rocket: int64
electro-wizard: int64
flying-machine: int64
elite-barbs: int64
berserker: int64
mighty-miner: int64
minion-horde: int64
freeze: int64
elixir-collector: int64
lightning: int64
spirit-empress: int64
zappies: int64
tombstone: int64
ice-golem: int64
miner: int64
balloon: int64
electro-spirit: int64
hog-rider: int64
graveyard: int64
mini-pekka: int64
inferno-tower: int64
giant-snowball: int64
clone: int64
valkyrie: int64
archers: int64
mega-knight: int64
goblin-gang: int64
electro-dragon: int64
skeleton-barrel: int64
archer-queen: int64
baby-dragon: int64
hunter: int64
barbarian-barrel: int64
guards: int64
elixir-golem: int64
fisherman: int64
fire-spirit: int64
musketeer: int64
dark-prince: int64
three-musketeers: int64
little-prince: int64
skeleton-dragons: int64
goblins: int64
ram-rider: int64
giant-skeleton: int64
princess: int64
tornado: int64
fireball: int64
royal-hogs: int64
cannon: int64
witch: int64
rune-giant: int64
royal-giant: int64
goblin-giant: int64
rascals: int64
earthquake: int64
royal-recruits: int64
vines: int64
golden-knight: int64
poison: int64
snowball: int64
mega-minion: int64
spear-goblins: int64
ronin: int64
goblin-cage: int64
mortar: int64
skeleton-army: int64
pekka: int64
goblin-demolisher: int64
tesla: int64
lava-hound: int64
bomber: int64
giant: int64
bowler: int64
golem: int64
firecracker: int64
royal-ghost: int64
skeleton-king: int64
mirror: int64
ice-spirit: int64
the-log: int64
arrows: int64
royal-delivery: int64
goblin-barrel: int64
magic-archer: int64
goblin-machine: int64
barbarians: int64
prince: int64
bomb-tower: int64
night-witch: int64
executioner: int64
mother-witch: int64
heal-spirit: int64
suspicious-bush: int64
ice-wizard: int64
goblin-curse: int64
battle-ram: int64
electro-giant: int64
minions: int64
elite-barbarians: int64
battle-healer: int64
phoenix: int64
wizard: int64
lumberjack: int64
bats: int64
skeletons: int64
bandit: int64
furnace: int64
to
{'archer-queen': Value('int64'), 'archers': Value('int64'), 'arrows': Value('int64'), 'baby-dragon': Value('int64'), 'balloon': Value('int64'), 'bandit': Value('int64'), 'barbarian-barrel': Value('int64'), 'barbarian-hut': Value('int64'), 'barbarians': Value('int64'), 'bats': Value('int64'), 'battle-healer': Value('int64'), 'battle-ram': Value('int64'), 'berserker': Value('int64'), 'bomb-tower': Value('int64'), 'bomber': Value('int64'), 'boss-bandit': Value('int64'), 'bowler': Value('int64'), 'cannon': Value('int64'), 'cannon-cart': Value('int64'), 'clone': Value('int64'), 'dark-prince': Value('int64'), 'dart-goblin': Value('int64'), 'earthquake': Value('int64'), 'electro-dragon': Value('int64'), 'electro-giant': Value('int64'), 'electro-spirit': Value('int64'), 'electro-wizard': Value('int64'), 'elite-barbarians': Value('int64'), 'elite-barbs': Value('int64'), 'elixir-collector': Value('int64'), 'elixir-golem': Value('int64'), 'executioner': Value('int64'), 'fire-spirit': Value('int64'), 'fireball': Value('int64'), 'firecracker': Value('int64'), 'fisherman': Value('int64'), 'flying-machine': Value('int64'), 'freeze': Value('int64'), 'furnace': Value('int64'), 'giant': Value('int64'), 'giant-skeleton': Value('int64'), 'giant-snowball': Value('int64'), 'goblin-barrel': Value('int64'), 'goblin-cage': Value('int64'), 'goblin-curse': Value('int64'), 'goblin-demolisher': Value('int64'), 'goblin-drill': Value('int64'), 'goblin-gang': Value('int64'), 'goblin-giant': Value('int64'), 
...
 'mega-minion': Value('int64'), 'mighty-miner': Value('int64'), 'miner': Value('int64'), 'mini-pekka': Value('int64'), 'minion-horde': Value('int64'), 'minions': Value('int64'), 'mirror': Value('int64'), 'monk': Value('int64'), 'mortar': Value('int64'), 'mother-witch': Value('int64'), 'musketeer': Value('int64'), 'night-witch': Value('int64'), 'pekka': Value('int64'), 'phoenix': Value('int64'), 'poison': Value('int64'), 'prince': Value('int64'), 'princess': Value('int64'), 'rage': Value('int64'), 'ram-rider': Value('int64'), 'rascals': Value('int64'), 'rocket': Value('int64'), 'ronin': Value('int64'), 'royal-delivery': Value('int64'), 'royal-ghost': Value('int64'), 'royal-giant': Value('int64'), 'royal-hogs': Value('int64'), 'royal-recruits': Value('int64'), 'rune-giant': Value('int64'), 'skeleton-army': Value('int64'), 'skeleton-barrel': Value('int64'), 'skeleton-dragons': Value('int64'), 'skeleton-king': Value('int64'), 'skeletons': Value('int64'), 'snowball': Value('int64'), 'sparky': Value('int64'), 'spear-goblins': Value('int64'), 'spirit-empress': Value('int64'), 'suspicious-bush': Value('int64'), 'tesla': Value('int64'), 'the-log': Value('int64'), 'three-musketeers': Value('int64'), 'tombstone': Value('int64'), 'tornado': Value('int64'), 'valkyrie': Value('int64'), 'vines': Value('int64'), 'void': Value('int64'), 'wall-breakers': Value('int64'), 'witch': Value('int64'), 'wizard': Value('int64'), 'x-bow': Value('int64'), 'zap': Value('int64'), 'zappies': Value('int64')}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 489, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
                  self._cast_table(pa_table, json_field_paths=json_field_paths),
                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              battle_id: string
              sequence: int64
              ticks: int64
              seconds: double
              side: string
              event_type: string
              card: string
              x: int64
              y: int64
              ability_card: string
              attribution: string
              ability_icon: string
              barbarian-hut: int64
              cannon-cart: int64
              knight: int64
              boss-bandit: int64
              zap: int64
              wall-breakers: int64
              sparky: int64
              goblinstein: int64
              goblin-drill: int64
              inferno-dragon: int64
              void: int64
              dart-goblin: int64
              monk: int64
              x-bow: int64
              goblin-hut: int64
              rage: int64
              rocket: int64
              electro-wizard: int64
              flying-machine: int64
              elite-barbs: int64
              berserker: int64
              mighty-miner: int64
              minion-horde: int64
              freeze: int64
              elixir-collector: int64
              lightning: int64
              spirit-empress: int64
              zappies: int64
              tombstone: int64
              ice-golem: int64
              miner: int64
              balloon: int64
              electro-spirit: int64
              hog-rider: int64
              graveyard: int64
              mini-pekka: int64
              inferno-tower: int64
              giant-snowball: int64
              clone: int64
              valkyrie: int64
              archers: int64
              mega-knight: int64
              goblin-gang: int64
              electro-dragon: int64
              skeleton-barrel: int64
              archer-queen: int64
              baby-dragon: int64
              hunter: int64
              barbarian-barrel: int64
              guards: int64
              elixir-golem: int64
              fisherman: int64
              fire-spirit: int64
              musketeer: int64
              dark-prince: int64
              three-musketeers: int64
              little-prince: int64
              skeleton-dragons: int64
              goblins: int64
              ram-rider: int64
              giant-skeleton: int64
              princess: int64
              tornado: int64
              fireball: int64
              royal-hogs: int64
              cannon: int64
              witch: int64
              rune-giant: int64
              royal-giant: int64
              goblin-giant: int64
              rascals: int64
              earthquake: int64
              royal-recruits: int64
              vines: int64
              golden-knight: int64
              poison: int64
              snowball: int64
              mega-minion: int64
              spear-goblins: int64
              ronin: int64
              goblin-cage: int64
              mortar: int64
              skeleton-army: int64
              pekka: int64
              goblin-demolisher: int64
              tesla: int64
              lava-hound: int64
              bomber: int64
              giant: int64
              bowler: int64
              golem: int64
              firecracker: int64
              royal-ghost: int64
              skeleton-king: int64
              mirror: int64
              ice-spirit: int64
              the-log: int64
              arrows: int64
              royal-delivery: int64
              goblin-barrel: int64
              magic-archer: int64
              goblin-machine: int64
              barbarians: int64
              prince: int64
              bomb-tower: int64
              night-witch: int64
              executioner: int64
              mother-witch: int64
              heal-spirit: int64
              suspicious-bush: int64
              ice-wizard: int64
              goblin-curse: int64
              battle-ram: int64
              electro-giant: int64
              minions: int64
              elite-barbarians: int64
              battle-healer: int64
              phoenix: int64
              wizard: int64
              lumberjack: int64
              bats: int64
              skeletons: int64
              bandit: int64
              furnace: int64
              to
              {'archer-queen': Value('int64'), 'archers': Value('int64'), 'arrows': Value('int64'), 'baby-dragon': Value('int64'), 'balloon': Value('int64'), 'bandit': Value('int64'), 'barbarian-barrel': Value('int64'), 'barbarian-hut': Value('int64'), 'barbarians': Value('int64'), 'bats': Value('int64'), 'battle-healer': Value('int64'), 'battle-ram': Value('int64'), 'berserker': Value('int64'), 'bomb-tower': Value('int64'), 'bomber': Value('int64'), 'boss-bandit': Value('int64'), 'bowler': Value('int64'), 'cannon': Value('int64'), 'cannon-cart': Value('int64'), 'clone': Value('int64'), 'dark-prince': Value('int64'), 'dart-goblin': Value('int64'), 'earthquake': Value('int64'), 'electro-dragon': Value('int64'), 'electro-giant': Value('int64'), 'electro-spirit': Value('int64'), 'electro-wizard': Value('int64'), 'elite-barbarians': Value('int64'), 'elite-barbs': Value('int64'), 'elixir-collector': Value('int64'), 'elixir-golem': Value('int64'), 'executioner': Value('int64'), 'fire-spirit': Value('int64'), 'fireball': Value('int64'), 'firecracker': Value('int64'), 'fisherman': Value('int64'), 'flying-machine': Value('int64'), 'freeze': Value('int64'), 'furnace': Value('int64'), 'giant': Value('int64'), 'giant-skeleton': Value('int64'), 'giant-snowball': Value('int64'), 'goblin-barrel': Value('int64'), 'goblin-cage': Value('int64'), 'goblin-curse': Value('int64'), 'goblin-demolisher': Value('int64'), 'goblin-drill': Value('int64'), 'goblin-gang': Value('int64'), 'goblin-giant': Value('int64'), 
              ...
               'mega-minion': Value('int64'), 'mighty-miner': Value('int64'), 'miner': Value('int64'), 'mini-pekka': Value('int64'), 'minion-horde': Value('int64'), 'minions': Value('int64'), 'mirror': Value('int64'), 'monk': Value('int64'), 'mortar': Value('int64'), 'mother-witch': Value('int64'), 'musketeer': Value('int64'), 'night-witch': Value('int64'), 'pekka': Value('int64'), 'phoenix': Value('int64'), 'poison': Value('int64'), 'prince': Value('int64'), 'princess': Value('int64'), 'rage': Value('int64'), 'ram-rider': Value('int64'), 'rascals': Value('int64'), 'rocket': Value('int64'), 'ronin': Value('int64'), 'royal-delivery': Value('int64'), 'royal-ghost': Value('int64'), 'royal-giant': Value('int64'), 'royal-hogs': Value('int64'), 'royal-recruits': Value('int64'), 'rune-giant': Value('int64'), 'skeleton-army': Value('int64'), 'skeleton-barrel': Value('int64'), 'skeleton-dragons': Value('int64'), 'skeleton-king': Value('int64'), 'skeletons': Value('int64'), 'snowball': Value('int64'), 'sparky': Value('int64'), 'spear-goblins': Value('int64'), 'spirit-empress': Value('int64'), 'suspicious-bush': Value('int64'), 'tesla': Value('int64'), 'the-log': Value('int64'), 'three-musketeers': Value('int64'), 'tombstone': Value('int64'), 'tornado': Value('int64'), 'valkyrie': Value('int64'), 'vines': Value('int64'), 'void': Value('int64'), 'wall-breakers': Value('int64'), 'witch': Value('int64'), 'wizard': Value('int64'), 'x-bow': Value('int64'), 'zap': Value('int64'), 'zappies': Value('int64')}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Clash Royale RoyaleAPI replay corpus

Raw and cleaned Clash Royale battle replays captured from RoyaleAPI via the clash-royale-ai collector pipeline. Used to train the winner predictor model.

Contents

Path Description
raw/ 15,420 verbatim /data/replay JSON captures (schema v1), sharded into raw/00/, raw/02/, raw/08/, and raw/09/ subdirectories (Hugging Face file-per-directory limit). Each file contains the full RoyaleAPI replay HTML payload: timeline card plays, map markers with arena coordinates, elixir/leak tables, and deck stats.
card_costs.json Official elixir costs keyed by card slug (used for feature extraction).
cleaned-legacy/ Processed December 2025 legacy subset: matches.jsonl, events.jsonl, manifest.json, quarantine.jsonl with Hero/Champion ability labeling.

Raw replay format

Each file in raw/ is named {battle_tag}.json:

{
  "schema_version": 1,
  "captured_at": "2026-08-06T17:10:57.142Z",
  "request_url": "https://royaleapi.com/data/replay?tag=...",
  "payload": {
    "success": true,
    "html": "<div class=\"battle_replay\" ...>"
  }
}

The HTML embeds:

  • Timeline events: data-card, data-t (tick), data-s (blue/red), data-ability (0=play, 1=ability)
  • Map markers: data-x, data-y, data-c, data-t for arena placements
  • Elixir tables: troop/spell/building/ability counts and leaked elixir per side

Ticks convert to seconds as ticks / 20.

Cleaned legacy subset

The cleaned-legacy/ directory holds a high-confidence audit of 7,880 December 2025 files:

Stat Count
Accepted unique battles 1,592
Card-play events 120,416
Ability activations 4,677
Rejected (ambiguous Hero) 900

See cleaned-legacy/manifest.json for full rejection and attribution breakdowns.

Download

# Full dataset (~1.2 GB)
hf download Cochon123/clash-royale-replays --repo-type dataset --local-dir data

# Raw replays only
hf download Cochon123/clash-royale-replays raw --repo-type dataset --local-dir data/raw

Usage with the pipeline

git clone https://github.com/cochon123/clash-royale-ai.git
cd clash-royale-ai
pip install -e .
hf download Cochon123/clash-royale-replays --repo-type dataset --local-dir data

# Train the winner model
cr-replays train-winner-hgb --input data/raw --trees 100

# Clean with Hero ability labeling
cr-replays clean --input data/raw --output data/cleaned --legacy-roster december-2025

Limitations

  • Replays are sourced from RoyaleAPI's public leaderboard crawl; player tags and usernames appear in the HTML.
  • Not all captures are valid battles (Cloudflare challenges, rate-limit errors, etc.). The cleaning pipeline quarantines these.
  • Replay actions do not include live unit HP, positions over time, or projectile state—only discrete play/ability events.
  • Meta coverage reflects the collection window (2025–2026); older cards and balance patches may be underrepresented.

License

MIT. RoyaleAPI replay data is subject to Supercell's and RoyaleAPI's terms of use; use for research and personal projects only.

Downloads last month
647