Dataset Viewer
Auto-converted to Parquet Duplicate
split
stringclasses
2 values
format
stringclasses
6 values
path
stringclasses
7 values
compression
stringclasses
2 values
description
stringclasses
7 values
archive
gen1ou
gen1ou.tar.gz
tar.gz containing .json.lz4 files
Generation 1 OU parsed replay trajectories.
archive
gen2ou
gen2ou.tar.gz
tar.gz containing .json.lz4 files
Generation 2 OU parsed replay trajectories.
archive
gen3ou
gen3ou.tar.gz
tar.gz containing .json.lz4 files
Generation 3 OU parsed replay trajectories.
archive
gen4ou
gen4ou.tar.gz
tar.gz containing .json.lz4 files
Generation 4 OU parsed replay trajectories.
archive
gen9ou
gen9ou.tar.gz
tar.gz containing .json.lz4 files
Generation 9 OU parsed replay trajectories.
metadata
all
revealed_teams.tar.gz
tar.gz
Partially revealed team data reconstructed from replay trajectories.
metadata
all
replay_stats.tar.gz
tar.gz
Aggregate replay/team statistics used for dataset analysis and team prediction.

YAML Metadata Warning:The task_categories "imitation-learning" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

Metamon Replay Dataset

Pokémon Showdown replay files parsed (or "reconstructed") into RL trajectories by Metamon (arXiv Appendix D)

metamon_parsed_replays

Quick Start

The easiest way to use the replay dataset is through metamon's dataloader:

import metamon
from metamon.interface import get_observation_space, get_reward_function, get_action_space
from metamon.data import ParsedReplayDataset

# see the metamon README for more on observations, actions, and rewards.
human_dset = ParsedReplayDataset(
    observation_space=get_observation_space("DefaultObservationSpace"),
    action_space=get_action_space("DefaultActionSpace"),
    reward_function=get_reward_function("DefaultShapedReward"),
    formats=["gen1ou", "gen9ou"],
)

# Each item is one complete battle.
obs, actions, rewards, dones = human_dset[0]
# obs     : dict[str, list[np.ndarray]] — features per timestep
# actions : dict
#   "chosen"  (list[Any],  len T) – action label. Type depends on action space (usually int)
#   "legal"   (list[set],  len T) – valid actions at each step
#   "missing" (list[bool], len T) – True if the action was not present in the replay
# rewards : np.ndarray shape (T,)
# dones   : np.ndarray shape (T,)

Data

Each Showdown ruleset (format) is provided as a separate tar.gz file:

  • gen1ou.tar.gz - Generation 1 OU format replays
  • gen2ou.tar.gz - Generation 2 OU format replays ...etc.

Which, when extracted, will be a large dir of lz4-compressed json files with names:

{showdown battle id}_{ELO rating}_{pov player username}_vs_{opponent username}_{date as DD-MM-YYYY}_{pov player WIN/LOSS}.json.lz4

For example:

gen1nu-2049363853_1022_block26952_vs_pelipper13259_02-01-2024_WIN.json.lz4

Note that usernames are anonymous pseudonyms of real Showdown usernames that are consistent with jakegrigsby/metamon-raw-replays.

Metamon handles the process of loading these files as ML training data --- see the repo README. The format is:

import json
import lz4.frame
from metamon.interface import UniversalState

with lz4.frame.open(filename, "rb") as f:
    data = json.loads(f.read().decode("utf-8"))
states = [UniversalState.from_dict(s) for s in data["states"]]
actions = data["actions"]

Where states can then be mapped to any observation space, and consecutive states (s_t, s_{t+1}) can be mapped to any reward function.

In addition to the parsed replays, the dataset contains:

  • revealed_teams.tar.gz: A record of the team revealed by every battle in the dataset. Revealed teams are incomplete because they only record Pokemon/moves/items/abilities that directly impacted the battle. They are the final version of the point-of-view player's team as seen by their opponent at the end of the battle. Replay reconstruction involves filling in the missing info. We now use these files to generate team prediction stats.

  • replay_stats.targ.gz : jsons of Pokemon "rosters" (6 Pokemon names only) and Pokemon sets (moves/items/abilities) with frequencies listing the number of historical replays that may have used them ("may have" == "nothing was revealed that makes it impossible for this set or roster to have been their true team").

Changelog

  • v0: the final version of the dataset used by the paper, in the original format used by the paper. About 1M replays in a numpy format hardcoded to the observation space and reward function that is now called DefaultObservationSpace and DefaultShapedReward in the metamon repo.

  • v1: All replays as of April 25th, 2025. Replays are now stored as jsons of metamon.interface.UniversalStates so that users can change observation spaces and reward functions on-the-fly. v0 uses a team prediction strategy now called NaiveTeamPredictor in metamon.data.team_prediction.predictor, while v1 upgrades to ReplayPredictor. From here on, versions include a revealed_teams directory that holds all the partially revealed teams in the replays, and a replay_stats dir that summarizes info from these teams that are used for team prediction.

  • v2: All replays as of May 29th, 2025 (aligns with metamon-raw-replays v2. Now stored as compressed lz4 after the previous format change made the dataset far too large. Fixes a v1 bug where items and abilities could appear as "backwardmarkersforceunknown" (which are values meant to be guessed by team prediction).

  • v3-beta: Does not add new Gen1-4 battles. Instead, backfills the dataset with all Gen 9 OU battles up to mid June 2025. Support for Gen 9 required significant changes across generations and this version of the dataset has not yet been confirmed to replicate Gen 1-4 paper results.

  • v3: Does not add new replays. Instead, adds an opponent_teampreview state feature to support gen 9. Other gens are missing this key and it is filled blank by default in the dataloader. This would be fixed the next time the full dataset is reparsed.

  • v4: All replays as of August 12th, 2025 (aligns with metamon-raw-replays v4)

  • v5: All replays of of January 18th, 2026 (aligns with metamon-raw-replays v5). Changes subdir format to genXou/YYYY/MM.

Downloads last month
150

Models trained or fine-tuned on jakegrigsby/metamon-parsed-replays

Paper for jakegrigsby/metamon-parsed-replays