简介
现有的 RL 框架并没有结合灵活性和稳定性以及使研究人员能够有效地迭代 RL 方法,并因此探索可能没有直接明显益处的新研究方向。所以Google推出一个基于 Tensorflow 的框架,旨在为 RL 的研究人员提供灵活性、稳定性和可重复性。此版本还包括一组阐明如何使用整个框架的 colabs。
精简的代码(大约 15 个Python 文件)。通过专注于 Arcade 学习环境(一个成熟的,易于理解的基准)和四个基于 value 的智能体来实现的
- DQN:DeepMind 的深度 Q 网络,核心就是强化学习
- C51
- 一个精心策划的 Rainbow 智能体的简化版本
- 隐式分位数网络(Implicit Quantile Network)智能体
对于新的研究人员来说,能够根据既定方法快速对其想法进行基准测试非常重要。因此,我们为 Arcade 学习环境支持的 60 个游戏提供四个智能体的完整培训数据,可用作 Python pickle 文件(用于使用我们框架训练的智能体)和 JSON 数据文件(用于与受过其他框架训练的智能体进行比较);我们还提供了一个网站,你可以在其中快速查看 60 个游戏中所有智能体的训练运行情况。
ubuntu+python27+tensorflow下使用
1:搭建基本环境
参见基本方法
2:Dopamine依赖
tensorflow上一步就装好了,接下来,按照工程中的步骤一步一步来
python
source activate easytensor27
sudo apt-get update && sudo apt-get install cmake zlib1g-dev
pip install absl-py atari-py gin-config gym opencv-python
git clone https://github.com/google/dopamine.git
pwd
ls
cd dopamine/
3:测试
3.1:基本测试
在shell中执行程序时,shell会提供一组环境变量。export可新增,修改或删除环境变量,供后续执行的程序使用。export的效力仅及于该次登陆操作。
(easytensor27) chen@chen-ThinkStation-D30:~/dopamine$ export PYTHONPATH=${PYTHONPATH}:.
(easytensor27) chen@chen-ThinkStation-D30:~/dopamine$ python tests/atari_init_test.py
2018-09-06 14:51:45.927207: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX
2018-09-06 14:51:46.254906: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties:
name: Quadro K5200 major: 3 minor: 5 memoryClockRate(GHz): 0.771
pciBusID: 0000:05:00.0
totalMemory: 7.43GiB freeMemory: 6.93GiB
2018-09-06 14:51:46.254964: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0
2018-09-06 14:51:53.170582: