{"id":17447802,"url":"https://github.com/pmuens/alphago","last_synced_at":"2025-04-24T03:13:31.531Z","repository":{"id":60634445,"uuid":"174489529","full_name":"pmuens/alphago","owner":"pmuens","description":"Reference implementation of DeepMinds AlphaGo based on \"Deep Learning and the Game of Go\"","archived":false,"fork":false,"pushed_at":"2019-03-25T18:18:09.000Z","size":17948,"stargazers_count":42,"open_issues_count":1,"forks_count":25,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T03:13:20.358Z","etag":null,"topics":["deep-learning","keras","machine-learning","tensorflow"],"latest_commit_sha":null,"homepage":"","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/pmuens.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}},"created_at":"2019-03-08T07:27:59.000Z","updated_at":"2025-04-03T16:22:20.000Z","dependencies_parsed_at":"2022-10-02T11:40:17.226Z","dependency_job_id":null,"html_url":"https://github.com/pmuens/alphago","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/pmuens%2Falphago","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmuens%2Falphago/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmuens%2Falphago/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmuens%2Falphago/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmuens","download_url":"https://codeload.github.com/pmuens/alphago/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250552075,"owners_count":21449165,"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":["deep-learning","keras","machine-learning","tensorflow"],"created_at":"2024-10-17T19:51:17.682Z","updated_at":"2025-04-24T03:13:31.503Z","avatar_url":"https://github.com/pmuens.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlphaGo\n\nThis repository contains a reference implementation of the [AlphaGo](https://deepmind.com/research/alphago/) AI by [DeepMind](https://deepmind.com).\n\n## How to play\n\n### Go\n\n#### Bot vs. Bot\n\nRun `python bot_v_bot.py` to let 2 Bots play against each other.\n\n#### Human vs. Bot\n\nRun `python mcts_go.py` to play against a bot.\n\n### Tic-Tac-Toe\n\n#### Human vs. Bot\n\nRun `python play_ttt.py` to play against an [unbeatable](https://en.wikipedia.org/wiki/Minimax) bot.\n\n## Reinforcement Learning\n\n1. Run `python init_ac_agent.py --board-size 9 --output-file ./agents/ac_v1.h5`\n\n1. Run `python self_play_ac.py --board-size 9 --learning-agent ./agents/ac_v1.h5 --num-games 5000 --experience-out ./experiences/exp_0001.h5` to let a bot play against itself and store experiences gathered during self play.\n\n1. Run `python train_ac.py --learning-agent ./agents/ac_v1.h5 --agent-out ./agents/ac_v2.h5 ./--lr 0.01 --bs 1024 experiences/exp_0001.h5` to use experience data for agent improvements via Deep Reinforcement Learning.\n\n1. Run `python eval_ac_bot.py --agent1 ./agents/ac_v2.h5 --agent2 ./agents/ac_v1.h5 --num-games 100` to check whether the new bot is stronger.\n\nIf the new agent is stronger start with it at 2.\n\nOtherwise go to 2. again to generate more training data. Use multiple experience data files in 3.\n\nRinse and repeat.\n\n## Resources\n\n- [Book - Deep Learning and the Game of Go](https://www.manning.com/books/deep-learning-and-the-game-of-go)\n- [Paper - Mastering the game of Go with deep neural networks and tree search](http://web.iitd.ac.in/~sumeet/Silver16.pdf)\n- [Paper - Mastering the Game of Go without Human Knowledge](https://deepmind.com/documents/119/agz_unformatted_nature.pdf)\n- [Video - Mastering Games without Human Knowledge](https://www.youtube.com/watch?v=Wujy7OzvdJk)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmuens%2Falphago","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmuens%2Falphago","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmuens%2Falphago/lists"}