Giter VIP home page Giter VIP logo

blackjack's Introduction

#Blackjack simulator and statistical analysis tool

Author: Will Moyle Last Modified 20 Nov 2015

A command line tool, written in Python, that allows the user to either:

  • play a game of blackjack against the computer, choosing when to stick or hit manually
  • choose a strategy for the player and automatically run a given number of games and analyse the results

The user is asked:

  • What is their strategy. Can be either "Manual", "Soft 16-18" or "Hard 16-18" (e.g. input "Soft 16")
  • How much the user wants to bet each hand
  • What the multiplier for blackjack wins is (e.g. 1.5)
  • Whether the dealer should stand on a soft 17 or hard 17 (varies by casino)
  • If the user's strategy is not "Manual" then the user inputs how many hands they wish to play and whether they want to see details of each hand

At the end, the program outputs the total number of wins, losses, draws and blackjack wins, along with the win rate (as a percentage) and the total monetary winnings or losses.

For a detailed set of rules for blackjack (used for reference in developing this program), visit http://www.pagat.com/banking/blackjack.html

blackjack's People

Contributors

willmoyle 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.