{"id":13793907,"url":"https://github.com/qq456cvb/doudizhu-C","last_synced_at":"2025-05-12T20:31:21.640Z","repository":{"id":70755757,"uuid":"103203596","full_name":"qq456cvb/doudizhu-C","owner":"qq456cvb","description":"C++/python fight the lord with pybind11 (强化学习AI斗地主), Accepted to AIIDE-2020","archived":false,"fork":false,"pushed_at":"2021-06-17T03:51:25.000Z","size":146360,"stargazers_count":157,"open_issues_count":4,"forks_count":39,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-18T08:55:44.166Z","etag":null,"topics":["algorithm","dou-di-zhu"],"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/qq456cvb.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-09-12T00:49:17.000Z","updated_at":"2024-09-20T16:45:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"61a31683-58b7-4009-ad42-79a26928cdc2","html_url":"https://github.com/qq456cvb/doudizhu-C","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/qq456cvb%2Fdoudizhu-C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq456cvb%2Fdoudizhu-C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq456cvb%2Fdoudizhu-C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qq456cvb%2Fdoudizhu-C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qq456cvb","download_url":"https://codeload.github.com/qq456cvb/doudizhu-C/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253816733,"owners_count":21968875,"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":["algorithm","dou-di-zhu"],"created_at":"2024-08-03T23:00:33.084Z","updated_at":"2025-05-12T20:31:16.608Z","avatar_url":"https://github.com/qq456cvb.png","language":"Python","funding_links":[],"categories":["Open-Source Projects"],"sub_categories":["Dou Dizhu Projects"],"readme":"# Dou Di Zhu with Combinationatorial Q-Learning\n# Accepted to AIIDE 2020\n## Step by step training tutorial\n1. Clone the repo\n``` \ngit clone https://github.com/qq456cvb/doudizhu-C.git\n```\n2. Change work directory to root\n``` \ncd doudizhu-C\n```\n3. Create env from environment.yml\n``` \nconda env create -f environment.yml\n```\n4. Activate env\n```\nconda activate doudizhu\n```\n5. Build C++ files\n```\nmkdir build\ncd build\ncmake ..\nmake\n```\n6. Have fun training!\n```\ncd TensorPack/MA_Hierarchical_Q\npython main.py\n```\n\n## Evaluation against other baselines\n1. Download pretrained model from https://jbox.sjtu.edu.cn/l/L04d4A or [GoogleDrive](https://drive.google.com/drive/folders/1YTNR5JYNgNfQpQ9DwhQ3ClcyeXKn_17b?usp=sharing), then put it into `pretrained_model`\n2. Build Monte-Carlo baseline and move the lib into root\n```\ngit clone https://github.com/qq456cvb/doudizhu-baseline.git\ncd doudizhu-baseline/doudizhu\nmkdir build\ncd build\ncmake ..\nmake\nmv mct.cpython-36m-x86_64-linux-gnu.so [doudizhu-C ROOT]\n```\n3. Run evaluation scripts in `scripts`\n```\ncd scripts\npython experiments.py\n```\n## Directory Structure\n* `TensorPack` contain different RL algorithms to train agents\n* `experiments` contain scripts to evaluate agents' performance against other baselines\n* `simulator` contain scripts to evaluate agents' performance against online gaming platform called \"QQ Dou Di Zhu\" (we provide it for academic use only, use it at your own risk!)\n## Miscellaneous\n* We provide a Monte-Carlo-Tree-Search algorithm in https://github.com/qq456cvb/doudizhu-baseline\n* We provide a configured Dou Di Zhu mini-server in https://github.com/qq456cvb/doudizhu-tornado for you to play interactively. NOTE you should build the server and load pretrained model by yourself! Tutorial coming soon!\n* If you meet any problems, open an issue.\n\n## DouZero\nRecently, another algorithm called DouZero (https://github.com/kwai/DouZero) has been proposed, to whom may be interested in a strong DouDizhu AI. It is also an actively maintained open-source project.\n\n## References\nSee our paper https://arxiv.org/pdf/1901.08925.pdf. If you find this algorithm useful or use part of its code in your projects, please consider cite\n```\n@inproceedings{you2020combinatorial,\n  title={Combinatorial Q-Learning for Dou Di Zhu},\n  author={You, Yang and Li, Liangwei and Guo, Baisong and Wang, Weiming and Lu, Cewu},\n  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment},\n  volume={16},\n  number={1},\n  pages={301--307},\n  year={2020}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqq456cvb%2Fdoudizhu-C","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqq456cvb%2Fdoudizhu-C","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqq456cvb%2Fdoudizhu-C/lists"}