| Tim Robinson | Those who would give up essential |
| timt...@ionet.net | liberty to purchase a little |
| Excalibur BBS: 918-445-3091 | temporary safety, deserve neither |
| http://www.ionet.net/~timtroyr | liberty nor safety. Ben Franklin |
Simulate it! Quickest answer, as accurate as desired with additional
run time, and immune to analytical errors.
I'll be interested in your results.
Andy Shull
--
============================================================================
My views are mine alone, and sometimes I change my mind.
============================================================================
Actually, that was my original intention. Just wondered if anyone had any
analytical ideas.
My memory of gin rules is rusty. Is it the probability of getting
dealt a hand which you can immediately put down that we're trying to
compute? I also can't remember exactly what entails a playable hand.
From what I recall it's a hand having sets of cards, 3 or more in size,
which are either the same number, or runs of the same suit. Could
somebody fill me in if I'm wrong, or I've missed something.
Thanks, Ken.
Ken Kwasnicki
kw...@unixg.ubc.ca
> Actually, that was my original intention. Just wondered if anyone had any
> analytical ideas.
Well if you insist, here's how to do it the hard way:
The VAST majority of possible gin hands follow a 4-3-3 pattern of groups
and/or sequences (sequences of 6 or 7 count as two sequences for this
purpose). You need to calculate the number of possible hands like this.
I would suggest counting group-only hands, 1-, 2-, and 3-sequence hands
in separate subgroups. It may be worthwhile to further subdivide into
hands with sequences of 4, 3, 4&3, etc. This is a tricky task
because some gin hands have overlapping cards that could go with either
a group or sequence--be sure not to count these twice.
Once these are counted up, you need to add in the small number of possible
gin hands of the 5-5 pattern (sequences only). I'm pretty sure these two
patterns cover all gin hands.
Once you have this total, divide the result by the number of possible 10-
card combinations, which is
52!
------
42!10!
I've assumed you're not playing by the rule where the non-dealer starts
with 11 cards (which I personally dislike, BTW). Then you'd be talking
about the number of 11-card combos which include a gin hand, an even
more complex task.
Andy
> In article <46h0uq$d...@vixen.cso.uiuc.edu>,
> shu...@cat.com (Andrew G. Shull) wrote:
> >> Gee... we had so much fun figuring the odds of a perfect 29 hand for
> Cribbage,
> >> anybody want to make any suggestions on how to calculate the odds of being
> >> dealt a perfect Gin hand?
> >
> >Simulate it! Quickest answer, as accurate as desired with additional
> >run time, and immune to analytical errors.
> >
> >I'll be interested in your results.
>
> Actually, that was my original intention. Just wondered if anyone had any
> analytical ideas.
Well, you could have the computer go thru all 1.6*10^10 combinations.
J. Andrew Lipscomb <ew...@chattanooga.net, them...@delphi.com>
PGP keys by request
Don't blame me, I voted Libertarian.
The brute-force approach, oddly enough, probably wouldn't do that. You have
it cycle through all possible 10-card hands and validate that it is a gin
hand. If you successfully detect a gin hand, you have no need to explore
further in that same hand.
>> Once these are counted up, you need to add in the small number of possible
>> gin hands of the 5-5 pattern (sequences only). I'm pretty sure these two
>> patterns cover all gin hands.
>One thing I forgot--gin hands that are all one sequence of 10 cards in the
>same suit could be classified as either 4-3-3 or 5-5. These hands could
>also be counted twice if one isn't careful.
And the 5-5 hand patterns are relatively rare. The probability is approx-
mately 53*90*90/(52C10) = 1/30000
William Watson
>Andy Shull
>shu...@cat.com (Andrew G. Shull) writes:
>>> Once these are counted up, you need to add in the small number of possible
>>> gin hands of the 5-5 pattern (sequences only). I'm pretty sure these two
>>> patterns cover all gin hands.
>>One thing I forgot--gin hands that are all one sequence of 10 cards in the
>>same suit could be classified as either 4-3-3 or 5-5. These hands could
>>also be counted twice if one isn't careful.
>And the 5-5 hand patterns are relatively rare. The probability is approx-
>mately 53*90*90/(52C10) = 1/30000
An anecdote about this topic:
Back in my first year of grad school, I took an Artificial
Intelligence class. The students were divided into pairs
to do term projects. My partner and I decided to do a
gin rummy program. We divided the work unfairly as it
turned out; I was to program the rules and do a nice graphical
interface, and she was to program the player to play well.
Her "half" turned out to be much harder than we thought
and mine easier. When we were "done," or rather when the
time ran out, we had a very attractive program that was
fun to play with, but couldn't play a whit. Since we enjoyed
using the program, to make it fair, we required the human
player to have two runs of five in order to win. The human
won most games, anyway.
--Jeff
--
His tale is told and done. Jerry Garcia