CoolFace
Apppublic

Donald8585/warehouse-robot-navigation

sourceHugging Facemitupdated 8mo agoView on Hugging Face
0likes
App README

๐Ÿค– Warehouse Robot Navigation | DQN + HER + Curriculum Learning

Interactive demo comparing BFS pathfinding vs. Deep Reinforcement Learning for warehouse robot navigation

๐ŸŽฏ Project Overview

This demo showcases a Deep Q-Network (DQN) agent with Hindsight Experience Replay (HER) trained using curriculum learning to navigate a 20ร—20 grid warehouse environment with obstacles.

Key Features

  • โ€”30 comparison videos (6 difficulty levels ร— 5 runs each)
  • โ€”Side-by-side visualization: BFS optimal pathfinding (blue) vs. RL agent (green)
  • โ€”Curriculum learning: Progressive difficulty (Easy โ†’ Medium โ†’ Hard)
  • โ€”Sparse reward challenge: Agent learns to reach goals with only terminal rewards

๐Ÿ“Š Results Summary

DifficultyObstacle DensityRL Success Rate
๐ŸŸข Tutorial0%100% โœ…
๐Ÿ”ต Easy10%80% โœ…
๐ŸŸก Medium25%60% ๐Ÿ˜
๐ŸŸ  Hard40%20% โš ๏ธ
๐Ÿ”ด Expert55%0% โŒ
โšซ Nightmare70%0% โŒ

๐Ÿง  Technical Details

Environment

  • โ€”State Space: Agent position (x, y) + Goal position (x, y) [4D continuous]
  • โ€”Action Space: Up, Right, Down, Left [4 discrete actions]
  • โ€”Reward: Sparse (+0 at goal, -1 per step)
  • โ€”Episode Limit: 200 steps
  • โ€”Grid Size: 20ร—20

Training

  • โ€”Algorithm: DQN with Hindsight Experience Replay (HER)
  • โ€”Curriculum: 3 stages @ 100k steps each (300k total)
  • โ€”Stage 1: Easy (10% density, distance 5-8)
  • โ€”Stage 2: Medium (25% density, distance 8-12)
  • โ€”Stage 3: Hard (40% density, distance 12-16)
  • โ€”Hyperparameters:
  • โ€”Learning rate: 1e-3
  • โ€”Batch size: 256
  • โ€”Replay buffer: 100k transitions
  • โ€”HER strategy: Future (4 sampled goals per transition)

Results Analysis

  • โ€”โœ… Curriculum learning effective: 100% success on tutorial, 80% on easy
  • โ€”๐Ÿ˜ Generalization gap: Performance degrades on harder difficulties
  • โ€”โš ๏ธ Sparse reward challenge: Agent struggles with long-horizon credit assignment
  • โ€”๐Ÿ’ก Future work: Reward shaping, prioritized replay, or hierarchical RL

๐Ÿš€ How to Use

  1. 1.Select difficulty level: Tutorial โ†’ Nightmare (increasing obstacle density)
  2. 2.Choose run number: 1-5 (different random maps per level)
  3. 3.Click "Load Video": Watch BFS (left/blue) vs RL (right/green)
  4. 4.Compare performance: Success rates and step counts displayed

๐Ÿ”ง Tech Stack

  • โ€”Gymnasium: Custom environment framework
  • โ€”Stable-Baselines3: DQN + HER implementation
  • โ€”NumPy: State/reward processing
  • โ€”imageio: Video generation
  • โ€”Streamlit: Interactive web interface

๐Ÿ”— Links

๐Ÿ“ License

MIT License - Free to use for learning and portfolio projects


Built with โค๏ธ by Alfred So | MSc Data Science & AI (HSUHK) | Aspiring ML Engineer