Skip to content

OpenEnv-WolfeClick

OpenEnv-WolfeClick is an OpenEnv-compatible environment for training LLMs in competitive Pokemon Showdown battles.

Core trick

Live Pokemon Showdown battles produce trajectories where reward combines damage, knockouts, and healing, with illegal moves penalized.

Tags

Description

OpenEnv-WolfeClick is an OpenEnv-compatible environment for training LLMs in competitive Pokemon Showdown battles. Rock-paper-scissors already shows how cyclic matchups create nontrivial reasoning; Pokemon scales that into a much richer world with hidden information, many possible matchups, legal action constraints, and long-term consequences. The model must choose exactly one valid move or switch each turn from the live battle state. We collect real rollout trajectories from battles and train a LoRA adapter with GRPO using actual environment reward, shaped by signals like damage, knockouts, setup, healing, status, and illegal-action penalties. The project fits Multi-Agent Interactions and Long-Horizon Planning, and demonstrates an end-to-end OpenEnv training loop for strategic decision-making under uncertainty.
Atharva2099/OpenEnv-WolfeClick★ 00 forksJupyter NotebookCreated Mar 8, 2026 · last push Mar 9, 2026

README excerpt

---
title: OpenEnv-WolfeClick Environment
emoji: 🎮
colorFrom: blue
colorTo: gray
sdk: docker
app_port: 7860
tags:
 - openenv
 - pokemon
 - rl
 - multi-agent
---

# OpenEnv-WolfeClick

[![HF Space](https://img.shields.io/badge/HF%20Space-Live%20Demo-blue)](https://huggingface.co/spaces/Atharva2099/OpenEnv-WolfeClick)
[![Model](https://img.shields.io/badge/HF%20Model-Weights-orange)](https://huggingface.co/Atharva2099/openenv-smogon-rl)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue)](https://python.org)

An [OpenEnv](https://github.com/openenv)-compatible environment for training LLMs to play competitive Pokemon Showdown battles using GRPO.

Competitive Pokemon has hidden information, constrained legal actions, long-term resource tradeoffs, and an active opponent. This repo turns that setting into a trainable RL environment with a `reset()` / `step()` loop, shaped rewards, an OpenEnv server wrapper, and a GRPO training pipeline.

> **[Try the live demo](https://huggingface.co/spaces/Atharva2099/OpenEnv-WolfeClick)** — watch a GRPO-trained model play a full battle turn by turn.

## Quick Start

```bash
git clone https://github.com/Atharva2099/OpenEnv-WolfeClick.git
cd OpenEnv-WolfeClick
pip install -e .

# Run a battle with random actions (needs local Pokemon Showdown on port 8000)
python examples/run_single_episode.py

# Watch a trained model battle
python examples/watch_model_battle.py --revision grpo-qwen3-4b-run3
```

## Project Structure

```
src/smogon_

Team