|
| 1 | +# Basic Pokémon RL Training Environment Setup |
| 2 | + |
| 3 | +## 🖥️ System Requirements |
| 4 | + |
| 5 | +- **Python**: 3.9 or higher (✅ 3.10 recommended) |
| 6 | +- **Node.js**: v20 or higher (for Pokémon Showdown server) |
| 7 | +- **npm**: Latest version |
| 8 | +- **Git** |
| 9 | +- **Operating System**: Windows 10/11, Linux, or macOS |
| 10 | + |
| 11 | +> ⚠️ Ensure Python and Node.js are added to your system's `PATH`. |
| 12 | +> ✅ Enable `pip` and Python launcher (`py`) during installation. |
| 13 | +
|
| 14 | +--- |
| 15 | + |
| 16 | +## 🧰 Hardware Recommendations |
| 17 | + |
| 18 | +| Component | Requirement | |
| 19 | +|----------|-------------| |
| 20 | +| RAM | 8–16 GB minimum | |
| 21 | +| Storage | At least 5 GB free | |
| 22 | +| CPU | Multi-core (4+ cores recommended) | |
| 23 | +| GPU | Recommended for faster training | |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +## ⚙️ Setup Instructions |
| 28 | + |
| 29 | +### 1. Create and Activate Virtual Environment |
| 30 | + |
| 31 | +```bash |
| 32 | +# Windows |
| 33 | +python -m venv venv |
| 34 | +venv\Scripts\activate |
| 35 | + |
| 36 | +# Linux/macOS |
| 37 | +python3.10 -m venv venv |
| 38 | +source venv/bin/activate |
| 39 | +``` |
| 40 | + |
| 41 | +### 2. Upgrade Core Tools |
| 42 | + |
| 43 | +```bash |
| 44 | +python -m pip install --upgrade pip setuptools wheel |
| 45 | +``` |
| 46 | + |
| 47 | +### 3. Install Required Packages |
| 48 | + |
| 49 | +#### Option A: Manual Installation |
| 50 | + |
| 51 | +```bash |
| 52 | +# Install poke-env first to set compatible gymnasium version |
| 53 | +pip install poke-env |
| 54 | + |
| 55 | +# Core RL and utility libraries |
| 56 | +pip install torch --index-url https://download.pytorch.org/whl/cpu |
| 57 | +pip install stable-baselines3==2.2.1 # or 2.3.2 |
| 58 | +pip install gymnasium |
| 59 | +pip install poke-env # Reinstall to ensure compatibility |
| 60 | +pip install tensorboard matplotlib pandas wandb |
| 61 | +pip install trl==0.19.1 |
| 62 | +pip install torchvision torchaudio |
| 63 | +``` |
| 64 | + |
| 65 | +#### Option B: Install Specific poke-env Version |
| 66 | + |
| 67 | +```bash |
| 68 | +pip install poke-env==0.9.0 |
| 69 | +``` |
| 70 | + |
| 71 | +This will automatically install: |
| 72 | + |
| 73 | +- `gymnasium>=1.0.0` – RL environment interface |
| 74 | +- `numpy>=2.0.2` – Numerical computing |
| 75 | +- `orjson>=1.24.3` – Fast JSON parsing |
| 76 | +- `pettingzoo>=2.32.3` – Multi-agent RL environments |
| 77 | +- `tabulate==0.9.0` – Table formatting |
| 78 | +- `websockets==15.0.1` – WebSocket client |
| 79 | + |
| 80 | +--- |
| 81 | +### Fork the Pokemon-Showdown Repo onto your main project folder |
| 82 | +- git clone https://github.com/smogon/pokemon-showdown.git |
| 83 | +## ✅ Test Your Setup |
| 84 | + |
| 85 | +Create a basic test script to verify installation. |
| 86 | +Example script: |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +## 🐛 Known Issues |
| 93 | + |
| 94 | +- Compatibility issues between versions of: |
| 95 | + - `stable-baselines3` and `poke-env` |
| 96 | + - `gymnasium`, `pettingzoo`, and `stable-baselines3` |
| 97 | + - `random battle generator doesn't load for gen9, due to ShadowException(still buggy)` |
| 98 | +--- |
| 99 | + |
| 100 | +## 🛠️ Fixes Applied |
| 101 | + |
| 102 | +- Ensured Python 3.10 is selected for `venv` |
| 103 | +- Using gen8 for random battle generation |
| 104 | +- Uninstalled conflicting packages: |
| 105 | + |
| 106 | +```bash |
| 107 | +pip uninstall -y poke-env gymnasium pettingzoo stable-baselines3 trl torch |
| 108 | +``` |
| 109 | + |
| 110 | +- Installed newer compatible version of `stable-baselines3`: |
| 111 | + |
| 112 | +```bash |
| 113 | +pip install stable-baselines3>=2.4.0 |
| 114 | +``` |
0 commit comments