{"id":24306655,"url":"https://github.com/rob1997/kart-ai","last_synced_at":"2026-03-11T05:02:20.198Z","repository":{"id":161192897,"uuid":"326998002","full_name":"rob1997/kart-ai","owner":"rob1997","description":"A Game AI implementation using Reinforcement Learning via ML-Agents in Unity.","archived":false,"fork":false,"pushed_at":"2025-01-12T08:42:02.000Z","size":153294,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-24T19:47:32.943Z","etag":null,"topics":["kart","ml-agents","procedural-generation","racing","reinforcement-learning","unity"],"latest_commit_sha":null,"homepage":"","language":"ShaderLab","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/rob1997.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-05T12:52:30.000Z","updated_at":"2025-03-28T21:11:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"4138a4f3-941d-4e04-ada2-ef07c893964b","html_url":"https://github.com/rob1997/kart-ai","commit_stats":null,"previous_names":["rob1997/kart-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rob1997/kart-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob1997%2Fkart-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob1997%2Fkart-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob1997%2Fkart-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob1997%2Fkart-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rob1997","download_url":"https://codeload.github.com/rob1997/kart-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob1997%2Fkart-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30372126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["kart","ml-agents","procedural-generation","racing","reinforcement-learning","unity"],"created_at":"2025-01-17T03:38:27.458Z","updated_at":"2026-03-11T05:02:20.193Z","avatar_url":"https://github.com/rob1997.png","language":"ShaderLab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kart AI\n[![GitHub release](https://img.shields.io/github/v/release/rob1997/TrackGenerator?include_prereleases)](https://rob1997.github.io/kart-ai/)\n[![Made with Unity](https://img.shields.io/badge/Made%20with-Unity-57b9d3.svg?style=flat\u0026logo=unity)](https://unity3d.com)\n[![GitHub license](https://img.shields.io/github/license/rob1997/TrackGenerator)](https://opensource.org/licenses/MIT)\n\nA Game AI implementation using Reinforcement Learning via [ML-Agents]() in Unity.\n\nUnity Version: `6000.0.31f1`\n\n![demo](./demo.gif)\n\n## Usage (Training)\n\nYou can open up `Heuristic` scene under `Assets/Scenes` to test the AI. However, if you'd like to train your own AI you can follow the steps below.\n\n### 1. Set up your own Agent\nTo do this you can look at `Jeep.prefab` under `Assets/Prefabs`, you'll need to set up your Agent in a similar way (hierarchy matters). Once you've your Agent set up, you can take a look at `PlayerJeep.prefab` and `AiJeep_Training.prefab` in the same directory to set up prefab variants for Player and AI respectively.\n\n### 2. Set up your Environment\n\nTo do this you can look at `Training` scene under `Assets/Scenes`, you'll need to set up your Environments in a similar way. Each Environment has a `Simulation` script and a `RandomTrackGenerator` script attached to it, moreover it has a plane with a `MeshCollider` and a trainable Agent as child objects. The number of Environments you have will determine the number of Agents you can train simultaneously.\n\n### 3. Set up your Training Config File\n\nYou can find the training config file under `configs/ppo/kart-ai.yaml`. You can change the values to suit your needs based on the [ML-Agents documentation](https://unity-technologies.github.io/ml-agents/Training-Configuration-File/).\n\n### 4. Train your AI\n\nIf you don't already have ML-Agents installed you can do so by following the instructions [here](https://unity-technologies.github.io/ml-agents/Installation/). Once you've ML-Agents installed you can train your AI by running the following command in the terminal.\n\n```bash\nmlagents-learn \u003cpath-to-config-file\u003e --run-id=\u003crun-identifier\u003e\n```\n\nYou can also find more information on training your Agent [here](https://unity-technologies.github.io/ml-agents/Training-ML-Agents/).\n\n## Configuration\n\nEvery configurable property for the Environment, Agent and Training has a tooltip you can access by hovering over it on the inspector.\n\n## How it Works\n\nIf you would like to know how it works, I've a dev-log entry on it [here](https://rob1997.github.io/devlog/log-4.html)\n\n## Contributing\n\nIf you'd like to contribute to the project, you can fork the repository and create a pull request. You can also create an issue if you find any bugs or have any feature requests.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frob1997%2Fkart-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frob1997%2Fkart-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frob1997%2Fkart-ai/lists"}