{"id":22506623,"url":"https://github.com/a-poor/chrome-dino-solver","last_synced_at":"2026-04-18T01:04:06.825Z","repository":{"id":47513672,"uuid":"256602105","full_name":"a-poor/chrome-dino-solver","owner":"a-poor","description":"Using Reinforcement Learning and Selenium to play the Chrome No-Internet-Dino-Game","archived":false,"fork":false,"pushed_at":"2021-08-30T03:53:46.000Z","size":56531,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T06:35:57.177Z","etag":null,"topics":["chrome-dino-game","data-science","data-science-bootcamp","deep-learning","reinforcement-learning","selenium"],"latest_commit_sha":null,"homepage":"","language":"Python","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/a-poor.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":"2020-04-17T20:22:30.000Z","updated_at":"2021-08-30T03:53:49.000Z","dependencies_parsed_at":"2022-09-07T17:01:01.851Z","dependency_job_id":null,"html_url":"https://github.com/a-poor/chrome-dino-solver","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/a-poor%2Fchrome-dino-solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-poor%2Fchrome-dino-solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-poor%2Fchrome-dino-solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-poor%2Fchrome-dino-solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-poor","download_url":"https://codeload.github.com/a-poor/chrome-dino-solver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245944062,"owners_count":20697948,"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":["chrome-dino-game","data-science","data-science-bootcamp","deep-learning","reinforcement-learning","selenium"],"created_at":"2024-12-07T00:44:44.917Z","updated_at":"2026-04-18T01:03:56.765Z","avatar_url":"https://github.com/a-poor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Chrome Dino-Game Solver\n\n_by Austin Poor_\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"auto\" height=\"500px\" src=\"presentation_visuals/dino_game_example.gif\"/\u003e\n\u003c/p\u003e\n\nThis is the code for my fifth project for the [Metis Data Science Bootcamp](https://www.thisismetis.com/data-science-bootcamps).\n\nFor my project, I wanted to get some experience with Reinforcement Learning, so I chose to build a bot to play Chrome's _No-Internet Dinosaur Game_.\n\nIn case you aren't familiar, Chrome has a [_hidden dinosaur game_](https://en.wikipedia.org/wiki/List_of_Google_Easter_eggs#Chrome), that can be accessed (if you're using Chrome) at the following link: [chrome://dino](chrome://dino). To start the game, press either the _space bar_ or the _up arrow_. To play the game, use the _up arrow_ (or _space bar_) to _jump_ and the _down arrow_ to duck. You must dodge cacti and pterodactyls for as long as possible.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.youtube.com/watch?v=vKNHtvma0bQ\" target=\"_blank\"\u003e\n    \u003cimg width=\"300px\" height=\"auto\" src=\"presentation_visuals/video_thumbnail.png\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nClick the thumbnail above for a video of my presentation.\n\nI've also included a copy of the presentation deck, [here](apoor_chromeDinoGameSolver_presentation.pdf).\n\n***\n\n## Results\n\nI ended up building a _heursitic bot_ (which follows pre-defined rules for choosing actions) as well as a _reinforcement learning bot_ (which learns a policy as it plays).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"auto\" height=\"300px\" src=\"presentation_visuals/threshold_demo.gif\"/\u003e\n\u003c/p\u003e\n\nThe _Heuristic Bot_ was able to get a high score of just over `16,000`. For comparison, when I play my high score is about `2,500`.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"auto\" height=\"250px\" src=\"presentation_visuals/rl_dino_training_wPoints.gif\"/\u003e\n\u003c/p\u003e\n\nThe _Reinforcement Learning Bot_ was only able to get a high score of `1,300`, but with a lot variation in the scores. The RL bot seemed to be able to find a good policy for dealing with the cacti but it seemed to have a hard time learning to get past the pterodactyls, which come later on in the game.\n\nIn order for the RL bot to be able to play as well as the heuristic bot, it would likely need many more iterations of training – which are especially hard given the time and memory overhead of playing the game in real-time with Chrome and Selenium.\n\n***\n\n## Navigating the Repo\n\nIn order to play the game, I used selenium with `ChromeDriver 80.0.3987.106`.\n\nThe file [dino_solve_jump_threshold.py](dino_solve_jump_threshold.py) is for creating the _heuristic bot_, using grid search over the thresholds.\n\nThe file [dino_solver_deepQ.py](dino_solver_deepQ.py) is for creating the deepQ bot. (The file `dino_solver_deepQ.py` also references the file [generate_data.py](generate_data.py), for creating fake data as a way of pretraining the rl model.)\n\nThe folder `threshold_plots/` has heatmaps that I created with `dino_solve_jump_threshold.py` to show what hyperparameter combinations lead to the best results.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-poor%2Fchrome-dino-solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-poor%2Fchrome-dino-solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-poor%2Fchrome-dino-solver/lists"}