{"id":14958959,"url":"https://github.com/fork123aniket/model-based-reinforcement-learning","last_synced_at":"2026-01-19T06:33:40.778Z","repository":{"id":158619659,"uuid":"492769556","full_name":"fork123aniket/Model-Based-Reinforcement-Learning","owner":"fork123aniket","description":"Implementation of Model-based Reinforcement Learning Approach in Tensorflow","archived":false,"fork":false,"pushed_at":"2022-05-19T13:44:06.000Z","size":148,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T16:33:02.013Z","etag":null,"topics":["deep-learning","deep-reinforcement-learning","reinforcement-learning","reinforcement-learning-agent","reinforcement-learning-algorithms","reinforcement-learning-environments","tensorflow","tensorflow-models","tensorflow-tutorial"],"latest_commit_sha":null,"homepage":"","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/fork123aniket.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2022-05-16T09:34:22.000Z","updated_at":"2024-03-06T16:02:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"396dc47c-9ab8-42f9-a297-179c4ee0407b","html_url":"https://github.com/fork123aniket/Model-Based-Reinforcement-Learning","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":0.5,"last_synced_commit":"c0334e4b0ab8a286a2f104f928f61a8e68a71435"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fork123aniket/Model-Based-Reinforcement-Learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fork123aniket%2FModel-Based-Reinforcement-Learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fork123aniket%2FModel-Based-Reinforcement-Learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fork123aniket%2FModel-Based-Reinforcement-Learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fork123aniket%2FModel-Based-Reinforcement-Learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fork123aniket","download_url":"https://codeload.github.com/fork123aniket/Model-Based-Reinforcement-Learning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fork123aniket%2FModel-Based-Reinforcement-Learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["deep-learning","deep-reinforcement-learning","reinforcement-learning","reinforcement-learning-agent","reinforcement-learning-algorithms","reinforcement-learning-environments","tensorflow","tensorflow-models","tensorflow-tutorial"],"created_at":"2024-09-24T13:18:35.524Z","updated_at":"2026-01-19T06:33:40.763Z","avatar_url":"https://github.com/fork123aniket.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Model-Based Reinforcement Learning\nThis 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.\nA 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).\n## Requirements\n- `tensorflow`\n- `matplotlib`\n- `numpy`\n## Training Environment Used\n- `OpenAI Gym's CartPole-v1 Environment`\n## Usage\n- `Model_based_RL.py` file contains code statements related to ***Model Network*** and ***Policy Network*** that are being used here.\n- 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.\n- All hyperparameters to train the two networks can be found in `Model_based_RL.py`.\n- The *episode number, action, reward and mean reward* are printed after very epoch during training time.\n## Results\n| CartPole-v1 Environment        | CartPole-v1 Results           |\n| ------------------------------ |:-----------------------------:|\n| ![alt text](https://github.com/fork123aniket/Model-Based-Reinforcement-Learning/blob/main/Images/CartPole-v1.gif) | ![alt text](https://github.com/fork123aniket/Model-Based-Reinforcement-Learning/blob/main/Images/Result.PNG) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffork123aniket%2Fmodel-based-reinforcement-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffork123aniket%2Fmodel-based-reinforcement-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffork123aniket%2Fmodel-based-reinforcement-learning/lists"}