{"id":20123292,"url":"https://github.com/tyfkda/smb-rl-sb3","last_synced_at":"2025-03-02T20:27:18.367Z","repository":{"id":245402267,"uuid":"817105628","full_name":"tyfkda/smb-rl-sb3","owner":"tyfkda","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-12T02:05:21.000Z","size":19120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T07:40:47.898Z","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/tyfkda.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-06-19T03:17:31.000Z","updated_at":"2024-08-12T02:05:01.000Z","dependencies_parsed_at":"2024-06-28T05:32:05.095Z","dependency_job_id":"2303bbe7-9be5-4c1c-b41a-337e8cbc9209","html_url":"https://github.com/tyfkda/smb-rl-sb3","commit_stats":null,"previous_names":["tyfkda/smb-sb3-ppo","tyfkda/smb-rl-sb3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyfkda%2Fsmb-rl-sb3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyfkda%2Fsmb-rl-sb3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyfkda%2Fsmb-rl-sb3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyfkda%2Fsmb-rl-sb3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyfkda","download_url":"https://codeload.github.com/tyfkda/smb-rl-sb3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241566385,"owners_count":19983300,"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":[],"created_at":"2024-11-13T19:44:12.840Z","updated_at":"2025-03-02T20:27:18.337Z","avatar_url":"https://github.com/tyfkda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"smb-rl-sb3\n==========\n\n### 要件\n\n  * Python 3.12＋仮想環境\n  * Cコンパイラ (nes-py用)\n\n#### GLU\n\npygletがGLUを用いているため、別途インストールしておく必要がある。\n\nWindows/WSL2の場合：[Install OpenGL on Ubuntu in WSL](https://gist.github.com/Mluckydwyer/8df7782b1a6a040e5d01305222149f3c)\n\n```sh\n$ apt install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev\n```\n\n\n### 初期設定\n\nサブモジュールの取得：\n\n```sh\n$ git submodule update --init --recursive\n```\n\nPython仮想環境を用意・有効にした上で、\n\n```sh\n$ make setup\n```\n\n\n### 動作テスト\n\n```sh\n$ python play_randomly.py\n```\n\n\n### トレーニング\n\n```sh\n$ python main.py --movement simple --sb3_algo PPO\n```\n\n### 再生\n\n```sh\n$ python main.py --movement simple --sb3_algo PPO --replay\n```\n\n### 学習例\n\n\u003chttps://youtu.be/mlSjsejrrZY\u003e\n\n[![スーパーマリオのクッパ面を強化学習でクリア](http://img.youtube.com/vi/mlSjsejrrZY/0.jpg)](https://www.youtube.com/watch?v=mlSjsejrrZY)\n\n#### 学習済みデータを動かすには\n\ngitのブランチ`feature/world1-4`をチェックアウトして、\n\n```sh\n$ python main.py --movement complex --sb3_algo PPO \\\n  --color --skip-frame=2 --stage=4 \\\n  --replay=trained_model/model_world1-4.zip \\\n  --seed=12699629529116784663\n```\n\n### 参考\n\n  * [PyTorchチュートリアル（日本語翻訳版）](https://yutaroogawa.github.io/pytorch_tutorials_jp/)\n  * [Super Mario Bros. with Stable-Baseline3 PPO](https://www.kaggle.com/code/deeplyai/super-mario-bros-with-stable-baseline3-ppo)\n\n### ブログ記事\n\n[スーパーマリオの強化学習を動かす（Stable Baselines 3）](https://tyfkda.github.io/blog/2024/08/07/smb-rl-sb3.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyfkda%2Fsmb-rl-sb3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyfkda%2Fsmb-rl-sb3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyfkda%2Fsmb-rl-sb3/lists"}