{ "info": { "author": "Data Analytics at Texas A&M (DATA) Lab", "author_email": "khlai037@tamu.edu", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6" ], "description": "# RLCard: A Toolkit for Reinforcement Learning in Card Games\n![Logo](http://rlcard.org/imgs/logo.png \"Logo\")\n\n[![Build Status](https://travis-ci.org/datamllab/RLCard.svg?branch=master)](https://travis-ci.org/datamllab/RLCard)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/248eb15c086748a4bcc830755f1bd798)](https://www.codacy.com/manual/daochenzha/rlcard?utm_source=github.com&utm_medium=referral&utm_content=datamllab/rlcard&utm_campaign=Badge_Grade)\n[![Coverage Status](https://coveralls.io/repos/github/datamllab/rlcard/badge.svg)](https://coveralls.io/github/datamllab/rlcard?branch=master)\n\nRLCard is a toolkit for Reinforcement Learning (RL) in card games. It supports multiple card environments with easy-to-use interfaces. The goal of RLCard is to bridge reinforcement learning and imperfect information games, and push forward the research of reinforcement learning in domains with multiple agents, large state and action space, and sparse reward. RLCard is developed by [DATA Lab](http://faculty.cs.tamu.edu/xiahu/) at Texas A&M University.\n\n* Official Website: [http://www.rlcard.org](http://www.rlcard.org)\n* Paper: [https://arxiv.org/abs/1910.04376](https://arxiv.org/abs/1910.04376)\n\n## Installation\nMake sure that you have **Python 3.5+** and **pip** installed. We recommend installing `rlcard` with `pip` as follow:\n\n```\ngit clone https://github.com/datamllab/rlcard.git\ncd rlcard\npip install -e .\n```\n\nOr you can directly install the package with\n\n```\npip install rlcard\n```\n\n## Examples\nPlease refer to [examples/](examples). A **short example** is as below.\n\n```python\nimport rlcard\nfrom rlcard.agents.random_agent import RandomAgent\n\nenv = rlcard.make('blackjack')\nenv.set_agents([RandomAgent()])\n\ntrajectories, payoffs = env.run()\n```\n\nWe also recommend the following **toy examples**.\n\n* [Playing with random agents](docs/toy-examples.md#playing-with-random-agents)\n* [Deep-Q learning on Blackjack](docs/toy-examples.md#deep-q-learning-on-blackjack)\n* [Running multiple processes](docs/toy-examples.md#running-multiple-processes)\n* [Having fun with pretrained Leduc model](docs/toy-examples.md#having-fun-with-pretrained-leduc-model)\n* [Leduc Hold'em as single-agent environment](docs/toy-examples.md#leduc-holdem-as-single-agent-environment)\n* [Training CFR on Leduc Hold'em](docs/toy-examples.md#training-cfr-on-leduc-holdem)\n\n## Demo\nRun `examples/leduc_holdem_human.py` to play with the pre-trained Leduc Hold'em model:\n\n```\n>> Leduc Hold'em pre-trained model\n\n>> Start a new game!\n>> Agent 1 chooses raise\n\n=============== Community Card ===============\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2502\n\u2502\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2502\n\u2502\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2502\n\u2502\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2502\n\u2502\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2502\n\u2502\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2502\n\u2502\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2591\u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n=============== Your Hand ===============\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502J \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 \u2665 \u2502\n\u2502 \u2502\n\u2502 \u2502\n\u2502 J\u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n=============== Chips ===============\nYours: +\nAgent 1: +++\n=========== Actions You Can Choose ===========\n0: call, 1: raise, 2: fold\n\n>> You choose action (integer):\n```\n\n## Documents\nPlease refer to the [Documents](docs/README.md) for general introductions. API documents are available at our [website](http://www.rlcard.org).\n\n## Available Environments\nWe provide a complexity estimation for the games on several aspects. **InfoSet Number:** the number of information sets; **Avg. InfoSet Size:** the average number of states in a single information set; **Action Size:** the size of the action space. **Name:** the name that should be passed to `env.make` to create the game environment.\n\n| Game | InfoSet Number | Avg. InfoSet Size | Action Size | Name | Status |\n| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------: | :---------------: | :---------: | :-------------: | :--------: |\n| Blackjack ([wiki](https://en.wikipedia.org/wiki/Blackjack), [baike](https://baike.baidu.com/item/21%E7%82%B9/5481683?fr=aladdin)) | 10^3 | 10^1 | 10^0 | blackjack | Available |\n| Leduc Hold\u2019em | 10^2 | 10^2 | 10^0 | leduc-holdem | Available |\n| Limit Texas Hold'em ([wiki](https://en.wikipedia.org/wiki/Texas_hold_%27em), [baike](https://baike.baidu.com/item/%E5%BE%B7%E5%85%8B%E8%90%A8%E6%96%AF%E6%89%91%E5%85%8B/83440?fr=aladdin)) | 10^14 | 10^3 | 10^0 | limit-holdem | Available |\n| Dou Dizhu ([wiki](https://en.wikipedia.org/wiki/Dou_dizhu), [baike](https://baike.baidu.com/item/%E6%96%97%E5%9C%B0%E4%B8%BB/177997?fr=aladdin)) | 10^53 ~ 10^83 | 10^23 | 10^4 | doudizhu | Available |\n| Mahjong ([wiki](https://en.wikipedia.org/wiki/Competition_Mahjong_scoring_rules), [baike](https://baike.baidu.com/item/%E9%BA%BB%E5%B0%86/215)) | 10^121 | 10^48 | 10^2 | mahjong | Available | \n| No-limit Texas Hold'em ([wiki](https://en.wikipedia.org/wiki/Texas_hold_%27em), [baike](https://baike.baidu.com/item/%E5%BE%B7%E5%85%8B%E8%90%A8%E6%96%AF%E6%89%91%E5%85%8B/83440?fr=aladdin)) | 10^162 | 10^3 | 10^4 | no-limit-holdem | Available |\n| UNO ([wiki](https://en.wikipedia.org/wiki/Uno_\\(card_game\\)), [baike](https://baike.baidu.com/item/UNO%E7%89%8C/2249587)) | 10^163 | 10^10 | 10^1 | uno | Available |\n| Sheng Ji ([wiki](https://en.wikipedia.org/wiki/Sheng_ji), [baike](https://baike.baidu.com/item/%E5%8D%87%E7%BA%A7/3563150)) | 10^157 ~ 10^165 | 10^61 | 10^11 | - | Developing |\n\n## Evaluation\nThe perfomance is measured by winning rates through tournaments. Example outputs are as follows:\n![Learning Curves](http://rlcard.org/imgs/curves.png \"Learning Curves\")\n\n## Cite this work\n\n```\n@misc{zha2019rlcard,\n title={RLCard: A Toolkit for Reinforcement Learning in Card Games},\n author={Daochen Zha and Kwei-Herng Lai and Yuanpu Cao and Songyi Huang and Ruzhe Wei and Junyu Guo and Xia Hu},\n year={2019},\n eprint={1910.04376},\n archivePrefix={arXiv},\n primaryClass={cs.AI}\n}\n```\n\n## Contributing\nContribution to this project is greatly appreciated! Please create a issue for feedbacks/bugs. If you want to contribute codes, pleast contact [daochen.zha@tamu.edu](mailto:daochen.zha@tamu.edu) or [khlai037@tamu.edu](khlai037@tamu.edu).\n\n## Acknowledgements\nWe would like to thank JJ World Network Technology Co.,LTD for the generous support.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/datamllab/rlcard", "keywords": "Reinforcement Learning,game,RL,AI", "license": "", "maintainer": "", "maintainer_email": "", "name": "rlcard", "package_url": "https://pypi.org/project/rlcard/", "platform": "", "project_url": "https://pypi.org/project/rlcard/", "project_urls": { "Homepage": "https://github.com/datamllab/rlcard" }, "release_url": "https://pypi.org/project/rlcard/0.1.8/", "requires_dist": null, "requires_python": "", "summary": "A Toolkit for Reinforcement Learning in Card Games", "version": "0.1.8" }, "last_serial": 5962430, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "cb1a754b7169f87e89acef3b575c7a8d", "sha256": "c09aca2c3891daa5af1683829fa8a83ff2ae9a5ccc7a960a2bb74d3f15ff1ae7" }, "downloads": -1, "filename": "rlcard-0.1.tar.gz", "has_sig": false, "md5_digest": "cb1a754b7169f87e89acef3b575c7a8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18848, "upload_time": "2019-10-09T01:45:40", "url": "https://files.pythonhosted.org/packages/ee/64/cc3ba5cbe64ababa463e783e4730bf8c4b4c57be8bcd13d7a1fb7b22bd34/rlcard-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e0ee5cb72e683a29ec1f770c636d170a", "sha256": "646c7901315e09eacec4f136d1ed80d55504d49c08bcc4959cf20153f2d8047f" }, "downloads": -1, "filename": "rlcard-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e0ee5cb72e683a29ec1f770c636d170a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19908, "upload_time": "2019-10-09T02:51:37", "url": "https://files.pythonhosted.org/packages/9a/c2/c03abf09dde459ee09d3208ab7b84e26d309ecd98410dc8bfccbcdd6ed64/rlcard-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5d3fce78e1e9cd30ea92d607ec6818a1", "sha256": "6748be9a1478fb3860bc8631ba684b7b1e6ddb2cf735b3b4a45b9b6eb71f6937" }, "downloads": -1, "filename": "rlcard-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5d3fce78e1e9cd30ea92d607ec6818a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19928, "upload_time": "2019-10-09T03:07:32", "url": "https://files.pythonhosted.org/packages/b9/c7/baae958658a953cae55e7c4224d45c13c14c5a8a83713cad7caadd0383d3/rlcard-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "edf39535f53b6846ffb77a5fe78aa876", "sha256": "f64e47cf82a7648c5dabf7564127c319a406c785e0c2b52812c1f9d18a099dd3" }, "downloads": -1, "filename": "rlcard-0.1.3.tar.gz", "has_sig": false, "md5_digest": "edf39535f53b6846ffb77a5fe78aa876", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 64884, "upload_time": "2019-10-10T00:14:52", "url": "https://files.pythonhosted.org/packages/cf/16/c17215d4d322f7f869feca23a357885529dc583f1c7ab851687daa48c49b/rlcard-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "d103b0636359bee215856c0d72b48e9d", "sha256": "be033422cbb2d66019404b54826ee6770e83f5922ebb050d4153e5f25523fc4e" }, "downloads": -1, "filename": "rlcard-0.1.4.tar.gz", "has_sig": false, "md5_digest": "d103b0636359bee215856c0d72b48e9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1371312, "upload_time": "2019-10-10T02:14:29", "url": "https://files.pythonhosted.org/packages/57/13/0833638f36aef118f9ee209dc23239eec1477c1d311b72eb145a06563c45/rlcard-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "5687d8da7fe900b900478be06bc4720b", "sha256": "e13d815296b88d58177ce9a26b841bf0529272b9720232cbd7bf67dc46face0b" }, "downloads": -1, "filename": "rlcard-0.1.5.tar.gz", "has_sig": false, "md5_digest": "5687d8da7fe900b900478be06bc4720b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1392152, "upload_time": "2019-10-11T00:22:57", "url": "https://files.pythonhosted.org/packages/0c/7e/1cbaab8583941cb412125c43ab2d13ba24097cbad1e0bce730adb87cbab5/rlcard-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "d45b06605ac2d0fb2fd6424cee8ee2d6", "sha256": "b4bcbff10459025da666edab60a04cf875ed7fa3bb711d24d18d06414c8d555b" }, "downloads": -1, "filename": "rlcard-0.1.6.tar.gz", "has_sig": false, "md5_digest": "d45b06605ac2d0fb2fd6424cee8ee2d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1392146, "upload_time": "2019-10-11T00:33:03", "url": "https://files.pythonhosted.org/packages/23/30/3eaf948ae5b7aa9df99bf0453acb9a11a1f86d84fc5dc0320f6d99974f24/rlcard-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "41c771bb49e4fe80a11e59d26ef75d3c", "sha256": "d7235c77fd9dc8a58a86e627ca95714bda3eb04d6ad8c64d8c10e72aded4583c" }, "downloads": -1, "filename": "rlcard-0.1.7.tar.gz", "has_sig": false, "md5_digest": "41c771bb49e4fe80a11e59d26ef75d3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1392957, "upload_time": "2019-10-12T00:34:39", "url": "https://files.pythonhosted.org/packages/df/6c/35bbab3fa0019af41200612d59ad2386db6b192d0a644b88755375526f0a/rlcard-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "a47fade89702663f5cb370a363400c45", "sha256": "f5191f19f5a656b4fa69e8167100457a1fcec2cc98f951e7bbb52c22592af280" }, "downloads": -1, "filename": "rlcard-0.1.8.tar.gz", "has_sig": false, "md5_digest": "a47fade89702663f5cb370a363400c45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1392954, "upload_time": "2019-10-12T00:39:45", "url": "https://files.pythonhosted.org/packages/3b/47/83d7d7486b4150baa70cd8aa7d36151b96e66dca176a1b1a0eb1931e8906/rlcard-0.1.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a47fade89702663f5cb370a363400c45", "sha256": "f5191f19f5a656b4fa69e8167100457a1fcec2cc98f951e7bbb52c22592af280" }, "downloads": -1, "filename": "rlcard-0.1.8.tar.gz", "has_sig": false, "md5_digest": "a47fade89702663f5cb370a363400c45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1392954, "upload_time": "2019-10-12T00:39:45", "url": "https://files.pythonhosted.org/packages/3b/47/83d7d7486b4150baa70cd8aa7d36151b96e66dca176a1b1a0eb1931e8906/rlcard-0.1.8.tar.gz" } ] }