Giter Site home page Giter Site logo

pytorch-soft-actor-critic's Introduction

Description


Reimplementation of Soft Actor-Critic Algorithms and Applications and a deterministic variant of SAC from Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor.

Added another branch for Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor -> SAC_V

Requirements


Run


(Note: There is no need for setting Temperature(--alpha) if --automatic_entropy_tuning is True.)

For SAC :

python main.py --env-name Humanoid-v2 --aplha 0.05

For SAC (Hard Update):

python main.py --env-name Humanoid-v2 --aplha 0.05 --tau 1 --target_update_interval 1000

For SAC (Deterministic, Hard Update):

python main.py --env-name Humanoid-v2 --policy Deterministic --tau 1 --target_update_interval 1000

Default Parameters


Parameters Value
Shared -
optimizer Adam
learning rate(--lr) 3x10−4
discount(--gamma) (γ) 0.99
replay buffer size(--replay_size) 1x106
automatic_entropy_tuning(--automatic_entropy_tuning) False
number of hidden layers (all networks) 2
number of hidden units per layer(--hidden_size) 256
number of samples per minibatch(--batch_size) 256
nonlinearity ReLU
SAC -
target smoothing coefficient(--tau) (τ) 0.005
target update interval(--target_update_interval) 1
gradient steps(--updates_per_step) 1
SAC (Hard Update) -
target smoothing coefficient(--tau) (τ) 1
target update interval(--target_update_interval) 1000
gradient steps (except humanoids)(--updates_per_step) 4
gradient steps (humanoids)(--updates_per_step) 1

Environment (--env-name) Temperature (--alpha)
HalfCheetah-v2 0.2
Hopper-v2 0.2
Walker2d-v2 0.2
Ant-v2 0.2
Humanoid-v2 0.05

TODO


  • Upgrade to Pytorch 1.1.0
  • Upgrade gym to 0.12.5
  • Replace TensorboardX with torch.utils.tensorboard. (Tensorboard is available in pytorch1.1.0(torch.utils.tensorboard)).

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.