allenfrostline / Poker

Poker: A Simple Poker GUI in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Poker

This is a simple Texas Hold 'em game running on MacOS. All scripts are written in pure Python. The main GUI is written using the Python module PySimpleGUI, and hand evaluation is done by refering to a hand value table pre-calculated together with Monte Carlo simulation. See here for detailed explanation of hand evaluation. Together with the GUI version, I also include here a primitive commmandline version with ColorPrint support, which you may download and include from this repo. The two versions are supposed to work identically.

Usage

You don't need any Python or module dependencies installed on your Mac in order to just play the game. The app itself is standalone with everything packed inside it already. There're just two steps:

  1. Download the app from here.
  2. Double click it.

Or rather, if you'd like to pack it yourself:

  1. Download this repo.
  2. Pack it using PyInstaller in --onefile mode.
  3. Double click the app you just generated.

To-Do's

There're several things to work on in plan:

  • Fix bugs (please, don't again).

  • Write up AI agents of different strategies (in progress):

    • Expected hand value optimization (Greedy);
    • Game theory optimal (GTO);
    • Evolutionary algorithm (EA);
    • Deep Q-Learning (DQN).
  • Build a server-based version so multiple people can play on different divices.

  • Build an Android version (proposed by author of PySimpleGUI, MikeTheWatchGuy).

  • Fix GUI problems:

    • Resolution of image is extremely low and it looks ugly on Retina screens.
    • Button styles and other design-related issues.

Known Bugs

Here are some bugs I'm trying to fix:

  • Side pot. It's tricky and I havn't found a way to implement it simple.
  • Side pot. It's tricky and I havn't found a way to implement it simple.
  • Freeze at start. The app starts and then freezes for a sec. This is because Python is openning the hand value table. Perhaps I should try threading for this particular task (no need for the rest of the game). I'll also try to compress the table in a better way (like functionize it). Working on the animated Popup element in PySimpleGUI.

Acknowledgement

I appreciate suggestions and encourage from anyone throughout the development (which may still continue for a long time, considering the considerable time I spent just on writing this primitive game). Special thanks to my friends who ever tried to play the game and found bugs starting from the commmandline version. Also, credit for MikeTheWatchGuy who wrote the PySimpleGUI module and helped me fix several bugs. Also, credit to Freepik from www.flaticon.com, who made this fantastic icon. Finally, I wanna give credit to myself for the nights I stayed up after lectures. There is nothing more fulfilling than realizing an impulse right away.

About

Poker: A Simple Poker GUI in Python


Languages

Language:Python 100.0%