Examples
This page collects the main end-to-end examples for the most common
poke-env workflows.
Choose an Example
poke-env Quickstart: Practical Examples and Snippets: your first local battle and first custom agent; requires a local Showdown server.
Creating a custom teambuilder: custom team selection and generation; requires a local Showdown server.
Connecting to Showdown and Challenging Humans: connecting to the official or a custom server and interacting with human players; an account is required for the public server.
Reinforcement learning with Stable-Baselines3: training with action masking and Stable-Baselines3; requires a local server plus RL dependencies.
Self-play reinforcement learning with SuperSuit: self-play training with SuperSuit and Stable-Baselines3; requires a local server plus RL dependencies.
Action Mapping and Strict/Fake Modes: understanding environment actions, legality checks, and masks for custom RL pipelines.
Strict Battle Tracking: debugging request parsing and battle-state desynchronization issues.
Saving Battle Replays: automatic replay persistence and explicit HTML replay export.
poke-envQuickstart: Practical Examples and Snippets- Creating a custom teambuilder
- Connecting to Showdown and Challenging Humans
- Tracking battle observations
- Reinforcement learning with Stable-Baselines3
- Self-play reinforcement learning with SuperSuit
- Action Mapping and Strict/Fake Modes
- Strict Battle Tracking
- Saving Battle Replays