NOTE
Check out the code for Simple Distributed Reinforcement Learning.
I am creating a reinforcement learning framework including R2D2.
以下Qiita記事の実装コードとなります。 コードの解説及び各ハイパーパラメータについては記事を参照してください。
Keras 向けの強化学習ライブラリである Keras-rl の Agent を拡張したものとなります。
以下のアルゴリズムを実装しています。(非公式です)
- Rainbow
- Deep Q Learning (DQN)
- Double DQN
- Priority Experience Reply
- Dueling Network
- Multi-Step learning
- (not implemented Noisy Network)
- (not implemented Categorical DQN)
- Deep Recurrent Q-Learning(DRQN)
- Ape-X
- Recurrent Replay Distributed DQN(R2D2)
使っているパッケージは以下です。
- pip install tensorflow (or tensorflow-cpu or tensorflow-gpu)
- pip install keras
- pip install keras-rl
- pip install gym
- pip install numpy
- pip install matplotlib
- pip install opencv-python
- pip install pillow
必要に応じて以下のレポジトリも参照してください。
- windows 10
- python 3.7.5
- tensorflow 2.1.0
- tensorflow-gpu 2.1.0
- cuda_10.1.243
- cudnn v7.6.5.32
- Keras 2.3.1
- keras-rl 0.4.2
- gym 0.17.1
- numpy 1.18.2
- matplotlib 3.2.1
- opencv-python 4.1.2.30
- pillow 6.2.1
このレポジトリをダウンロードします。
> git clone https://github.com/pocokhc/r2d2.git
> cd r2d2
example にいくつか実行例が入っています。
> cd r2d2/examples
> python rainbow_pendulum.py