View Code? Open in Web Editor
NEW
This project is to create a blackjack simulation which will be played by different bots to find different winning strategies and factors that support players winning. The whole project lifecycle was lived on my personal youtube channel, collaborated with a developer Praphan.O
HTML 9.47%
CSS 5.35%
TypeScript 85.19%
blackjack-sim-th's People
Contributors
Watchers
blackjack-sim-th's Issues
Create a bot that will randomly choose between HIT or STAND equally. (50%/50%)
Start a round by
dealing 2 cards per player as the following sequences:
Player1 - Player7 -> Dealer -> Player1 - Player7 -> Dealer
If dealer’s point > player points, player lose.
If dealer’s point < player points, player win.
If dealer’s point = player points, draw.
Up to 7 players
and 1 dealer
Create a bot as a player with the following behavior:
Define a 'x' as value limit. x can be between 11-21.
If below or equal 'x', HIT. Else if above or equal 'x', STAND.
When exceed 21 points, player/dealer busted.
When reach 21 points, end player action
If it’s within 2 cards, player win blackjack.
If dealer draw 21 points with first 2 cards, dealer win blackjack and end round.
Control bot table rotation.
Define probability for
New bot to be spawn when there is an empty seat
Existing bot to leave the table.
To switch the table
Bug found when work on #7
Create a bot as a player with the following behavior:
Create a bot as a player with the following behavior:
If below or equal 16, HIT. Else if above or equal 17, STAND.
(This behavior is same as dealer action rules)
A,2-10, J,Q,K
each with 4 suits : spade, diamond, heart, club
When it's a player's turn, the player can choose either HIT or STAND.
When HIT, a new card will be drawn into a player hand.
The total value will be calculated via #7
If the total value is still below 21, the player still can continue to chose either HIT or STAND.
When it's a player's turn, the player can choose either HIT or STAND.
When STAND, the player's turn end and will continue to the next player.
To show
Win/Lose ratio of each bot/persona
Control bot population on the table
Define a probability for each bot/persona to be spawned into the table.
To define a number of rounds to simulate.
Dealer action must follow this logic.
If below or equal 16, HIT. Else if above or equal 17, STAND.