PPO-PyTorch | Minimal implementation of clipped objective Proximal Policy Optimization (PPO) in PyTorch | Reinforcement Learning library

 by   nikhilbarhate99 Python Version: Current License: MIT

kandi X-RAY | PPO-PyTorch Summary

kandi X-RAY | PPO-PyTorch Summary

PPO-PyTorch is a Python library typically used in Artificial Intelligence, Reinforcement Learning, Deep Learning, Pytorch applications. PPO-PyTorch has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. However PPO-PyTorch build file is not available. You can download it from GitHub.

This repository provides a Minimal PyTorch implementation of Proximal Policy Optimization (PPO) with clipped objective for OpenAI gym environments. It is primarily intended for beginners in Reinforcement Learning for understanding the PPO algorithm. It can still be used for complex environments but may require some hyperparameter-tuning or changes in the code.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              PPO-PyTorch has a medium active ecosystem.
              It has 1067 star(s) with 292 fork(s). There are 8 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 7 open issues and 46 have been closed. On average issues are closed in 42 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of PPO-PyTorch is current.

            kandi-Quality Quality

              PPO-PyTorch has 0 bugs and 0 code smells.

            kandi-Security Security

              PPO-PyTorch has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              PPO-PyTorch code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              PPO-PyTorch is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              PPO-PyTorch releases are not available. You will need to build from source code and install.
              PPO-PyTorch has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              PPO-PyTorch saves you 160 person hours of effort in developing the same functionality from scratch.
              It has 594 lines of code, 20 functions and 5 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed PPO-PyTorch and discovered the below as its top functions. This is intended to give you an instant insight into PPO-PyTorch implemented functionality, and help decide if they suit your requirements.
            • Train the model
            • Update Monte Carlo model
            • Select a single action
            • Evaluate the objective function
            • Decrement the action standard deviation
            • Calculate the action distribution
            • Set action standard deviation
            • Clears the history
            • Saves the current state of the current state to checkpoint_path
            • Saves gif images
            • Load state from checkpoint file
            • Saves the graph to disk
            • Save images to gif
            • Lists the size of the gif
            Get all kandi verified functions for this library.

            PPO-PyTorch Key Features

            No Key Features are available at this moment for PPO-PyTorch.

            PPO-PyTorch Examples and Code Snippets

            No Code Snippets are available at this moment for PPO-PyTorch.

            Community Discussions

            Trending Discussions on PPO-PyTorch

            QUESTION

            Diverging losses in PPO + ICM using LSTM
            Asked 2019-Jul-13 at 14:01

            I have tried to implement Proximal Policy Optimization with Intrinsic Curiosity Rewards for statefull LSTM neural network.

            Losses in both PPO and ICM are diverging and I would like to find out if its bug in code or badly selected hyperparameters.

            Code (where some wrong implementation could be):
            • In ICM model I use first layer LSTM too to match input dimensions.
            • In ICM whole dataset is propagated at once, with zeros as initial hidden(resultin tensors are different, than they would be if I propagated only 1 state or batch and re-use hidden cells)
            • In PPO advantage and discount reward processing the dataset is propagated one by one and hidden cells are re-used (exact opposite than in ICM because here it uses same model for selecting actions and this approach is "real-time-like")
            • In PPO training model is trained on batches with re-use of hidden cells

            I have used https://github.com/adik993/ppo-pytorch as default code and reworked it to run on my environment and use LSTM

            I may provide code samples later if specifically requested due to large amount of rows

            Hyperparameters: ...

            ANSWER

            Answered 2019-Jul-13 at 14:01

            Found the problem... In main model I use softmax for eval runs and log_softmax for training in output layer and according to PyTorch docs the CrossEntropyLoss uses log_softmax inside, so as advised I used NLLLoss but forthe computation of ICM model loss which does not have softmax fnc in output layer! So switching back to CrossEntropyLoss (which was originaly in reference code) solved ICM loss divergence.

            Source https://stackoverflow.com/questions/56998397

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install PPO-PyTorch

            You can download it from GitHub.
            You can use PPO-PyTorch like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/nikhilbarhate99/PPO-PyTorch.git

          • CLI

            gh repo clone nikhilbarhate99/PPO-PyTorch

          • sshUrl

            git@github.com:nikhilbarhate99/PPO-PyTorch.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Reinforcement Learning Libraries

            Try Top Libraries by nikhilbarhate99

            min-decision-transformer

            by nikhilbarhate99Python

            TD3-PyTorch-BipedalWalker-v2

            by nikhilbarhate99Python

            Actor-Critic-PyTorch

            by nikhilbarhate99Python

            Deterministic-GAIL-PyTorch

            by nikhilbarhate99Python