{"id":16199677,"url":"https://github.com/zhiyiyo/alpha-gobang-zero","last_synced_at":"2025-03-16T10:32:54.951Z","repository":{"id":40352899,"uuid":"349770006","full_name":"zhiyiYo/Alpha-Gobang-Zero","owner":"zhiyiYo","description":"A gobang robot based on reinforcement learning.","archived":false,"fork":false,"pushed_at":"2023-03-28T03:38:52.000Z","size":74927,"stargazers_count":91,"open_issues_count":0,"forks_count":21,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-23T04:36:58.939Z","etag":null,"topics":["alphazero","gobang","pyqt5","pytorch","reinforcement-learning"],"latest_commit_sha":null,"homepage":"https://www.cnblogs.com/zhiyiYo/p/14683450.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhiyiYo.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":"2021-03-20T15:56:26.000Z","updated_at":"2024-08-03T00:06:12.065Z","dependencies_parsed_at":"2024-08-03T00:22:48.080Z","dependency_job_id":null,"html_url":"https://github.com/zhiyiYo/Alpha-Gobang-Zero","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhiyiYo%2FAlpha-Gobang-Zero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhiyiYo%2FAlpha-Gobang-Zero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhiyiYo%2FAlpha-Gobang-Zero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhiyiYo%2FAlpha-Gobang-Zero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhiyiYo","download_url":"https://codeload.github.com/zhiyiYo/Alpha-Gobang-Zero/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814907,"owners_count":20352037,"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":["alphazero","gobang","pyqt5","pytorch","reinforcement-learning"],"created_at":"2024-10-10T09:27:08.995Z","updated_at":"2025-03-16T10:32:52.041Z","avatar_url":"https://github.com/zhiyiYo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"12%\" align=\"center\" src=\"app/resource/images/icon/二哈.png\" alt=\"logo\"\u003e\n\u003c/p\u003e\n  \u003ch1 align=\"center\"\u003e\n  Alpha Gobang Zero\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  A gobang robot based on reinforcement learning\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca style=\"text-decoration:none\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Version-v1.0-blue.svg?color=00B16A\" alt=\"Version v1.0\"/\u003e\n  \u003c/a\u003e\n\n  \u003ca style=\"text-decoration:none\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Python-3.8.6-blue.svg?color=00B16A\" alt=\"Python 3.8.6\"/\u003e\n  \u003c/a\u003e\n\n  \u003ca style=\"text-decoration:none\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PyTorch-1.8.1-blue?color=00B16A\" alt=\"PyTorch 1.8.1\"/\u003e\n  \u003c/a\u003e\n\n  \u003ca style=\"text-decoration:none\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PyQt-5.15.2-blue?color=00B16A\" alt=\"PyQt 5.15.2\"/\u003e\n  \u003c/a\u003e\n\n  \u003ca style=\"text-decoration:none\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/OS-Win%2010%20|%20Win%2011-blue?color=00B16A\" alt=\"OS Win10 | Win 11\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"docs/screenshot/游戏界面.png\" alt=\"游戏界面\" width=\"70%\"/\u003e\n\u003c/div\u003e\n\n\n\n## Policy-Value Net\n* Network structure\n  * `ConvBlock` × 1\n  * `ResidueBlock` × 4\n  * `PolicyHead` × 1\n  * `ValueHead` × 1\n* Network visualization\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"docs/screenshot/模型架构.png\" alt=\"模型架构\" width=\"70%\"/\u003e\n\u003c/div\u003e\n\n## Quick start\n1. Create virtual environment:\n\n    ```shell\n    conda create -n Alpha_Gobang_Zero python=3.8\n    conda activate Alpha_Gobang_Zero\n    pip install -r requirements.txt\n    ```\n\n2. Install `PyTorch`，refer to the [blog](https://www.cnblogs.com/zhiyiYo/p/15865454.html) for details；\n\n\n3. Start game:\n\n    ```shell\n    conda activate Alpha_Gobang_Zero\n    python game.py\n    ```\n\n## Train model\n\n\n  ```shell\n  conda activate Alpha_Gobang_Zero\n  python train.py\n  ```\n\n\n## Blog\n[《如何使用自对弈强化学习训练一个五子棋机器人Alpha Gobang Zero》](https://www.cnblogs.com/zhiyiYo/p/14683450.html)\n\n## Reference\n* [《Mastering the game of Go without human knowledge》](https://www.nature.com/articles/nature24270.epdf?author_access_token=VJXbVjaSHxFoctQQ4p2k4tRgN0jAjWel9jnR3ZoTv0PVW4gB86EEpGqTRDtpIz-2rmo8-KG06gqVobU5NSCFeHILHcVFUeMsbvwS-lxjqQGg98faovwjxeTUgZAUMnRQ)\n* [《Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm》](https://arxiv.org/abs/1712.01815)\n\n\n## FAQs\n* **Why does the window get stuck when it is dragged?**\n\n  Because the interface background uses acrylic effect, this problem will occur for some versions of win10. There are three solutions:\n\n  * Upgrade win10 to the latest version.\n  * Uncheck the check box of **Advanced system settings --\u003e Performance --\u003e Show window contents when dragging**.\n  * Turn off the option to enable acrylic background in the setting interface.\n\n* **Why does the configuration I modified in the settings interface not take effect immediately?**\n\n  The modified configuration will take effect at the beginning of the next game.\n\n\n## License\nAlpha-Gobang-Zero is licensed under [GPLv3](./LICENSE).\n\nCopyright © 2021 by zhiyiYo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhiyiyo%2Falpha-gobang-zero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhiyiyo%2Falpha-gobang-zero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhiyiyo%2Falpha-gobang-zero/lists"}