实例介绍
RLCode团队呈现了一系列简洁明了的强化学习算法示例。从基础知识到深度强化学习,该存储库提供了易于阅读的代码示例。每个算法都有一个文件。
请随意创建Pull Request或提出问题!
依赖关系
- Python 3.5
- Tensorflow 1.0.0
- Keras
- numpy
- pandas
- matplot
- pillow
- Skimage
- h5py
安装要求:
pip install -r requirements.txt目录
Grid World
掌握“网格世界”中的强化学习基础
- 策略迭代
- 值迭代
- 蒙特卡洛
- SARSA
- Q学习
- 深度SARSA
- REINFORCE
CartPole
在基本的Cartpole游戏上应用深度强化学习
- 深度Q网络
- 双重深度Q网络
- 策略梯度
- 演员评论家(A2C)
- 异步优势演员评论家(A3C)
Atari
通过深度强化学习掌握Atari游戏
- Breakout - DQN, DDQN Dueling DDQN A3C
- Pong - 策略梯度
OpenAI GYM - [WIP]
Mountain Car - DQN
【实例截图】
【核心代码】
文件清单
└── reinforcement-learning-2fe6984da684c3f64a8d09d1718dbac9330aecea
├── 1-grid-world
│ ├── 1-policy-iteration
│ │ ├── environment.py
│ │ └── policy_iteration.py
│ ├── 2-value-iteration
│ │ ├── environment.py
│ │ └── value_iteration.py
│ ├── 3-monte-carlo
│ │ ├── environment.py
│ │ └── mc_agent.py
│ ├── 4-sarsa
│ │ ├── environment.py
│ │ └── sarsa_agent.py
│ ├── 5-q-learning
│ │ ├── environment.py
│ │ └── q_learning_agent.py
│ ├── 6-deep-sarsa
│ │ ├── deep_sarsa_agent.py
│ │ ├── environment.py
│ │ ├── save_graph
│ │ │ └── deep_sarsa_trained.png
│ │ └── save_model
│ │ └── deep_sarsa_trained.h5
│ ├── 7-reinforce
│ │ ├── environment.py
│ │ ├── reinforce_agent.py
│ │ ├── save_graph
│ │ │ └── reinforce_trained.png
│ │ └── save_model
│ │ └── reinforce_trained.h5
│ ├── gridworld_changing.png
│ ├── gridworld.png
│ ├── img
│ │ ├── circle.png
│ │ ├── down.png
│ │ ├── left.png
│ │ ├── rectangle.png
│ │ ├── right.png
│ │ ├── triangle.png
│ │ └── up.png
│ └── README.md
├── 2-cartpole
│ ├── 1-dqn
│ │ ├── cartpole_dqn.py
│ │ ├── cartpole_only_per.py
│ │ ├── save_graph
│ │ │ └── Cartpole_DQN.png
│ │ ├── save_model
│ │ │ └── cartpole_dqn.h5
│ │ └── SumTree.py
│ ├── 2-double-dqn
│ │ ├── cartpole_ddqn.py
│ │ ├── save_graph
│ │ │ └── cartpole_ddqn.png
│ │ └── save_model
│ │ └── cartpole_ddqn.h5
│ ├── 3-reinforce
│ │ ├── cartpole_reinforce.py
│ │ ├── save_graph
│ │ │ └── cartpole_reinforce.png
│ │ └── save_model
│ │ └── cartpole_reinforce.h5
│ ├── 4-actor-critic
│ │ ├── cartpole_a2c.py
│ │ ├── save_graph
│ │ │ └── cartpole_a2c.png
│ │ └── save_model
│ │ ├── cartpole_actor.h5
│ │ └── cartpole_critic.h5
│ ├── 5-a3c
│ │ ├── cartpole_a3c.py
│ │ └── save_model
│ │ ├── Cartpole_A3C_actor.h5
│ │ └── Cartpole_A3C_critic.h5
│ ├── cartpole.png
│ ├── LICENSE
│ └── README.md
├── 3-atari
│ ├── 1-breakout
│ │ ├── breakout_a3c.py
│ │ ├── breakout_ddqn.py
│ │ ├── breakout_dqn.py
│ │ ├── breakout_dueling_ddqn.py
│ │ ├── play_a3c_model.py
│ │ ├── play_dqn_model.py
│ │ ├── save_model
│ │ │ ├── breakout_a3c_1_actor.h5
│ │ │ ├── breakout_a3c_1_critic.h5
│ │ │ ├── breakout_a3c_2_actor.h5
│ │ │ ├── breakout_a3c_2_critic.h5
│ │ │ ├── breakout_a3c_3_actor.h5
│ │ │ ├── breakout_a3c_3_critic.h5
│ │ │ ├── breakout_a3c_4_actor.h5
│ │ │ ├── breakout_a3c_4_critic.h5
│ │ │ ├── breakout_a3c_5_actor.h5
│ │ │ ├── breakout_a3c_5_critic.h5
│ │ │ ├── breakout_dqn_1.h5
│ │ │ ├── breakout_dqn_2.h5
│ │ │ ├── breakout_dqn_3.h5
│ │ │ ├── breakout_dqn_4.h5
│ │ │ ├── breakout_dqn_5.h5
│ │ │ └── breakout_dqn.h5
│ │ └── summary
│ │ ├── breakout_a3c
│ │ │ └── events.out.tfevents.1497264638
│ │ └── breakout_dqn
│ │ └── events.out.tfevents.1496968668.young-System-Product-Name
│ ├── 2-pong
│ │ ├── assets
│ │ │ ├── pg.gif
│ │ │ └── score.png
│ │ ├── pong_a3c.py
│ │ ├── pong_reinforce.py
│ │ ├── README.md
│ │ └── save_model
│ │ └── pong_reinforce.h5
│ └── LICENSE
├── 4-gym
│ └── 1-mountaincar
│ ├── mountaincar_dqn.py
│ └── save_model
│ └── MountainCar_DQN.h5
├── images
│ └── Reinforcement-Learning.png
├── LICENSE
├── README.md
├── requirements.txt
└── wiki
├── how-to-windows.md
├── img
│ ├── how-to-windows.png
│ ├── link-env-with-pychar-1.png
│ ├── link-env-with-pychar-2.png
│ └── link-env-with-pychar.png
├── install_guide_osx ubuntu.md
└── rlcode_image
├── cartpole_exam.png
├── console_hello_world.png
├── default_config.png
├── file_setting.png
├── hello_world_ubuntu.png
├── openai_github.png
├── project_interpreter.png
├── pycham_new_project.png
├── pycharm_community.png
├── pycharm_drag.png
├── pycharm_init.png
├── python3_terminal.jpg
├── python_download.png
├── python_installed.png
├── python_intalled.png
├── rl_book_hello_world.png
├── rl_book_project.png
├── rl_book_venv.png
├── rl_book_virtualenv.png
├── rlcode_book_directory.png
├── rlcode_project.png
├── run_hello_world.png
├── sh_pycharm.sh.png
└── terminal_rlcode_book.png
45 directories, 116 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论