Giter Club home page Giter Club logo

pytorch_rl_2d_robot_arm's Introduction

Pytorch RL 2d robot arm

基于pytorch的2d机械臂强化学习项目。最近学习莫烦大神的强化学习课程: RL-build-arm-from-scratch1.但是原版提供强化学习代码的基于tensorflow的代码,由于本人相对喜欢pytorch编程,这里提供基于pytorch方案。原课程有5节课。

  • Part 1: built a training framework
  • Part 2: Learn to build a environment from scratch
  • Part 3: Complete the basic environment script, see how arm moves
  • Part 4: Plug a Reinforcement Learning method and try to train it
  • Part 5: Optimize and debug it
  • Final: Make a moving goal

该部分代码对应final部分,只更改了rl.py部分,替换tensorflow为pytorch。

只有part 4,part5,final涉及强化学习,只需要替换rl.py文件即可,api完全兼容。需要新建model目录用来保存模型。

该版本强化学习算法采用的是 DDPG 。也是从网上找到的代码,修改了部分api,形成rl.py文件。

参考链接:Deep-reinforcement-learning-with-pytorch

Requirements

  • python=3.6

  • pytorch=1.0

  • gym=0.12(无需MuJoCo )


快速开始

该项目包含训练好的模型(GPU下训练),在model目录下,所以可以直接开始测试

测试:

修改main.py代码

ON_TRAIN = False

运行

python main.py

训练:

修改main.py代码

ON_TRAIN = True

运行

python main.py

如有侵权,联系删除。

pytorch_rl_2d_robot_arm's People

Contributors

gezp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.