{"id":13400357,"url":"https://github.com/keras-rl/keras-rl","last_synced_at":"2025-05-13T18:12:58.776Z","repository":{"id":9952205,"uuid":"62458409","full_name":"keras-rl/keras-rl","owner":"keras-rl","description":"Deep Reinforcement Learning for Keras.","archived":false,"fork":false,"pushed_at":"2023-09-17T12:33:41.000Z","size":1414,"stargazers_count":5549,"open_issues_count":49,"forks_count":1360,"subscribers_count":198,"default_branch":"master","last_synced_at":"2025-04-25T15:48:47.391Z","etag":null,"topics":["keras","machine-learning","neural-networks","reinforcement-learning","tensorflow","theano"],"latest_commit_sha":null,"homepage":"http://keras-rl.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keras-rl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-07-02T15:53:12.000Z","updated_at":"2025-04-23T18:57:32.000Z","dependencies_parsed_at":"2023-01-13T15:39:23.542Z","dependency_job_id":"da385952-d14c-4c8b-8eea-1200b70ea069","html_url":"https://github.com/keras-rl/keras-rl","commit_stats":{"total_commits":271,"total_committers":41,"mean_commits":6.609756097560975,"dds":0.3505535055350554,"last_synced_commit":"216c3145f3dc4d17877be26ca2185ce7db462bad"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-rl%2Fkeras-rl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-rl%2Fkeras-rl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-rl%2Fkeras-rl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keras-rl%2Fkeras-rl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keras-rl","download_url":"https://codeload.github.com/keras-rl/keras-rl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000883,"owners_count":21997443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["keras","machine-learning","neural-networks","reinforcement-learning","tensorflow","theano"],"created_at":"2024-07-30T19:00:51.101Z","updated_at":"2025-05-13T18:12:58.752Z","avatar_url":"https://github.com/keras-rl.png","language":"Python","funding_links":[],"categories":["The Data Science Toolbox","Reinforcement Learning (RL) and Deep Reinforcement Learning (DRL)","Reinforcement Learning","Python","Python (144)","Algorithm Repos","时间序列","Frameworks","强化学习","Uncategorized","📚 Project Purpose"],"sub_categories":["Deep Learning Packages","RL/DRL Algorithm Implementations and Software Frameworks","Others","NLP","网络服务_其他","Frameworks and Libraries","Uncategorized","Machine Learning (Intermediate-Level"],"readme":"# Deep Reinforcement Learning for Keras\n\n[![Build Status](https://api.travis-ci.org/keras-rl/keras-rl.svg?branch=master)](https://travis-ci.org/keras-rl/keras-rl)\n[![Documentation](https://readthedocs.org/projects/keras-rl/badge/)](http://keras-rl.readthedocs.io/)\n[![License](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/keras-rl/keras-rl/blob/master/LICENSE)\n[![Join the chat at https://gitter.im/keras-rl/Lobby](https://badges.gitter.im/keras-rl/Lobby.svg)](https://gitter.im/keras-rl/Lobby)\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"/assets/breakout.gif?raw=true\" width=\"200\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"/assets/cartpole.gif?raw=true\" width=\"200\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"/assets/pendulum.gif?raw=true\" width=\"200\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## What is it?\n\n`keras-rl` implements some state-of-the art deep reinforcement learning algorithms in Python and seamlessly integrates with the deep learning library [Keras](http://keras.io).\n\nFurthermore, `keras-rl` works with [OpenAI Gym](https://gym.openai.com/) out of the box. This means that evaluating and playing around with different algorithms is easy.\n\nOf course you can extend `keras-rl` according to your own needs. You can use built-in Keras callbacks and metrics or define your own.\nEven more so, it is easy to implement your own environments and even algorithms by simply extending some simple abstract classes. Documentation is available [online](http://keras-rl.readthedocs.org).\n\n## What is included?\n\nAs of today, the following algorithms have been implemented:\n\n- [x] Deep Q Learning (DQN) [[1]](http://arxiv.org/abs/1312.5602), [[2]](https://www.nature.com/articles/nature14236)\n- [x] Double DQN [[3]](http://arxiv.org/abs/1509.06461)\n- [x] Deep Deterministic Policy Gradient (DDPG) [[4]](http://arxiv.org/abs/1509.02971)\n- [x] Continuous DQN (CDQN or NAF) [[6]](http://arxiv.org/abs/1603.00748)\n- [x] Cross-Entropy Method (CEM) [[7]](http://learning.mpi-sws.org/mlss2016/slides/2016-MLSS-RL.pdf), [[8]](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.81.6579\u0026rep=rep1\u0026type=pdf)\n- [x] Dueling network DQN (Dueling DQN) [[9]](https://arxiv.org/abs/1511.06581)\n- [x] Deep SARSA [[10]](http://people.inf.elte.hu/lorincz/Files/RL_2006/SuttonBook.pdf)\n- [ ] Asynchronous Advantage Actor-Critic (A3C) [[5]](http://arxiv.org/abs/1602.01783)\n- [ ] Proximal Policy Optimization Algorithms (PPO) [[11]](https://arxiv.org/abs/1707.06347)\n\nYou can find more information on each agent in the [doc](http://keras-rl.readthedocs.io/en/latest/agents/overview/).\n\n## Installation\n\n- Install Keras-RL from Pypi (recommended):\n\n```\npip install keras-rl\n```\n\n- Install from Github source:\n\n```\ngit clone https://github.com/keras-rl/keras-rl.git\ncd keras-rl\npython setup.py install\n```\n\n## Examples\n\nIf you want to run the examples, you'll also have to install:\n\n- **gym** by OpenAI: [Installation instruction](https://github.com/openai/gym#installation)\n- **h5py**: simply run `pip install h5py`\n\nFor atari example you will also need:\n\n- **Pillow**: `pip install Pillow`\n- **gym[atari]**: Atari module for gym. Use `pip install gym[atari]`\n\nOnce you have installed everything, you can try out a simple example:\n\n```bash\npython examples/dqn_cartpole.py\n```\n\nThis is a very simple example and it should converge relatively quickly, so it's a great way to get started!\nIt also visualizes the game during training, so you can watch it learn. How cool is that?\n\nSome sample weights are available on [keras-rl-weights](https://github.com/matthiasplappert/keras-rl-weights).\n\nIf you have questions or problems, please file an issue or, even better, fix the problem yourself and submit a pull request!\n\n## External Projects\n\n- [Starcraft II Learning Environment](https://soygema.github.io/starcraftII_machine_learning/#0)\n\nYou're using Keras-RL on a project? Open a PR and share it!\n\n## Visualizing Training Metrics\n\nTo see graphs of your training progress and compare across runs, run `pip install wandb` and add the WandbLogger callback to your agent's `fit()` call:\n\n```python\nfrom rl.callbacks import WandbLogger\n\n...\n\nagent.fit(env, nb_steps=50000, callbacks=[WandbLogger()])\n```\n\nFor more info and options, see the [W\u0026B docs](https://docs.wandb.com/getting-started).\n\n## Citing\n\nIf you use `keras-rl` in your research, you can cite it as follows:\n\n```bibtex\n@misc{plappert2016kerasrl,\n    author = {Matthias Plappert},\n    title = {keras-rl},\n    year = {2016},\n    publisher = {GitHub},\n    journal = {GitHub repository},\n    howpublished = {\\url{https://github.com/keras-rl/keras-rl}},\n}\n```\n\n## References\n\n1. _Playing Atari with Deep Reinforcement Learning_, Mnih et al., 2013\n2. _Human-level control through deep reinforcement learning_, Mnih et al., 2015\n3. _Deep Reinforcement Learning with Double Q-learning_, van Hasselt et al., 2015\n4. _Continuous control with deep reinforcement learning_, Lillicrap et al., 2015\n5. _Asynchronous Methods for Deep Reinforcement Learning_, Mnih et al., 2016\n6. _Continuous Deep Q-Learning with Model-based Acceleration_, Gu et al., 2016\n7. _Learning Tetris Using the Noisy Cross-Entropy Method_, Szita et al., 2006\n8. _Deep Reinforcement Learning (MLSS lecture notes)_, Schulman, 2016\n9. _Dueling Network Architectures for Deep Reinforcement Learning_, Wang et al., 2016\n10. _Reinforcement learning: An introduction_, Sutton and Barto, 2011\n11. _Proximal Policy Optimization Algorithms_, Schulman et al., 2017\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeras-rl%2Fkeras-rl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeras-rl%2Fkeras-rl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeras-rl%2Fkeras-rl/lists"}