https://github.com/paladin-t/d2
A Python implementaton of the Dou Dizhu deck game.
https://github.com/paladin-t/d2
deck doudizhu poker-game
Last synced: about 1 year ago
JSON representation
A Python implementaton of the Dou Dizhu deck game.
- Host: GitHub
- URL: https://github.com/paladin-t/d2
- Owner: paladin-t
- License: gpl-3.0
- Created: 2019-04-27T16:04:04.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-02T12:25:02.000Z (almost 7 years ago)
- Last Synced: 2025-01-30T20:43:51.882Z (about 1 year ago)
- Topics: deck, doudizhu, poker-game
- Language: Python
- Homepage: https://repl.it/@hellotony/d2
- Size: 173 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## D2
**D2** is a Python implementaton of the [Dou Dizhu](https://en.wikipedia.org/wiki/Dou_dizhu) deck game.
### How to use
Retrieve the repository, then execute the script to run it under terminal mode:
```
git clone https://github.com/paladin-t/d2.git
cd d2
./d2.py
```
It outputs details beneath every process by default, including your opponents' cards, which is useful for debugging. Set `Utils.isDebug` to `False` to disable the spoiling.
Input the card faces separated by spaces directly to make your put, e.g. `8 9 10 j q k a` for `8♠, 9♣, 10♥, J♦, Q♣, K♥, A♦`, `:)` for 🙂 (black joker), `:D` for 😀 (red joker), etc.
### How it works
The complexity of Dou Dizhu is way far simpler than most chess games. It is possible for the AI to enumerate every valid putting and pick a prior combination according to evaluation and context. The evaluation is pretty rough though, I will leave it to you to explore more possibilities.
Read the only [source](d2.py) file for everything.
### License
[GPLv3](LICENSE)