{"id":15663375,"url":"https://github.com/cpury/pong-rl","last_synced_at":"2025-05-06T11:39:08.260Z","repository":{"id":47983859,"uuid":"197377164","full_name":"cpury/pong-rl","owner":"cpury","description":"Reinforcement Learning with Pong in the Browser via TensorFlow.js","archived":false,"fork":false,"pushed_at":"2023-01-04T21:56:14.000Z","size":1728,"stargazers_count":17,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-06T11:38:48.204Z","etag":null,"topics":["game-development","machine-learning","reinforcement-learning","tensorflowjs","tfjs"],"latest_commit_sha":null,"homepage":"https://cpury.github.io/pong-rl/","language":"JavaScript","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/cpury.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}},"created_at":"2019-07-17T11:35:18.000Z","updated_at":"2022-08-20T14:56:32.000Z","dependencies_parsed_at":"2023-02-02T21:16:11.532Z","dependency_job_id":null,"html_url":"https://github.com/cpury/pong-rl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpury%2Fpong-rl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpury%2Fpong-rl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpury%2Fpong-rl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpury%2Fpong-rl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpury","download_url":"https://codeload.github.com/cpury/pong-rl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252675978,"owners_count":21786871,"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":["game-development","machine-learning","reinforcement-learning","tensorflowjs","tfjs"],"created_at":"2024-10-03T13:36:59.811Z","updated_at":"2025-05-06T11:39:08.224Z","avatar_url":"https://github.com/cpury.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pong-rl\n\nReinforcement Learning with Pong in the browser via TensorFlow.js by @cpury 🚀\n\n**Demo: https://cpury.github.io/pong-rl/**\n\n**With the default options, watch it learn the game in ~10 minutes!**\n\nBlog post coming soon 📝\n\nColor scheme: https://coolors.co/3a3c3f-e5e5e6-f06543-2ec0f9-e7e247\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"320\" height=\"568\" src=\"https://github.com/cpury/pong-rl/blob/master/screenshot.png?raw=true\"\u003e\n\u003c/p\u003e\n\n## Details\n\nImplements a Pong-like game as well as a controller interface to add arbitrary controllers to the game.\n\n### Available controllers:\n\n- `KeyController` to controll via keyboard\n- `DumbController` a simple controller that just follows the ball with some hiccups\n- `DQLController` a first Deep-Q-Learning controller that learns on hard-coded features (position of the ball, force of the ball and positions of the paddles).\n- `VisualDQLController` Deep-Q-Learning directly on the pixels. **SLOW!**\n\n### Other features:\n\n- Three difficulty levels\n- Live mode: When disabled, learning happens without drawing or waiting for user\n\n### Technologies used:\n\n- [TensorFlow.js](https://www.tensorflow.org/js/) for neural networks\n- [Bulma](https://bulma.io/) as CSS framework\n- [Parcel.js](https://parceljs.org/) for bundling\n\n## Running locally\n\nFirst, install dependencies:\n\n```sh\nnpm install\n```\n\nTo run in hot module reloading mode:\n\n```sh\nnpm start\n```\n\nTo create a production build:\n\n```sh\nnpm run build-prod\n```\n\n## Contributing controllers\n\nContributions welcome! If you'd like to add a new controller, add a new class that inherits from `BaseController` and create a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpury%2Fpong-rl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpury%2Fpong-rl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpury%2Fpong-rl/lists"}