Code Monkey home page Code Monkey logo

ppo-stablebaselines3's Introduction

PPO-StableBaselines3

This repository contains a re-implementation of the Proximal Policy Optimization (PPO) algorithm, originally sourced from Stable-Baselines3.

The purpose of this re-implementation is to provide insight into the inner workings of the PPO algorithm in these environments:

  • LunarLander-v2
  • CartPole-v1

Requirements

  1. Install Python version 3.9.x
  2. Install Visual C++ 14.0 or greater from https://visualstudio.microsoft.com/visual-cpp-build-tools/
  3. Run pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
  4. Run pip install stable-baselines3[extra]==2.2.1
  5. Run pip install swig
  6. Run pip install gymnasium
  7. Run pip install gymnasium[box2d]

Run the script

  1. Change the game in main.py as you wish (LunarLander-v2 / CartPole-v1)
  2. Simply run python main.py

Test your model

  1. Simply run python test.py (as of now, running the test script will load my best model for both LunarLander-v2 and CartPole-v1)

To-do

  • Rollout Buffer
  • Model
  • Training phase
  • Testing phase
  • Run game from Terminal (Example: python main.py --game 'LunarLander-v2')
  • Load model from Terminal (Example: python main.py --game 'LunarLander-v2' --model 'model.pt')
  • Support CarRacing-v2 environment

Disclaimer

This repository includes parts of code that has been adapted from the Stable Baselines library (https://github.com/DLR-RM/stable-baselines3) for educational purposes only. The original code is the property of its respective owners and is subject to their licensing terms.

I do not claim any ownership, copyright, or proprietary rights over the code obtained from Stable Baselines. The use of this code in this repository is solely for educational and learning purposes, and any commercial use or distribution is subject to the original licensing terms provided by Stable Baselines.

The original Stable Baselines code is licensed under the MIT License, and any use of their code in this repository is also subject to the terms of the MIT License.

ppo-stablebaselines3's People

Contributors

slimshadys avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.