https://github.com/fork123aniket/model-based-reinforcement-learning
Implementation of Model-based Reinforcement Learning Approach in Tensorflow
https://github.com/fork123aniket/model-based-reinforcement-learning
deep-learning deep-reinforcement-learning reinforcement-learning reinforcement-learning-agent reinforcement-learning-algorithms reinforcement-learning-environments tensorflow tensorflow-models tensorflow-tutorial
Last synced: 3 months ago
JSON representation
Implementation of Model-based Reinforcement Learning Approach in Tensorflow
- Host: GitHub
- URL: https://github.com/fork123aniket/model-based-reinforcement-learning
- Owner: fork123aniket
- License: mit
- Created: 2022-05-16T09:34:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-19T13:44:06.000Z (about 3 years ago)
- Last Synced: 2025-02-13T18:49:30.925Z (4 months ago)
- Topics: deep-learning, deep-reinforcement-learning, reinforcement-learning, reinforcement-learning-agent, reinforcement-learning-algorithms, reinforcement-learning-environments, tensorflow, tensorflow-models, tensorflow-tutorial
- Language: Python
- Homepage:
- Size: 145 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Model-Based Reinforcement Learning
This repository provides a tensorflow implementation of Model-based reinforcement learning for ***CartPole*** environment. This repo also aims at helping beginners in [Reinforcement Learning](https://en.wikipedia.org/wiki/Reinforcement_learning) to better understand how to train the agent using the model rather than requiring to use the real environment every time in order to learn the dynamics of the real environment space.
A concise explaination of Model-based reinforcement learning algorithm can be found [here](https://medium.com/@awjuliani/simple-reinforcement-learning-with-tensorflow-part-3-model-based-rl-9a6fe0cce99).
## Requirements
- `tensorflow`
- `matplotlib`
- `numpy`
## Training Environment Used
- `OpenAI Gym's CartPole-v1 Environment`
## Usage
- `Model_based_RL.py` file contains code statements related to ***Model Network*** and ***Policy Network*** that are being used here.
- The training procedure involves switching between training the ***Model Network*** using the real environment, and training the agent’s policy using the model environment. By using this approach, the ***Model Network*** will be able to learn a policy that allows the trained agent to solve the ***CartPole*** task without actually ever training the policy on the real environment.
- All hyperparameters to train the two networks can be found in `Model_based_RL.py`.
- The *episode number, action, reward and mean reward* are printed after very epoch during training time.
## Results
| CartPole-v1 Environment | CartPole-v1 Results |
| ------------------------------ |:-----------------------------:|
|  |  |