{"id":19834976,"url":"https://github.com/hijkzzz/alpha-zero-gomoku","last_synced_at":"2025-04-06T09:10:23.834Z","repository":{"id":54292816,"uuid":"163507326","full_name":"hijkzzz/alpha-zero-gomoku","owner":"hijkzzz","description":"A Multi-threaded Implementation of AlphaZero (C++)","archived":false,"fork":false,"pushed_at":"2023-01-07T07:25:29.000Z","size":8209,"stargazers_count":380,"open_issues_count":6,"forks_count":49,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-30T08:09:47.472Z","etag":null,"topics":["alphazero","cpp","gomoku-game","libtorch","multithreading"],"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/hijkzzz.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":"2018-12-29T11:55:38.000Z","updated_at":"2025-02-26T08:34:37.000Z","dependencies_parsed_at":"2023-02-06T14:47:12.639Z","dependency_job_id":null,"html_url":"https://github.com/hijkzzz/alpha-zero-gomoku","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hijkzzz%2Falpha-zero-gomoku","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hijkzzz%2Falpha-zero-gomoku/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hijkzzz%2Falpha-zero-gomoku/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hijkzzz%2Falpha-zero-gomoku/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hijkzzz","download_url":"https://codeload.github.com/hijkzzz/alpha-zero-gomoku/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457803,"owners_count":20941906,"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","cpp","gomoku-game","libtorch","multithreading"],"created_at":"2024-11-12T12:06:06.717Z","updated_at":"2025-04-06T09:10:23.819Z","avatar_url":"https://github.com/hijkzzz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlphaZero Gomoku\nA multi-threaded implementation of AlphaZero\n\n## Features\n* Easy Free-style Gomoku\n* Multi-threading Tree/Root Parallelization with Virtual Loss and LibTorch\n* Gomoku, MCTS and Network Infer are written in C++\n* SWIG for Python C++ extension\n* Update 2019.7.10: Supporting Ubuntu and Windows\n* Update 2022.4.4: Re-compile with CUDA 11.6/PyTorch 1.10/LibTorch 1.10(Pre-cxx11 ABI)/SWIG 4.0.2\n\n## Args\nEdit config.py\n\n## Packages\n* Python 3.6+\n* PyGame 1.9+\n* CUDA 10+\n* [PyTorch 1.1+](https://pytorch.org/get-started/locally/)\n* [LibTorch 1.1+ (Pre-cxx11 ABI)](https://pytorch.org/get-started/locally/)\n* [SWIG 3.0.12+](https://sourceforge.net/projects/swig/files/)\n* CMake 3.8+\n* MSVC14.0+ / GCC6.0+\n\n## Run\n```\n# Compile Python extension\nmkdir build\ncd build\ncmake .. -DCMAKE_PREFIX_PATH=path/to/libtorch -DPYTHON_EXECUTABLE=path/to/python -DCMAKE_BUILD_TYPE=Release\nmake -j10\n\n# Run\ncd ../test\npython learner_test.py train # train model\npython learner_test.py play  # play with human\n```\n\n## Pre-trained models\n\u003e Trained 2 days on GTX TITAN X (similar to GTX1070)\n\nSee GitHub Release: https://github.com/hijkzzz/alpha-zero-gomoku/releases\n\n\n## GUI\n![](https://github.com/hijkzzz/alpha-zero-gomoku/blob/master/assets/gomoku_gui.png)\n\n## References\n1. Mastering the Game of Go without Human Knowledge\n2. Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm\n3. Parallel Monte-Carlo Tree Search\n4. An Analysis of Virtual Loss in Parallel MCTS\n5. A Lock-free Multithreaded Monte-Carlo Tree Search Algorithm\n6. github.com/suragnair/alpha-zero-general\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhijkzzz%2Falpha-zero-gomoku","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhijkzzz%2Falpha-zero-gomoku","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhijkzzz%2Falpha-zero-gomoku/lists"}