{"id":21978431,"url":"https://github.com/zhaipro/alphalineuppuzzle","last_synced_at":"2026-05-14T22:47:36.652Z","repository":{"id":90571432,"uuid":"54861567","full_name":"zhaipro/AlphaLineupPuzzle","owner":"zhaipro","description":"Lineup Puzzle 游戏 AI 灵感来自于AlphaGo","archived":false,"fork":false,"pushed_at":"2017-12-17T07:35:43.000Z","size":716,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-01-28T03:50:03.490Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhaipro.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":"2016-03-28T03:04:57.000Z","updated_at":"2019-10-15T06:50:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"1485a279-13f5-49c6-a349-634a821cb16a","html_url":"https://github.com/zhaipro/AlphaLineupPuzzle","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaipro%2FAlphaLineupPuzzle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaipro%2FAlphaLineupPuzzle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaipro%2FAlphaLineupPuzzle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaipro%2FAlphaLineupPuzzle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhaipro","download_url":"https://codeload.github.com/zhaipro/AlphaLineupPuzzle/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245040188,"owners_count":20551299,"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-29T16:24:10.606Z","updated_at":"2025-10-24T11:56:18.686Z","avatar_url":"https://github.com/zhaipro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlphaLineupPuzzle\n\n该项目是Lineup Puzzle游戏的AI。\n命名灵感来自于AlphaGo，\n其目的是学习并掌握AlphaGo论文中提到的相关技术。\n\n## 当前进展\n\n- [ ] AlphaLineupPuzzle开发\n - [x] 棋盘\n - [x] 蒙特卡洛树搜索\n - [x] 快速走子\n - [ ] 策略网络\n - [ ] 联合策略网络和蒙特卡洛树搜索\n - [ ] 值网络\n - [ ] 强化学习\n - [ ] AI界面\n\n## v0.1版本的性能\n\nv0.1版本在单核心上运行了8天(11679分钟)，共完成248局游戏。以下是对这248局游戏存档的统计：\n\nname   |sum    |mean   |min    |max\n-------|-------|-------|-------|-------\n得分   |-      |155943 |4500   |922000\n步数   |133309 |537    |23     |3142\n候选   |-      |22.85  |0      |100\n\n其中每消除一行得500分。\n\n## 快速走子策略的性能\n\n神经网络库用的是chainer。训练数据来自于v0.1的存档。\n\n**第一次尝试（v0.2）：**\n\n提取并旋转、镜面扩展了训练数据。\n其中前10%用于测试，后90%用于训练。\n其在测试集上的预测准确率为22.5%（纯蒙的话，准确率为4.38%），在训练集上的准确率为23.1%\n\n**第二次尝试（v0.3）：**\n\n```bash\npython -m AlphaLineupPuzzle.preprocessing.game_converter v2 -e 1 -v -o data.h5f\npython -m AlphaLineupPuzzle.training.training -i data.h5f -a 0.0005 -b 32 -n 5 -o v0.3 -v\npython -m AlphaLineupPuzzle.ai -i v0.3 -c 248 | grep -E [0-9]+ | sum.sh\n```\n\n**结论：**\n\n1. 与随机走子对比，训练结果是有效果的 。\n1. 更简单的输入输出结构能得到更好的效果。\n\n以下是仅使用快速走子策略的得分。其中随机走子作为对照组，它仅等概率地挑选合法走子。\n\n执行批次|策略网络v0.2|策略网络 v0.3|随机走子\n--------|--------|----|--------\n第一次  |5540    |11260|1274\n第二次  |5512    |13247|1304\n第三次  |5318    |11491|1236\n\n其中每个批次都包含248局游戏，分值为这248局的平均得分。\n\n## 截图\n\n游戏界面如下：\n\n![](./screenshots/game.png)\n\nAI运行时如下：\n\n![](./screenshots/AI.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaipro%2Falphalineuppuzzle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhaipro%2Falphalineuppuzzle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaipro%2Falphalineuppuzzle/lists"}