{"id":25810195,"url":"https://github.com/hrshl212/td3-libtorch","last_synced_at":"2026-05-18T19:31:48.552Z","repository":{"id":239284315,"uuid":"457312953","full_name":"hrshl212/TD3-libtorch","owner":"hrshl212","description":"TD3 reinforcement learning algorithm using libtorch in simple environment","archived":false,"fork":false,"pushed_at":"2024-06-11T19:58:24.000Z","size":20579,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-12T04:42:04.400Z","etag":null,"topics":["deep-reinforcement-learning","libtorch","pytorch","reinforcement-learning"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrshl212.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-09T10:34:00.000Z","updated_at":"2024-06-11T19:58:28.000Z","dependencies_parsed_at":"2024-05-11T08:49:31.810Z","dependency_job_id":null,"html_url":"https://github.com/hrshl212/TD3-libtorch","commit_stats":null,"previous_names":["hrshl212/td3-libtorch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrshl212%2FTD3-libtorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrshl212%2FTD3-libtorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrshl212%2FTD3-libtorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrshl212%2FTD3-libtorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrshl212","download_url":"https://codeload.github.com/hrshl212/TD3-libtorch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241074886,"owners_count":19905312,"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":["deep-reinforcement-learning","libtorch","pytorch","reinforcement-learning"],"created_at":"2025-02-27T23:36:37.371Z","updated_at":"2026-05-18T19:31:48.490Z","avatar_url":"https://github.com/hrshl212.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TD3-Pytorch-C++-\nTD3 deep reinforcement learning algorithm using C++/libtorch in simple environment of finding shortest distance between two points. The environment is taken from https://github.com/mhubii/ppo_libtorch\n\nThis is an implementation of the twin-delayed deep deterministic (TD3) policy gradient algorithm for the C++ API of Pytorch. It uses a simple TestEnvironment to test the algorithm. Below is a small visualization of the environment, the algorithm is tested in.\n\n![This is an image](/img/epoch_30.gif)\n\n\nFig. 1: The agent in training during epoch 30.\n\nYou first need to install LibTorch. I used the version 1.4.0+cpu.\n\nDo\n```\nmkdir build\ncd build\ncmake -DCMAKE_PREFIX_PATH=/absolut/path/to/libtorch ..\nmake\n```\n# Run\nRun the executable with\n```\ncd build\n./train_ppo\n```\n\nIt should produce something like shown below.\n\n\n![This is an image](/img/epoch_4.gif)\n![This is an image](/img/epoch_11.gif)\n\nFig. 2: From left to right, the agent for successive epochs in training mode as it takes actions in the environment to reach the goal.\n\n\n# Visualization\nThe results are saved to data/data.csv and can be visualized by running python plot.py.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrshl212%2Ftd3-libtorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrshl212%2Ftd3-libtorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrshl212%2Ftd3-libtorch/lists"}