{"id":13994508,"url":"https://github.com/Narsil/alphagozero","last_synced_at":"2025-07-22T19:32:37.855Z","repository":{"id":26435131,"uuid":"108689999","full_name":"Narsil/alphagozero","owner":"Narsil","description":"Unofficial attempt to rebuild AlphaGo Zero","archived":false,"fork":false,"pushed_at":"2024-05-06T19:20:04.000Z","size":114,"stargazers_count":56,"open_issues_count":8,"forks_count":16,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-18T11:36:56.438Z","etag":null,"topics":["alphago-zero","keras","tensorflow"],"latest_commit_sha":null,"homepage":null,"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/Narsil.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":"2017-10-28T22:54:36.000Z","updated_at":"2024-11-10T20:49:55.000Z","dependencies_parsed_at":"2023-01-14T04:39:06.774Z","dependency_job_id":"b4168827-1fd0-4f0e-9309-40ee3e1013b1","html_url":"https://github.com/Narsil/alphagozero","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/Narsil%2Falphagozero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narsil%2Falphagozero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narsil%2Falphagozero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Narsil%2Falphagozero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Narsil","download_url":"https://codeload.github.com/Narsil/alphagozero/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227166769,"owners_count":17740978,"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":["alphago-zero","keras","tensorflow"],"created_at":"2024-08-09T14:02:54.606Z","updated_at":"2024-11-29T16:31:29.243Z","avatar_url":"https://github.com/Narsil.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# AlphaGo Zero\n\nThis is a unofficial reimplementation in Keras (Tensorflow backend) of [AlphaGo Zero]\nIt is work in progress. The aim is to have simple code.\nWritten in Python 3.\n\n# Installation and run\n\nInstall the dependencies and devDependencies and start the server.\n\n```sh\n$ pip install -r requirements.txt # Requirements use tensorflow-gpu, feel free to use the CPU version.\n$ python main.py\n```\n\nThe main program will loop indefinitely, hopefully succeeding a building a stong model for Go play.\nSo far everything runs in one big loop. It might and up being split in the future in multiple threads/processes/workers.\n\nIf you want to play against a model to check its strength, you can use it's GTP support.\nJust add the `gtp.py` file as an engine. Crude implementation for now.\n\n# Configuration\n\nEverythin is set in the `conf.py` file. All original papers parameters are described in the comments, but for a single machine, single GPU machine,\nyou should definitely stick to much lower parameters.\n\n**Whenever you change configuration you should use reset.sh. But be careful, it will ERASE ALL PREVIOUS DATA (models and self play, and tensorboard logs)**\n\n\n\n### Model\n\nEverything is implemented in Keras and should correspond to the specified model in the Original paper. You can see the graph in tensorboard\n```sh\npython main.py  # The model is immediately created, so you can Ctrl+C pretty fast if you just want to check the graph\ntensorboard --logdir=logs\n```\n\n### Self Play\n\nImplementations should correspond to what is described in the paper.\n\n### Train\n\nI don't have 64 GPU workers as were used in the original implementation so for now, it just takes 64x the time than the original paper. Using Keras or TF to distribute the work is not planned. \n\n### Evaluator\n\nThe evaluator just runs games to check which model is best and saves the new model in best_model in case it ouranks the last best model\n\n\n# Development\n\nWant to contribute? Pull Requests more than welcome. \n\nTODOS:\n - Improve the tests (Right now basic gameplay functions are tested)\n - Find ways to distribute the work.\n\n\n[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)\n\n\n   [AlphaGo Zero]: \u003chttps://deepmind.com/blog/alphago-zero-learning-scratch/\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNarsil%2Falphagozero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNarsil%2Falphagozero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNarsil%2Falphagozero/lists"}