GithubHelp home page GithubHelp logo

drl-tensorflow's Introduction

本代码库基本停止维护了,请移步最新的代码库: https://github.com/kaixindelele/DRLib

文件命名示例:

sac_sp.py:凡是带下划线sp的文件,都是spinup中的封装形式,即把强化算法封装成函数;

sac_class.py 凡是带class的文件,都是封装成类的形式,便于大家直接调用;

sac_auto_per_class 凡是带per的文件,都是可以选择是否调用优先经验回放的class,但是有时候优先经验回放并不一定好使,谨慎使用。

另外关于sac_auto,也被称作sac2,或者自适应sac,因为alpha超参数是放到网络中进行学习,一般来说要比sac更容易调用。

--

2020-12-09

发现这是我获得star最多的一个项目了。

刚才过了一遍所有的文件,发现优先经验回放PER没有单独抽取出来,还是和DDPG打包在一起的,这样会导致不能和TD3,SAC兼容。

另外sac-auto也没有提交。

事后经验回放HER没有实现(我到现在还没有调出最好的参数,贼烦,我本以为her是灵丹妙药,没想到不过如此)。

另外继续搞tf1感觉有种49年入国军的错觉。

难顶

--

DRL-tensorflow

My DRL library with tensorflow1.14 core codes based on https://github.com/openai/spinningup

My job is wrap the algorithms functions into classes in order to easy to call. Maintain the performance in gym environments of the original codes.

越来越丰富了,基本上将主流的深度强化学习的off-policy的三个主要算法都打包成功了。 目前都是最简单的模式,直接进入algo_class.py的文件中,run就完事儿了。

对于结果的显示,以及性能的对比,目前做的还不够,因为我还没吃透spinning-up的log类,没有办法更方便的将这个功能嵌入进去。 还有画图的功能,目前只能用乞丐版的matplotlib画个图。

等我有时间了再加点功能~


已经更新了logger和plot功能,功能实现代码在sp_utils文件夹中,直接抽调了spinup的代码,做了稍许修改。 在run_in_gym这个文件夹中可以直接试用该功能,非常方便。 spinup的这两个功能可以抽调到大家自己开发的包当中,比自己实现要省事儿很多。

另外,个人感觉我封装的这三个算法,好像不是特别的完美,在gym中测试好像没有问题,但是在机器人环境中无法收敛。 要是有人测试出bug的话,恳请告知~


大家要是用起来有什么bug,欢迎开issues~ 要是有帮助的话,希望能给个star。

过段时间看看能不能加个LSTM的,我已经看到有大佬的实现了,整合一下到我这个包里~

drl-tensorflow's People

Contributors

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

drl-tensorflow's Issues

关于TD3中训练更新的频率问题

感谢您的分享!因为你的网络更新和论文作者的不一样,我的疑问如下:
本repo中,for _ in range(args.max_steps) 这行代码是表示执行max_step=1000之后开始更新1000次吗?

if j == args.max_steps - 1:
                up_st = time.time()
                for _ in range(args.max_steps): # 
                    net.learn()

论文作者的PyTorch-SAC和其它大多数repo中更新的方式是下面这样:

for t in range(int(args.max_timesteps)):
      ......
     if t >= args.start_timesteps:
			policy.train(replay_buffer, args.batch_size)

前者是执行1000步折后更新1000次,后者是没执行1步,更新1次的意思吗?

再次感谢您的分享~

关于奖励函数结果曲线

你好,我用您的程序跑了下,画出了300次后的曲线,我想问的是奖励从负数稳定在0 附近,请问为什么奖励没有朝着正数发展呢,可以添加您的微信或者QQ交流吗

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.