Skip to main content

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 card
  • Deck - A deck of 52 cards
  • Player - A poker player with chips
  • TexasHoldemGame - Main game engine
  • HandRank - Hand ranking enumeration
  • evaluate_hand - Hand evaluation function

Agents

  • BaseAgent - Abstract base class for AI agents
  • RandomAgent - 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deeppoker-0.1.1.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deeppoker-0.1.1-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

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

Hashes for deeppoker-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ff9b9da9ad86fcb6f5acac4da3209eff78219f6c8d7b00fed0669f9ec3290840
MD5 72b8f2c83a571a4812d835dee89a43c7
BLAKE2b-256 57b3dccc920433109d2a2dd632e22b152ffafc15a0e5bcf06f674778a27e07a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for deeppoker-0.1.1.tar.gz:

Publisher: publish.yml on ziyigogogo/deeppoker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for deeppoker-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17a2fa304158e633ea30facd690e6d350a54c0b08f6a1e15f88c16a4df2969f4
MD5 6d26aef35e5bf33bb42491ec917bd754
BLAKE2b-256 70716759235362147da4e055bd01c8e7bd7ab0f359b24c57e9f7009e3194785a

See more details on using hashes here.

Provenance

The following attestation bundles were made for deeppoker-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ziyigogogo/deeppoker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page