Skip to main content

a command-line-interacted texas holdem poker game, also include a real-time winning-rate calculator

Project description

Texas Holdem Poker

This is a package including a command-line-interacted simulated texas holdem poker game, and a winning-rate calculator

In this game, you will play holdem and compete with AI which is based on Monte Carlo method and Kelly formula

If you are interested in poker game like this, try and enjoy!

(This is an alpha version now)

德州扑克模拟器

这个包包含了一个命令行交互形式的德州扑克游戏,以及包含一个实时胜率计算器

在该游戏中,你将与其他基于蒙特卡洛算法与凯利公式设计的AI玩家进行对抗

如果你也对德州扑克感兴趣,不妨一起来试一试吧!

(目前为alpha测试版本)

1.How to install

pip install texas_holdem_poker

2.How to play

HoldemGame

class HoldemGame is a simulator of texas holdem poker game

to start the game, just import this class and call ‘run’ method

from texas_holdem_poker import HoldemGame

HoldemGame.run()

And it will work like this

            Texas Holdem Poker Simulator


Your money: 1000
Player1 money: 1000
Player2 money: 1000
Player3 money: 1000
Player4 money: 1000
Player5 money: 1000

Round: 0
now your turn, your cards: [♦K, ♠K]
remaining money: 5000, already bet: 0
input your bet:
And then, input your bet(bet should be an integer) to action!

fold if input < 0

check if input == 0 == bottom

call if input <= bottom

raise if input > bottom

Calculator

class Calculator is designed for winning-rate calculation

from texas_holdem_poker import Calculator

Calculator.run()

And it will work like this

Input your hand cards, for examples: "SJ S10", S=Spade♠, C=Club♣, H=Heart♥, D=Diamond♦
SJ S10
Input community cards, can be empty

Input total players and total remaining players(include yourself), for examples:"6 2"
6 2
Win Rate: 0.6093

through pip and pypi, you can easily use it anywhere and on any devices which can run python

(I sometimes use it on my mobile phone when play with my friends, lol P.S: they know that and agree)

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

texas_holdem_poker-0.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

texas_holdem_poker-0.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file texas_holdem_poker-0.1.0.tar.gz.

File metadata

  • Download URL: texas_holdem_poker-0.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.5

File hashes

Hashes for texas_holdem_poker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d1c6f5d70f4a2aa43a272f6144c912fcf330e5b12b1992f800f3fd9cf306abd8
MD5 9bb668fea7016fbb7329b9cf777bdbfb
BLAKE2b-256 436ec5a43b75167bc2d4789c67c1e4855f4a82e3e1dd2a71da0f43ffb4146c1b

See more details on using hashes here.

File details

Details for the file texas_holdem_poker-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for texas_holdem_poker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1f574ee62ffa8a7efb6f63949c170dd0233005f5deb1315cec67a2fdc98c1b6
MD5 3bbc8124462ab9c08dd47f233c5097a6
BLAKE2b-256 f064fbb382f303eaeb9d5c8072f7070d024a45cc87740f47d27d1ac3ea493073

See more details on using hashes here.

Supported by

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