Giter VIP home page Giter VIP logo

pokerman's Introduction

Pokerman

TL;DR, predicting poker hands.

The Problem

Given the sequence of 5 'community' cards, drawn from a standard deck of cards, what hand is most likely present with at least one of the players in the game.

Why?

Diligence is the mother of good luck. 
                            - Benjamin Franklin

Poker Hands

Texas Hold Em is played by dealing each player 2 cards (face down), called the hole cards, and dealing 5 community cards (face up), on the table.

The player makes a poker hand using any combination of the 3 cards dealt to them, and the 5 cards on the table.

The player with the strongest hands wins. Most commonly accepted ranking of hands, strongest to weekest :

Rank Hand Description
0 Royal Flush A K Q J 10 all of the same suit
1 Straight Flush Any 5 cards of the same suit, in sequence
2 Four of a Kind 4 cards of the same rank, like, 4 4 4 4
3 Full House A 3 of a kind, and a pair, of different ranks
4 Flush Any 5 cards of the same suit
5 Straight Any 5 cards in sequence
6 Three of a Kind Any 3 cards of the same rank
7 Two Pair Any 2 pairs of cards
8 One Pair Any 2 cards of the same rank
9 High Card Highest Ranked card in hand

Ranking of Cards

A K Q J 10 9 8 7 6 5 4 3 2 1

Data

This data was acquired from UCI's Machine Learning repository. The data comes already split into training and testing data.

Find it here.

Distribution of Test Data

data image

Each bar represents the frequency of the corresponding hand as specified in the dataset description.

NOTE: The hands' class labels are in the reverse order of their strength, i.e, 0 is the weakest hand.

Citation

Dua, D. and Karra Taniskidou, E. (2017). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.

Machine Learning ๐Ÿ–ฅ ๐Ÿง

Model Accuracy Plot
Linear Regression 42% Regression image
SVM 58% SVM image
Adaboost 49% Adaboost image
Output Code Classifier 61% Output Code Classifier image
Random Forest 56% Random Forest image
Artificial Neural Network 45% ANN image
Deep Neural Network 87% DNN image
Multi Layer Perceptron 97% ๐Ÿคฏ MLP image

Conclusion

The Multi-layer Perceptron is clearly the best model for the dataset in hand. Here's the confusion matrix to provide us with some more insight into how accurate this model really was with its predictions.

Multi Layer Perceptron Confusion Matrix

Primary Contributors

Aditi Srinivas
Avinash Shenoy

pokerman's People

Contributors

avinashshenoy97 avatar aditisrinivas97 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.