{"id":20838049,"url":"https://github.com/timcsy/dino","last_synced_at":"2026-04-22T11:32:37.171Z","repository":{"id":241566771,"uuid":"806957650","full_name":"timcsy/Dino","owner":"timcsy","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-09T10:20:38.000Z","size":6180,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-27T21:50:44.686Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/timcsy.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}},"created_at":"2024-05-28T08:16:36.000Z","updated_at":"2025-01-09T10:20:42.000Z","dependencies_parsed_at":"2024-05-29T03:32:57.397Z","dependency_job_id":"d9088554-6bf6-4eec-8d3a-c8cd5b9747e7","html_url":"https://github.com/timcsy/Dino","commit_stats":null,"previous_names":["timcsy/dino"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timcsy/Dino","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2FDino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2FDino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2FDino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2FDino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timcsy","download_url":"https://codeload.github.com/timcsy/Dino/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timcsy%2FDino/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32134130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-11-18T01:09:17.006Z","updated_at":"2026-04-22T11:32:32.161Z","avatar_url":"https://github.com/timcsy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dino Game with Reinforcement Learning\n\nUsing OpenAI Gym and Stable Baseline 3 to play the dino game.\n\nDino game: chrome://dino/\n\n## Setup\n\nInstall Python 3 packages:\n```\npip install -r requirements.txt\n```\n\nEdit or create the `.env` file, for example:\n```\nSCREENENV_LEFT=0\nSCREENENV_TOP=290\nSCREENENV_WIDTH=1920\nSCREENENV_HEIGHT=480\nSCREENENV_NEW_WIDTH=144\nSCREENENV_NEW_HEIGHT=36\nSCREENENV_FULLSCREEN=False\n```\nYou can rename the `template.env` file to `.env`\n\nRun `record.py`, to record the keyboard and mouse actions you want to do on reset:\n```\npython record.py\n```\n\nPress Alt + R to stop recording.\n\n## Usage\n\nPress Esc to pause or resume the game.\n\n### Usage - Basic\n\nTo open the environment, you can do the following lines:\n```=Python\nimport gymnasium as gym\nimport screen_games\nfrom wrapper import DinoWrapper\n\nenv = gym.make('screen_games/ScreenEnv-v0')\nenv = DinoWrapper(env, macro='record.json')\n```\n\n### Usage - Random\n\nTo run the game randomly, run `dino.py`:\n```\npython dino.py\n```\n\n### Usage - Manual\n\nTo run the game manually, run `manual.py`:\n```\npython manual.py\n```\n\n### Usage - Training\n\nTo train the reinforcement learning AI, run `training.py`:\n```\npython training.py\n```\nRemember to change the model name inside the code.\n\nTo continue train the reinforcement learning AI, run `training_cont.py`:\n```\npython training_cont.py\n```\nRemember to change the model name inside the code.\n\n### Usage - Inferencing\n\nTo inference by the reinforcement learning AI, run `inferencing.py`:\n```\npython inferencing.py\n```\nRemember to change the model name inside the code.\n\n### Usage - XAI (eXplaining AI)\n\nTo explaning the reinforcement learning AI by CAM (a kind of XAI), run `cam.py`:\n```\npython cam.py \u003clayer_num\u003e\n\nFor example (For different Neural Network Layer, say \u003clayer_num\u003e is 3 or 4):\n\npython cam.py 3\n\npython cam.py 4\n\nDefault layer is 3:\n\npython cam.py\n```\nRemember to change the model name inside the code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimcsy%2Fdino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimcsy%2Fdino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimcsy%2Fdino/lists"}