Skip to content

Simulating the different strategies in playing blackjack. User play VS. Consistent Betting Perfect Basic Strategy VS. Spread-Bet based on Basic-Counting Strategy

License

Notifications You must be signed in to change notification settings

noamloewenstern/blackjack-counting-simulator

Repository files navigation

Blackjack Counting Simulator

NoamLoewenstern - blackjack-counting-simulator stars - blackjack-counting-simulator forks - blackjack-counting-simulator License

LinkedIn


Logo

Blackjack Counting Visual Simulator

A visual simulator of counting strategy playing blackjack
View Source Code »

View Demo · Report Bug · Request Feature


Website Example Gif


Table of Contents
  1. About The Project
  2. Demo
  3. Roadmap
  4. Contributing
  5. License
  6. Contact

About The Project

Motivation - Learning New Tech!

I've been intrigued by Blackjack and statistical analyses that can provide a player with an advantageous edge.

While simulators exist on the web, I haven't encountered a visually engaging simulator that illustrates how a player would compete against a card-counting bot. This includes considering Betting Variations beyond the known Perfect Blackjack Strategy.

I'm always keen to learn new technologies and libraries to solve problems. Therefore, I started developing a website using the zustand state management library.

However, the simplicity soon gave way to complexity when dealing with the game flow and managing various state conditions, which became quite chaotic.

I was recently introduced to the xstate library, and after initial reservations about its usage style, I've grown to appreciate it immensely.

It offers an intuitive approach to handling deterministic finite states and is extremely powerful.

However, it does have its shortcomings, primarily its documentation and the lack of clear "best practices". This includes guidance on where to store specific variables and how to handle dependency injection callbacks and variables, among other things.

Blackjack's game flow is an ideal case for testing out xstate. The game's finite options and intricate rules make it a complex yet suitable scenario. I honestly can't envision a simpler implementation method than xstate.

(back to top)

Built With

  • Typescript
  • React
  • Vite
  • xstate
  • Vercel
  • TailwindCss

(back to top)

Demo

hosted-website-badge

Website Example Gif adf adf adf

Roadmap

  • Improve UX
  • Settings
    • Configure Bet Variations
    • Change speed of game
    • Allow disable recommended action

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origi n feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Released under MIT by @NoamLoewenstern.

(back to top)

Contact

Noam Loewenstern

Project Link: https://github.com/NoamLoewenstern/blackjack-counting-simulator

(back to top)

About

Simulating the different strategies in playing blackjack. User play VS. Consistent Betting Perfect Basic Strategy VS. Spread-Bet based on Basic-Counting Strategy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published