Giter Club home page Giter Club logo

blackjack_simulator's Introduction

Monte Carlo Blackjack Simulator

what it does

Simulates outcomes of Blackjack games for user given settings and visualises the results in a dash application. The application will first ask you to enter some settings for the simulation. (number of games, number of rounds to play, number of card decks, deck penetration, player type) The games are then simulated and stored in a dataframe in the results folder. You can then access the data visualisations via your local host.

sample plots

Mean Capital Card Counter Plot

The first snippet compares the on average remaining capital for a card counter with an initial capital of 5000 after n rounds for different number of decks and deck penetrations. The results are averaged over 1000 game outcomes. You can see how much the results you get when counting cards depend on how many decks are used and how often the deck is shuffled. Also you can see the sharp increase in profits towards the end of the deck and how they flatten out again after the deck was shuffled.

Run Results Card Card Counter Plot

The second snippet shows a sample of the individual game results, hence capturing the variation you will face when deploying such a strategy.

how to use it

  1. Clone the repository.
  2. Install dependencies. You will need: pandas (+ xldr), numpy and dash
  3. Run main. This will run the simulation if you correctly input the settings as well as startup the dash application.
  4. Access visualisations via local host.

ideas to improve

  • neater user interface
  • improve visualisation (e.g. multidimensional analysis of outcomes with 3D plots)

blackjack_simulator's People

Contributors

nicohrubec avatar

Watchers

Kostas Georgiou avatar

blackjack_simulator's Issues

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.