DeepPoker R1 - A Texas Hold'em poker game engine with FastAPI WebSocket server and AI agent framework
Project description
DeepPoker
DeepPoker R1 - A Texas Hold'em poker game engine with FastAPI WebSocket server and AI agent framework.
Features
- Pure Python game core logic (no external poker dependencies)
- FastAPI + WebSocket server architecture
- AI Agent interface for LLM RL integration
- Complete Texas Hold'em rules implementation
Installation
pip install deeppoker
Or with uv:
uv add deeppoker
Quick Start
from deeppoker import Card, Deck, Player, TexasHoldemGame
# Create players
players = [Player(f"Player {i}", chips=1000) for i in range(4)]
# Create and start a game
game = TexasHoldemGame(players, small_blind=10, big_blind=20)
game.start_hand()
Development
Clone the repository and install development dependencies:
git clone https://github.com/ziyigogogo/deeppoker.git
cd deeppoker
uv sync --all-extras
Run tests:
uv run pytest
Start the server:
uv run deeppoker
API Reference
Core Classes
Card- Represents a playing cardDeck- A deck of 52 cardsPlayer- A poker player with chipsTexasHoldemGame- Main game engineHandRank- Hand ranking enumerationevaluate_hand- Hand evaluation function
Agents
BaseAgent- Abstract base class for AI agentsRandomAgent- Random action agent for testing
Publishing
发布新版本到 PyPI(维护者使用):
# 1. 更新 pyproject.toml 中的 version
# 2. 更新 deeppoker/__init__.py 中的 __version__
# 3. 提交更改
git add . && git commit -m "Bump version to x.x.x"
# 4. 打 tag 并推送
git tag vx.x.x
git push && git push --tags
GitHub Actions 会自动构建并发布到 PyPI。
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deeppoker-0.1.1.tar.gz.
File metadata
- Download URL: deeppoker-0.1.1.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff9b9da9ad86fcb6f5acac4da3209eff78219f6c8d7b00fed0669f9ec3290840
|
|
| MD5 |
72b8f2c83a571a4812d835dee89a43c7
|
|
| BLAKE2b-256 |
57b3dccc920433109d2a2dd632e22b152ffafc15a0e5bcf06f674778a27e07a0
|
Provenance
The following attestation bundles were made for deeppoker-0.1.1.tar.gz:
Publisher:
publish.yml on ziyigogogo/deeppoker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deeppoker-0.1.1.tar.gz -
Subject digest:
ff9b9da9ad86fcb6f5acac4da3209eff78219f6c8d7b00fed0669f9ec3290840 - Sigstore transparency entry: 833612700
- Sigstore integration time:
-
Permalink:
ziyigogogo/deeppoker@2367bce88eb20a5334189890f6a9899ff5d05a1f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ziyigogogo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2367bce88eb20a5334189890f6a9899ff5d05a1f -
Trigger Event:
push
-
Statement type:
File details
Details for the file deeppoker-0.1.1-py3-none-any.whl.
File metadata
- Download URL: deeppoker-0.1.1-py3-none-any.whl
- Upload date:
- Size: 35.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17a2fa304158e633ea30facd690e6d350a54c0b08f6a1e15f88c16a4df2969f4
|
|
| MD5 |
6d26aef35e5bf33bb42491ec917bd754
|
|
| BLAKE2b-256 |
70716759235362147da4e055bd01c8e7bd7ab0f359b24c57e9f7009e3194785a
|
Provenance
The following attestation bundles were made for deeppoker-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on ziyigogogo/deeppoker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deeppoker-0.1.1-py3-none-any.whl -
Subject digest:
17a2fa304158e633ea30facd690e6d350a54c0b08f6a1e15f88c16a4df2969f4 - Sigstore transparency entry: 833612701
- Sigstore integration time:
-
Permalink:
ziyigogogo/deeppoker@2367bce88eb20a5334189890f6a9899ff5d05a1f -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ziyigogogo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2367bce88eb20a5334189890f6a9899ff5d05a1f -
Trigger Event:
push
-
Statement type: