{"id":16272316,"url":"https://github.com/perinim/dqn-swingup","last_synced_at":"2025-04-08T15:47:23.475Z","repository":{"id":180116222,"uuid":"664615033","full_name":"PeriniM/DQN-SwingUp","owner":"PeriniM","description":"DQN algorithm to solve the swing-up problem for a N-Pendulum","archived":false,"fork":false,"pushed_at":"2023-12-13T13:22:47.000Z","size":24261,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T12:19:12.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/PeriniM.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,"roadmap":null,"authors":null}},"created_at":"2023-07-10T11:18:02.000Z","updated_at":"2024-07-04T23:55:01.000Z","dependencies_parsed_at":"2023-11-16T21:52:08.516Z","dependency_job_id":"608f955f-ede2-47b0-9d72-6c3b85e74446","html_url":"https://github.com/PeriniM/DQN-SwingUp","commit_stats":null,"previous_names":["perinim/dqn-swingup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeriniM%2FDQN-SwingUp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeriniM%2FDQN-SwingUp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeriniM%2FDQN-SwingUp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeriniM%2FDQN-SwingUp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeriniM","download_url":"https://codeload.github.com/PeriniM/DQN-SwingUp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247875120,"owners_count":21010838,"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":[],"created_at":"2024-10-10T18:17:16.337Z","updated_at":"2025-04-08T15:47:18.463Z","avatar_url":"https://github.com/PeriniM.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DQN Algorithm N-Pendulum Swing-Up\n ![Double Pendulum Swing Up](final_results/2-pendulum/videos/swing-up.gif)\n## Introduction\nThis project aims at implementing the DQN algorithm to solve the single and double pendulum swing-up problem. It uses Pinocchio library to compute the dynamics of the system and Gepetto Viewer to visualize the system. The DQN algorithm is implemented using Tensorflow 2.12.\n\n## Installation\n### Dependencies\n- [Pinocchio](https://stack-of-tasks.github.io/pinocchio/download.html)\n- [Gepetto Viewer](https://gepettoweb.laas.fr/hpp/gepetto-viewer/doxygen-html/index.html)\n\n### Requirements\n- [Python 3.8](https://www.python.org/downloads/)\n- numpy==1.23.5\n- tensorflow==2.12.0\n- matplotlib==3.7.1\n- seaborn==0.12.2\n\n### Installation\n#### Ubuntu 20.04\n```bash\ngit clone https://github.com/PeriniM/DQN-SwingUp.git\ncd ORC_Assignment_3/code\npython -m venv env\nsource env/bin/activate\npip install -r requirements.txt\n```\n#### Windows\nPinocchio and Gepetto Viewer are not available. You can either install them in a UNIX environment (WSL, Anaconda etc.) or use the FakeEnv class to emulate a random environment for testing purposes. In this case, you need to follow the same steps for Ubuntu 20.04 and set the environment flag in the main.py file as follows:\n```python\nisFake = True\n```\n## [Documentation](https://perinim.github.io/DQN-SwingUp/)\n\n## Project Structure\n- 📄[main.py](main.py)\n- ⚙️[config.ini](config.ini)\n- 📂[DQN](DQN)\n    - 📄[Agent.py](DQN/Agent.py)\n    - 📄[DeepQNetwork.py](DQN/DeepQNetwork.py)\n    - 📄[ReplayBuffer.py](DQN/ReplayBuffer.py)\n- 📂[Environments](Environments)\n    - 📄[Pendulum.py](Environments/Pendulum.py)\n    - 📄[Display.py](Environments/Display.py)\n    - 📄[FakeEnv.py](Environments/FakeEnv.py)\n- 📂[saved_weights](saved_weights)\n- 📂[saved_metrics](saved_metrics)\n- 📂[final_results](final_results)\n\n## Usage\n- Set the parameters in the config.ini file\n- Set the environment and the number of joints in the main.py file\n- Set the train, evaluate and plot_colormaps flags in the main.py file\n- Run the main.py file\n\n## Papers\n- [Human-level control through deep reinforcement learning](https://www.nature.com/articles/nature14236)\n- [Implementing the Deep Q-Network](https://arxiv.org/pdf/1711.07478.pdf)\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperinim%2Fdqn-swingup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperinim%2Fdqn-swingup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperinim%2Fdqn-swingup/lists"}