{"id":25543557,"url":"https://github.com/loki-silvres/car-racing-ppo","last_synced_at":"2026-05-02T05:33:35.053Z","repository":{"id":272042764,"uuid":"915355577","full_name":"Loki-Silvres/Car-Racing-PPO","owner":"Loki-Silvres","description":"Proximal Policy Optimization (PPO) algorithm for training an agent to master the CarRacing-v3 ","archived":false,"fork":false,"pushed_at":"2025-02-14T12:41:46.000Z","size":63775,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T13:39:30.652Z","etag":null,"topics":["carracing","deep-reinforcement-learning","openai-gym","ppo","reinforcement-learning","stable-baselines3"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Loki-Silvres.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":"2025-01-11T16:26:06.000Z","updated_at":"2025-02-14T12:43:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"dae9a23f-19cb-41fc-be90-d310e73e0217","html_url":"https://github.com/Loki-Silvres/Car-Racing-PPO","commit_stats":null,"previous_names":["loki-silvres/gym-practice","loki-silvres/car-racing-ppo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loki-Silvres%2FCar-Racing-PPO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loki-Silvres%2FCar-Racing-PPO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loki-Silvres%2FCar-Racing-PPO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Loki-Silvres%2FCar-Racing-PPO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Loki-Silvres","download_url":"https://codeload.github.com/Loki-Silvres/Car-Racing-PPO/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239793069,"owners_count":19697893,"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":["carracing","deep-reinforcement-learning","openai-gym","ppo","reinforcement-learning","stable-baselines3"],"created_at":"2025-02-20T07:20:12.414Z","updated_at":"2026-05-02T05:33:35.027Z","avatar_url":"https://github.com/Loki-Silvres.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Car Racing PPO\n\nThis repository provides an implementation of the Proximal Policy Optimization (PPO) algorithm for training an agent to master the [CarRacing-v3](https://gym.openai.com/envs/CarRacing-v0/) environment from OpenAI Gym with StableBaselines3. It aims to offer a straightforward yet powerful setup for both training and evaluating reinforcement learning agents in continuous control tasks.\n\n## Prerequisites\n\n- [Conda](https://docs.conda.io/en/latest/) (or any virtual environment tool)\n- Python 3.11\n- Trained on RTX 4060 Laptop GPU (optional)\n\n## Installation\n\nSet up your environment and install dependencies by running:\n\n```bash\nconda create -n CRP python=3.11\nconda activate CRP\npip install -r requirements.txt\n```\n\n## Training the Agent\n\nTo begin training PPO agent on the CarRacing environment, execute:\n\n```bash\npython3 src/train.py\n```\n\nThis script will initialize the training process, log performance metrics, and save model checkpoints periodically. You can customize hyperparameters (like learning rate, discount factor, and clip range) directly within the script.\n\n## Evaluating the Agent\n\nAfter training—or if you have a pre-trained model—you can evaluate your agent’s performance with:\n\n```bash\npython3 src/eval.py\n```\n\nThis evaluation script loads the saved model and runs it in the environment, providing insights into its racing capabilities.\n\n## Demo\n\nView a demonstration of the trained agent in action:\n\n[CarRacingV3Demo](https://github.com/user-attachments/assets/742933df-e748-4c3e-a2b6-a03c3adef26d)\n\n## Project Structure\n\n```\n├── src\n│   ├── train.py        # Script for training the PPO agent\n│   ├── eval.py         # Script for evaluating the trained model\n│   └── ...             # Additional modules and utilities\n├── requirements.txt    # List of Python dependencies\n└── README.md           # This file\n```\n\n## Customization and Hyperparameters\n\nTo modify training settings within `src/train.py` to experiment with different configurations. Parameters such as learning rate, batch size, discount factor, and clip range can be adjusted to suit needs.\n\n## Acknowledgements\n\n- [OpenAI Gym](https://gym.openai.com/) for providing the simulation environment.\n- [StableBaselines3](https://stable-baselines3.readthedocs.io/en/master/) for PPO implementation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floki-silvres%2Fcar-racing-ppo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floki-silvres%2Fcar-racing-ppo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floki-silvres%2Fcar-racing-ppo/lists"}