logic of splits

sagefr0g

Well-Known Member
#1
i'm still working on this bj simulator project.
i have the thing splitting but not completely properly.

relevant or irrelevant as it may be for a simulator, i'd appreciate it if anyone would look over the outline below and comment on if it makes sense or not.

-----------------------------------------------------

possible scenarios and logic for a game that allows up to four splits:

for the case where four splits occur then that will constitute a total of five hands.

scenario one
all four splits came from initial hand

scenario two
three splits from initial hand
4th split from 2nd hand

scenario three
three splits from initial hand
4th split from 3rd hand

scenario four
three splits from initial hand
4th split from 4th hand

scenario five
two splits from initial hand
3rd & 4th split from 2nd hand

scenario six
two splits from initial hand
3rd split from 2nd hand
4th split from 3rd hand

scenario seven
two splits from initial hand
3rd & 4th split from 3rd hand


scenario eight
two splits from initial hand
3rd split from 2nd hand
4th split from 4th hand


scenario nine
two splits from initial hand
3rd split from 3rd hand
4th split from 4th hand

scenario ten
one split from initial hand
2nd, 3rd & 4th split from 2nd hand

scenario eleven
one split from initial hand
2nd & 3rd split from 2nd hand
4th split from 3rd hand

scenario twelve
one split from initial hand
2nd & 3rd split from 2nd hand
4th split from 4th hand

scenario thirteen
one split from initial hand
2nd split from 2nd hand
3rd split from 3rd hand
4th split from 4th hand

edit: i found two missing scenarios as below

xxxxdeleted

scenario fourteen
one split from initial hand
second split from second hand
third & fourth split from third hand



logic of splitting when four splits are allowed:

if there is going to be splitting then:

for the case where four splits occurs then:

five hands will be produced that need to be played out, that would be if there are four splits.

initial hand can have from one to four splits from it (must have at least one)
2nd hand can have from zero to three splits from it
3rd hand can have from zero to two splits from it
4th hand can have from zero to one split from it......
5th hand doesn't get to split.

the first split always comes from the intial hand creating
the second hand. that is P1

so second split could come from initial hand as it draws again first
if not it comes from the second hand when it draws, which ever way the third hand is created. that is P2

so the third split could come from the initial hand if and only if it is drawing again after having created the third hand or if initial hand draws out then it could come from the second hand when it draws or if the second hand draws out then it would come from the third hand as it draws, which ever way the fourth hand is created. that is P3

so the fourth and final split could come from the intial hand if and only if it is drawing again after having created the fourth hand or if initial hand draws out then it could come from the second hand when it draws or if the second hand draws out then it could come from the third hand as it draws or if the third hand draws out then it could come from the fourth hand as it draws, which ever way the fifth hand is created. that is P4.

make any sense?:confused::whip:
 

stophon

Well-Known Member
#3
I found it easier to assign a variable to number of hands. The program would play basic strategy and be allowed to split the hand unless it exceeded the number of hands allowed.

I sympathize with you. It is a bitch to program splits.
 

sagefr0g

Well-Known Member
#4
Canceler said:
Scenario fourteen looks awfully similar to five.
yes, thank you very much Canceler.
fourteen should have read:

scenario fourteen
two splits from initial hand
third split from second hand
fourth split from third hand

i changed it in blue in the original post.
thank you again.:rolleyes::whip:
 

sagefr0g

Well-Known Member
#6
Canceler said:
Now 14 = 6 :joker:

Seriously, I think you've got them all...
thank you again, Canceler!
how did you come up with the numbers in your chart image?

so graphically those scenarios are as in the image below.
 

Attachments

Canceler

Well-Known Member
#7
sagefr0g said:
how did you come up with the numbers in your chart image?
I just decided to put your scenarios into the form of a table, so I could visualize it better. Did all the possible combinations I could think of, and then matched them up with your scenario numbers. So the first column of information, where hands 1 thru 4 each get split 1 time, matches up with your scenario 13, for example.

I have to say I’m not sure where you’re going with all this. Which is okay, as long as YOU know where you’re going. Seems like it would be easier to programmatically mimic the way it’s done in real life, though.

Deal two cards to the player,
see if they’re the same,
decide whether to split,
move one card to a second hand,
deal another card to first hand,
see if they’re the same, and on like that.

Just an idea.
 

sagefr0g

Well-Known Member
#8
Canceler said:
I just decided to put your scenarios into the form of a table, so I could visualize it better. Did all the possible combinations I could think of, and then matched them up with your scenario numbers. So the first column of information, where hands 1 thru 4 each get split 1 time, matches up with your scenario 13, for example.

I have to say I’m not sure where you’re going with all this. Which is okay, as long as YOU know where you’re going. Seems like it would be easier to programmatically mimic the way it’s done in real life, though.

Deal two cards to the player,
see if they’re the same,
decide whether to split,
move one card to a second hand,
deal another card to first hand,
see if they’re the same, and on like that.

Just an idea.
ok, right, i was sort of seeing you might have done it that way.

lol, abashedly i got to admit i'm not sure where i'm going with this stuff.
thing is my program as it is, in a sense i've painted myself into a corner, lmao.
that's not to say i couldn't take a different approach as you suggest (well actually i'm pretty much doing what you suggest), just i think it's a matter of how i've got things set up so far and if i get the right number of possible things with respect to splits that could happen then i'm thinking i can force my stuff within those limits.
what ever, i'm pretty sure the problem i have is my program doesn't use variables per se, more so it relies on logic and kind of pseudo variables, lol, so i'm ending up going to all kinds of lengths to get anything to happen, trickery and tom foolery, instead of using and knowing programing language.:joker::whip: basically how i've been doing is try to get the program to do something, of course it doesn't do it right, so then i try and fix it and hope i didn't break something else with the fix, lol.
what ever i know i'm getting close to exceeding that compiling limit or what ever it's called (ie. to many lines of code), thing is i think i can just bust it up into another module, sorta thing.
i appreciate your thoughts and interest.
 

ExhibitCAA

Well-Known Member
#9
FYI, the standard casino rule is RS4, meaning that three splits are allowed to create a TOTAL of FOUR hands. A stronger restriction usually applies to Aces, so the most common combination of rules is denoted as RS4 RSA2.

I have also seen RS3, RS2, and RS128. I have never seen RS5, as you are trying to replicate in your program.
 

sagefr0g

Well-Known Member
#10
ExhibitCAA said:
FYI, the standard casino rule is RS4, meaning that three splits are allowed to create a TOTAL of FOUR hands. A stronger restriction usually applies to Aces, so the most common combination of rules is denoted as RS4 RSA2.

I have also seen RS3, RS2, and RS128. I have never seen RS5, as you are trying to replicate in your program.
right on ExhibitCAA, Kasi just informed me of that as well in a PM.
thank you.
lol, i've been playing four years those sort of games and just now have become aware of the real meaning of that rule, believe it or not.:eek:
live and learn, sigh, thank you again.:)
 

bjsim

Active Member
#11
Blackjack Simulation

Hi,
I developed http://www.bjsim.com in ASP.NET .

Splitting is very complex. Let me give you a tip how I dealt with it.
Assume that their is 4 player. I set up array of Orig player * 10. In this case 40 players.
Player 1 data kept in Index 10
Player 2 data kept in index 20

If player 1 Split, His data kept in indexed 11, 12
If he Split again than it is 13.

At the End I evaluate all 40 indexes, Knowing that Players 10-19 belongs to Player 1

In ASP.NET the code will look as follow

j = PlayerIdx Mod 10
If j = 0 Then
savePlayerIdx = PlayerIdx
End If


If J > 0 than it is the Splitted hand of savePlayerIdx .

This approach was developed by me and is working fine.
 

sagefr0g

Well-Known Member
#12
max number of cards used for a round

what would be the max number of cards used for a single round where the player is playing one on one with the dealer for a 6ds17das game where three splits are allowed except aces are only allowed to be split once and only one card is allowed to be drawn on split aces?

edit: would it be forty cards? like below?
 

Attachments

sagefr0g

Well-Known Member
#13
try this again, lol, :) any one know the answer?:confused::rolleyes::cry:
what would be the max number of cards used for a single round where the player is playing one on one with the dealer for a 6ds17das game where three splits are allowed except aces are only allowed to be split once and only one card is allowed to be drawn on split aces?

would it be forty cards? like in the image of this link:
http://www.blackjackinfo.com/bb/attachment.php?attachmentid=3941&stc=1&d=1254898428
 

Attachments

miplet

Active Member
#14
Do they have to play basic strategy?
I get 48 ifathey do. 1 = Ace
Code:
2 1 1 1 1 6 1 1 1 1 5 = 21 11
2 1 1 1 1 6 1 1 1 1 5 = 21 11
2 1 1 1 1 6 1 1 1 1 5 = 21 11
2 2 2 2 2 2 2 2 5     = 21  9
7 2 2 2 2 2           = 17  6
 

sagefr0g

Well-Known Member
#15
miplet said:
Do they have to play basic strategy?
I get 48 ifathey do. 1 = Ace
Code:
2 1 1 1 1 6 1 1 1 1 5 = 21 11
2 1 1 1 1 6 1 1 1 1 5 = 21 11
2 1 1 1 1 6 1 1 1 1 5 = 21 11
2 2 2 2 2 2 2 2 5     = 21  9
7 2 2 2 2 2           = 17  6
ahh, i should have stipulated that, yes the player does have to play basic strategy.

thank you much! :)

just curious how did you figure that out?
 

sagefr0g

Well-Known Member
#17
miplet said:
Paper and pen (ok I typed t out in notepad). I noticed you used hardly any aces.
ok yeah, i did try and use aces but the ways i tried using them didn't use up as many cards as how i did it with the twos, threes, a seven and some aces.
i guess it was key how you used the sixs and fives with the aces then the twos and aces and that seven in the dealers hand, sort of thing.
thank you again.

hmm, looking at your example again i think i see a way to squeeze one more card out, hmm i wonder if even more could be squeezed out, lol......??

2 1 1 1 1 6 1 1 1 1 5 = 21 ,11
2 1 1 1 1 6 1 1 1 1 5 = 21 ,,,,,,,,,,,,,11
2 1 1 1 1 6 1 1 1 1 5 = 21 ,,,,,,,,,,,,,11
2 2 2 2 2 2 2 2 5 = 21 ,,,,,,,,,,,,,,9
3 4 2 2 2 2 2 = 17 ,,,,,,,,,,,,,,7
for forty nine cards
edit ok this is wrong, just wanted to point it out in this post for anyone reading it as pointed out by Canceler in this post http://www.blackjackinfo.com/bb/showpost.php?p=154544&postcount=18
who says splits are complicated, lmao.:)
 

Canceler

Well-Known Member
#18
sagefr0g said:
hmm, looking at your example again i think i see a way to squeeze one more card out, hmm i wonder if even more could be squeezed out, lol......??
I thought about something like that too, but...

Keep in mind that if the dealer upcard is 2 thru 6 the player will quit hitting earlier (at 12 or 13), thereby using fewer cards. ;)
 

sagefr0g

Well-Known Member
#19
Canceler said:
I thought about something like that too, but...

Keep in mind that if the dealer upcard is 2 thru 6 the player will quit hitting earlier (at 12 or 13), thereby using fewer cards. ;)
ahh, yup your right, lmao, i caught that earlier on when thinking about the problem then promptly forgot it while looking over miplet's example. :eek::whip:

so i guess forty eight cards is it. :rolleyes::confused::rolleyes:
 

Canceler

Well-Known Member
#20
Illegal, but still a confirmation...

sagefr0g said:
so i guess forty eight cards is it. :rolleyes::confused::rolleyes:
It's starting to look that way.

If you happen to forget that aces can't be resplit, and only get one card when they are split :)o:laugh:), you still get 48.
 

Attachments

Top