Greyjack, An Easier Model of Blackjack

  • Context: Comp Sci 
  • Thread starter Thread starter RayDonaldPratt
  • Start date Start date
  • Tags Tags
    Model
Click For Summary
SUMMARY

The discussion centers on developing a JavaScript program to iterate through every possible shuffle of a 4-suit deck of cards for a game called Greyjack. With approximately 3 x 1011 permutations, the challenge lies in processing these efficiently, especially given the constraints of typical computing power. The conversation emphasizes the need for a more general approach to identifying patterns in card sequences rather than exhaustively generating permutations. Additionally, the impact of modern variations of blackjack, such as the "Match the Dealer" side bet, complicates the analysis due to the importance of suits.

PREREQUISITES
  • Understanding of JavaScript programming
  • Familiarity with combinatorial mathematics, specifically permutations
  • Knowledge of game theory principles
  • Basic concepts of card games, particularly Blackjack variations
NEXT STEPS
  • Research the lexicographic permutation generation algorithm
  • Explore existing literature on card game strategies and patterns
  • Study game theory applications in gambling scenarios
  • Investigate methods for efficient data processing in JavaScript
USEFUL FOR

This discussion is beneficial for game developers, mathematicians interested in combinatorial game theory, and anyone looking to optimize card game strategies in programming contexts.

RayDonaldPratt
Messages
9
Reaction score
9
Homework Statement
Work at Home, But Not Homework: Decades ago I read a book about card counting in blackjack, and the author had created a game called 'greyjack' for training purposes where the highest hand was 11, aces counted as 1 or 6, and number 5 cards were the highest number of card. I thought it was one of Ken Uston's books, but I cannot find 'greyjack' as a simpler model game of blackjack by searching through google.

I want to create a javascript program that logically iterates through every possible shuffle and starts card play at each and every possible beginning card in a given shuffle and does it all again for increasing numbers of players, and then tallies the results for every possible hand play. I want the progressive algorithm for shuffling to be human understandable.

My first question is whether I should add one or more face cards as 'fives.' I want greyjack to have a similar ratio of high and low cards as in a regular blackjack game. My guess is that each suit should only have a five and a jack. Has anyone read about 'greyjack'?
Relevant Equations
0
See above.
 
Physics news on Phys.org
RayDonaldPratt said:
I want to create a javascript program that logically iterates through every possible shuffle.
For a 4 suit deck of cards { A, 2, 3, 4, 5 }, i.e. 20 cards, there are ## 20! \approx 2.4 \times 10^{18} ## permutations. For Blackjack the suits don't matter so you can reduce this by a factor of ## (4!)^5 ## to give ## \approx 3 \times 10^{11} ## permutations which is just within the bounds of practical computability (if you can process a million permutations a second it will take 3.5 days to process them all).

The standard algorithm for generating lexicographic permutations works with repeated values, see e.g. https://en.wikipedia.org/wiki/Permutation#Generation_in_lexicographic_order

RayDonaldPratt said:
and starts card play at each and every possible beginning card in a given shuffle and does it all again for increasing numbers of players, and then tallies the results for every possible hand play.
You are not going to be able to do all that a million times a second.

RayDonaldPratt said:
I want the progressive algorithm for shuffling to be human understandable.
The algorithm referred to above is certainly that (it has been known for over 500 years).
 
  • Like
Likes   Reactions: DeBangis21
Pbuk, thank you for letting me know just how astronomical the number of permutations are. I feared that, and I don't know if my potato laptop could even summarize the results in any readable form, much less in a memorable form. I'm probably looking for something more general than iterating through every possible permutation. As I understand the term "pattern," it means some discernible order with some degree of reliablility that can be expressed without laying out the exact sequence of cards in a deck. If a sequence of cards can only be stated by laying out the exact sequence of cards, then the sequence is effectively random, even if only because the observer cannot divine and state a description of the pattern. I will play with some ideas about generating patterns, tallying wins and losses, etc., and then increasingly randomizing general patterns to see when they break down from indicating favorablility or unfavorability.

Unfortunately, a modern variation of blackjack with a side bet ("Match the Dealer") makes suit important, so 20! even for greyjack is still a problem. Thank you for the heads up.
 
RayDonaldPratt said:
I'm probably looking for something more general than iterating through every possible permutation.
Indeed.

I would start by learning what others have done. This paper and its references might be a good start: https://digitalcommons.latech.edu/mathematics-senior-capstone-papers/4/

RayDonaldPratt said:
I will play with some ideas about generating patterns, tallying wins and losses, etc., and then increasingly randomizing general patterns to see when they break down from indicating favorablility or unfavorability.
Game theory is quite a well developed science: you might be better off studying the existing techniques rather than playing with your own ideas.

RayDonaldPratt said:
Unfortunately, a modern variation of blackjack with a side bet ("Match the Dealer") makes suit important
Only when there is more than one deck in the shoe, and by this time you have lost all hope of enumerating permutations.
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 20 ·
Replies
20
Views
4K
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K