Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- reinforcement-learning
|
| 5 |
+
- stable-baselines3
|
| 6 |
+
- ppo
|
| 7 |
+
- game
|
| 8 |
+
- gymnasium
|
| 9 |
+
- pygame
|
| 10 |
+
library_name: stable-baselines3
|
| 11 |
+
task: reinforcement-learning
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# PixelCopter RL Agent
|
| 15 |
+
|
| 16 |
+

|
| 17 |
+
|
| 18 |
+
## Overview
|
| 19 |
+
|
| 20 |
+
PixelCopter is a side-scrolling reinforcement learning environment inspired by the classic helicopter game. The agent:
|
| 21 |
+
|
| 22 |
+
- Controls a **pixel copter** navigating through a scrolling cavern.
|
| 23 |
+
- Avoids colliding with walls that move from right to left.
|
| 24 |
+
- Gains positive rewards for surviving timesteps; receives negative rewards on collision.
|
| 25 |
+
|
| 26 |
+
This repository contains:
|
| 27 |
+
|
| 28 |
+
- `train_pixelcopter.py` – Training script
|
| 29 |
+
- `test_pixelcopter.py` – Test script with Pygame visualization
|
| 30 |
+
- `ppo_pixelcopter_cert.zip` – Pre-trained PPO agent
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## Environment Details
|
| 35 |
+
|
| 36 |
+
- **Observation Space:** `[copter_y, wall_gap_positions...]`
|
| 37 |
+
- **Action Space:**
|
| 38 |
+
- `0`: Do nothing (gravity pulls the copter down)
|
| 39 |
+
- `1`: Apply lift (move upwards)
|
| 40 |
+
- **Rewards:**
|
| 41 |
+
- +1 for surviving a timestep
|
| 42 |
+
- -5 for collision
|
| 43 |
+
- **Medium Difficulty Settings:**
|
| 44 |
+
- Gap size: 6
|
| 45 |
+
- Gravity: 0.25
|
| 46 |
+
- Max timesteps per episode: 500
|
| 47 |
+
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
## Installation
|
| 51 |
+
|
| 52 |
+
```bash
|
| 53 |
+
pip install stable-baselines3 gymnasium pygame numpy
|