A visual simulator of counting strategy playing blackjack
View Source Code »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
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.
- 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).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origi n feature/AmazingFeature
) - Open a Pull Request
Released under MIT by @NoamLoewenstern.
Noam Loewenstern
- alias-email: noam-loewenstern-github-alias.voaj5@aleeas.com
Project Link: https://github.com/NoamLoewenstern/blackjack-counting-simulator