{"id":13619492,"url":"https://github.com/nileshsah/reinforcement-learning-flappybird","last_synced_at":"2025-07-04T08:33:26.171Z","repository":{"id":91066645,"uuid":"100203899","full_name":"nileshsah/reinforcement-learning-flappybird","owner":"nileshsah","description":"In-browser reinforcement learning for flappy bird 🐦","archived":false,"fork":false,"pushed_at":"2018-09-23T10:01:48.000Z","size":121,"stargazers_count":40,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-20T23:08:26.503Z","etag":null,"topics":["flappy-bird","javascript","qlearning","reinforcement-learning"],"latest_commit_sha":null,"homepage":"https://nileshsah.github.io/reinforcement-learning-flappybird/","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/nileshsah.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":"2017-08-13T20:50:31.000Z","updated_at":"2024-12-26T13:37:35.000Z","dependencies_parsed_at":"2024-01-14T08:06:31.934Z","dependency_job_id":null,"html_url":"https://github.com/nileshsah/reinforcement-learning-flappybird","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nileshsah/reinforcement-learning-flappybird","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nileshsah%2Freinforcement-learning-flappybird","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nileshsah%2Freinforcement-learning-flappybird/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nileshsah%2Freinforcement-learning-flappybird/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nileshsah%2Freinforcement-learning-flappybird/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nileshsah","download_url":"https://codeload.github.com/nileshsah/reinforcement-learning-flappybird/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nileshsah%2Freinforcement-learning-flappybird/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261032114,"owners_count":23100051,"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":["flappy-bird","javascript","qlearning","reinforcement-learning"],"created_at":"2024-08-01T21:00:41.932Z","updated_at":"2025-06-20T23:09:04.257Z","avatar_url":"https://github.com/nileshsah.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"Reinforcement Learning for Flappy Bird in JS\n===================\n\n\u003cimg src=\"https://raw.githubusercontent.com/nileshsah/reinforcement-learning-flappybird/master/images/high-score.png?token=AJ-IX5fex3nle8myzjXQyWzlA-1-rOZqks5ZoGimwA%3D%3D\" width=\"256\" height=\"256\"/\u003e\n\nA project aimed to explain reinforcement learning in the most simplistic way ever possible by training a _32px by 32px_ game of flappy bird using Q-learning through a script written purely in JavaScript.\n\nThe script [`js/brain.js`](js/brain.js) is where the learning logic resides and has been documented heavily to explain the baseline Q-learning algorithm from scratch and how it can be applied in a real-time scenario.\n\nWith everything written solely in JS, the game can be trained and tested right inside our browser with no external dependencies at all. You can witness how the bird learns to play the game in real-time by visiting the link:  [`http://nileshsah.github.io/reinforcement-learning-flappybird/`](http://nileshsah.github.io/reinforcement-learning-flappybird/) ¯\\\\_(ツ)_/¯\n\nIn an ideal scenario, the bird learns to operate upon a static non-volatile environment in mere 25 trials of the game while for a randomized environment it might take up to 1000+ trials.\n\n### Further Reading\n---\n\n`[1]` http://people.revoledu.com/kardi/tutorial/ReinforcementLearning/\n\n`[2]` https://medium.com/emergent-future/simple-reinforcement-learning-with-tensorflow-part-0-q-learning-with-tables-and-neural-networks-d195264329d0\n\n`[3]` https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnileshsah%2Freinforcement-learning-flappybird","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnileshsah%2Freinforcement-learning-flappybird","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnileshsah%2Freinforcement-learning-flappybird/lists"}