gym_solutions  by johnnycode8

Reinforcement learning solutions and tutorials for Gymnasium environments

Created 2 years ago
253 stars

Top 99.3% on SourcePulse

GitHubView on GitHub
Project Summary

This repository offers a curated collection of Python code solutions for various Gymnasium Reinforcement Learning environments, complemented by YouTube tutorials. It targets individuals seeking to learn and apply RL concepts, from foundational Q-Learning to advanced Deep RL techniques using PyTorch and the Stable Baselines3 library. The project provides practical, hands-on examples to accelerate understanding and implementation of RL algorithms.

How It Works

The project systematically introduces RL concepts through practical implementations. It begins with classic Q-Learning algorithms applied to environments with discrete and continuous state/action spaces. Subsequently, it delves into Deep Reinforcement Learning (DRL) by demonstrating Deep Q-Networks (DQN) with PyTorch, including adaptations like Convolutional Neural Networks (CNNs) for visual inputs. For efficient, scalable training, the repository integrates the Stable Baselines3 (SB3) library, showcasing its robust algorithms (e.g., SAC, TD3, A2C) and advanced features such as dynamic algorithm loading and automated early stopping. Each code solution is accompanied by a detailed video walkthrough on YouTube.

Quick Start & Requirements

  • Installation: Primarily targets Linux and macOS. Windows users may encounter installation issues with certain Gymnasium environments (e.g., Box2D); workarounds involving specific guides or Windows Subsystem for Linux (WSL) are recommended.
  • Prerequisites: Python, Gymnasium, PyTorch (for DRL), Stable Baselines3 (for SB3).
  • Links: YouTube Channel: @johnnycode. Specific installation guides are referenced but not directly linked.

Highlighted Details

  • Comprehensive coverage of Gymnasium environments including FrozenLake, MountainCar, CartPole, Pendulum, and Humanoid.
  • Implementation of core RL algorithms: Q-Learning, Epsilon-Greedy, Deep Q-Networks (DQN), and CNN-based DQNs.
  • Leverages Stable Baselines3 for advanced training, featuring algorithms like SAC, TD3, A2C, dynamic loading, and early stopping mechanisms.
  • Includes enhanced visualizations for algorithm understanding, such as real-time Q-value overlays.

Maintenance & Community

This repository appears to be a personal educational project by the maintainer, johnnycode8. No specific community channels (e.g., Discord, Slack) or formal roadmap are indicated.

Licensing & Compatibility

The provided README does not specify a software license. Potential users should inquire about licensing terms before commercial use or integration into closed-source projects.

Limitations & Caveats

Official Gymnasium support is limited to Linux and macOS; Windows users face potential installation hurdles requiring specific troubleshooting or the use of WSL. The project's focus is educational, demonstrating algorithms rather than offering a production-hardened framework.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.