Giter Site home page Giter Site logo

poker-probability-approximation's Introduction

Poker Probability Approximation with Deep Learning

This project uses a neural network to quickly compute the probability of a hand ending in a win or tie. While lookup tables can be used, they are memory-intensive and cannot be stored in memory-constrained environments, such as mobile applications. Storing the weights in either numpy or tensorflow drastically reduces the memory required.

The learned model can be used in any betting round of Texas Hold'Em Poker.

Getting Started

To get started, clone this repo and open the file pokerDeepLearningModel.py

You will see three variables near the top of the file which you can toggle before running

num_data_points = 1000           # The number of instances we want in our sample dataset
use_existing_model = True        # Do you want to use a pre-computed model or train a new one?
inference_sample_size = 100      # Size of sample to test the model on

The file outputs the Mean Absolute Error (MAE) for the sample in which you are testing on

Deployment

The learned model can easily be loaded and used as an input to a heuristic-based agent or a machine learning-based agent.

probability_saver = tf.train.import_meta_graph("Probability Model/ProbabilityApproximator.meta")
probability_saver.restore(sess, tf.train.latest_checkpoint("Probability Model"))

graph = tf.get_default_graph()
probabilityFunction = probabilityApproximator(sess, probabilityInputList.shape[1], 0.0005, use_existing_model, graph)

A popular heuristic implementation is to use the probabilities obtained from the neural network in conjuction with your pot odds to make profitable decisions. Conversely, with a machine learning agent, we can use a function approximation for the policy and feed these probabilities as some of the inputs.

Work in Progress

The combinatorics for straight flush need to be updated in the pokerCombinatorics.py file

poker-probability-approximation's People

Contributors

brandinho avatar

Watchers

James Cloos avatar Suvigya Vijay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.