![]() |
![]() |
![]() |
keras-rl2
implements some state-of-the art deep reinforcement learning algorithms in Python and seamlessly integrates with the deep learning library Keras.
Furthermore, keras-rl2
works with OpenAI Gym out of the box. This means that evaluating and playing around with different algorithms is easy.
Of course you can extend keras-rl2
according to your own needs. You can use built-in Keras callbacks and metrics or define your own.
Even more so, it is easy to implement your own environments and even algorithms by simply extending some simple abstract classes. Documentation is available online.
As of today, the following algorithms have been implemented:
You can find more information on each agent in the doc.
pip install keras-rl2
git clone https://github.com/keras-rl2/keras-rl2.git
cd keras-rl
python setup.py install
If you want to run the examples, you'll also have to install:
pip install h5py
For atari example you will also need:
pip install Pillow
pip install gym[atari]
Once you have installed everything, you can try out a simple example:
python examples/dqn_cartpole.py
This is a very simple example and it should converge relatively quickly, so it's a great way to get started! It also visualizes the game during training, so you can watch it learn. How cool is that?
If you have questions or problems, please file an issue or, even better, fix the problem yourself and submit a pull request!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。