{"id":15358467,"url":"https://github.com/astrofrog/flap.py","last_synced_at":"2026-06-23T14:30:56.960Z","repository":{"id":136158327,"uuid":"42747385","full_name":"astrofrog/flap.py","owner":"astrofrog","description":"Simple clone of flappy bird to play and test out machine learning algorithms","archived":false,"fork":false,"pushed_at":"2017-11-16T15:46:39.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-24T07:42:12.116Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astrofrog.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-18T21:15:29.000Z","updated_at":"2016-12-27T06:34:00.000Z","dependencies_parsed_at":"2023-03-22T22:03:01.293Z","dependency_job_id":null,"html_url":"https://github.com/astrofrog/flap.py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/astrofrog/flap.py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fflap.py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fflap.py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fflap.py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fflap.py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrofrog","download_url":"https://codeload.github.com/astrofrog/flap.py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrofrog%2Fflap.py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34694778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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":[],"created_at":"2024-10-01T12:41:24.720Z","updated_at":"2026-06-23T14:30:56.956Z","avatar_url":"https://github.com/astrofrog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"About\n=====\n\nThis is a simplistic clone of flappy bird, still very much in development. The\naim is to be able to use it to test out machine learning algorithms.\n\n![screenshot](flappy_screenshot.png)\n\nInstall\n=======\n\nThe only dependency is [pyglet](https://bitbucket.org/pyglet/pyglet/wiki/Home).\nYou can install it with::\n\n    pip install pyglet\n\nOnce this is installed, simply run::\n\n    python flap.py\n\nin this repository.\n\nMachine learning\n================\n\nIf you want to try and make an algorithm that will successfully play the game,\nwrite a separate script then do:\n\n    from flap import main\n\nto import the main function to run the game. You should then define a callback\nfunction that looks like:\n\n    def callback(array, click, alive):\n        pass\n\nThis callback function will get called every time the window is drawn. The\narguments passed are:\n\n* ``array``: an (ny, nx, 3) RGB array of the screen\n* ``click``: a function you can call to click\n* ``alive``: a boolean telling you whether the bird is alive\n\nyou can then start the game with:\n\n    main(callback=callback)\n\nNote that you will need to click once to start the game. If the game stops, you\ncan click twice to start again.\n\nMissing features\n================\n\n* Keeping track of score\n* Tilting bird when flying up and down\n\nCredits\n=======\n\n[Original game](https://en.wikipedia.org/wiki/Flappy_Bird) by Dong Nguyen.\n\nSpires downloaded from [here](http://www.spriters-resource.com/mobile/flappybird/sheet/59537/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrofrog%2Fflap.py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrofrog%2Fflap.py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrofrog%2Fflap.py/lists"}