Giter Site home page Giter Site logo

blackjackcount's Introduction

BlackjackCount

This program plays blackjack against itself using "perfect" chart based blackjack strategy. It takes the side of the dealer and the player and then plays a user specified number of hands. The game is played with 6 decks of cards that get shuffled into a virtual "shoe" then reshuffled at the end of the shoe, just like in a real casino.

The "player" playing against the dealer starts out with a user specified amount of money and bets the same amount every hand. After the total number of hands have been played, the amount of money each "player" has left is known.

This allows the simulation of a huge amount of blackjack hands, using "perfect" strategy. This leads to an accurate representation of the house edge within the game of blackjack.

##Why

It was a nice coding challenge to try build an all emcompassing model to play both sides of the game "perfectly". It is also nice to be able to have hard data to show the house edge over a huge sample of hands, something that isnt possible in real life due to temporal and fiscal limitations.

##Other Features. The code also tracks the "count" of the deck for every hand and stores it in an array along with the amount won and lost in every hand. This allows a cross referencing of the count of the deck at any given point in time with the amount the player is winning. This will build up a quantative correlation between profitability and the count of the deck.

##TODO

  • allow custom user defined betting strategies

blackjackcount's People

Contributors

adiman9 avatar

Stargazers

 avatar

Watchers

 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.