Skip to content

The project aims to compare various different blackjack strategies and simulate the methodology to find the win rate for those strategies using AI.

Notifications You must be signed in to change notification settings

sakshampandey27/blackjack-AI

Repository files navigation

Blackjack, also known to some as twenty-one, is one of the most popular casino games around the world. Blackjack is a card game that pits the player(s) against a dealer. One or more players can play this game at a time, and it is usually played with 1-8 decks of cards.

The goal of this project was to simulate the game of Blackjack in Python, by implementing several gameplay strategies and comparing the performance of each of those to draw inferences between them. The odds of winning at blackjack are 42.22% and we aimed to build an AI which uses a strategy that can better this percentage.

To illustrate our results, we simulated the strategies using the Monte Carlo methodology and determined the win percentage for each of the strategies obtained by running a large number of simulations.


Code execution:

To run the code, simply install the dependencies from requirements.txt and execute the blackjack.py file. During execution, you must enter a strategy as an argument which will be used to run the simulations and generate a win percentage. The possible strategies are: [random, simple, basic, counting, ml]

About

The project aims to compare various different blackjack strategies and simulate the methodology to find the win rate for those strategies using AI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages