 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I was playing the solitaire game Klondike the other day - my excuse is I
was bored and waiting for a phone call. Having won a game, I glanced
idly at the number of moves I had made; to my surprise it was 150. I
suspect that that was a less than optimal number but it also made me
think about the greatest number of moves a solvable game would need.
The minimum number of moves is trivial to calculate - it's 60; but how
the hell do I calculate the maximum number necessary? Remember, it's
the maximum number necessary; if a game can be solved in several ways,
the lowest number is the one to be used.
John
--
Protect the Earth
It was not given to you by your parents
You hold it in trust for your children
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> I was playing the solitaire game Klondike the other day - my excuse is I
> was bored and waiting for a phone call. Having won a game, I glanced
> idly at the number of moves I had made; to my surprise it was 150. I
> suspect that that was a less than optimal number but it also made me
> think about the greatest number of moves a solvable game would need.
>
> The minimum number of moves is trivial to calculate - it's 60;
Aren't there a few different rules on how to play Klondike? How do you
get the 60 number, I haven't played it for ages (not since Win95).
> but how
> the hell do I calculate the maximum number necessary? Remember, it's
> the maximum number necessary; if a game can be solved in several ways,
> the lowest number is the one to be used.
According to wikipedia there are 7000 trillion possible start
configurations, and about 80% of them are theoretically winnable (if you
don't make any wrong moves). I suspect it would be quite complex (or
perhaps impossible without brute force) to find the maximum of the
minimum numbers of moves needed to win from each start configuration.
Just a guess, but that 7000 trillion number is going to rule out any
brute force algorithms.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 15/12/14 13:12, scott wrote:
>> The minimum number of moves is trivial to calculate - it's 60;
>
> Aren't there a few different rules on how to play Klondike? How do you
> get the 60 number, I haven't played it for ages (not since Win95).
>
Assuming you're using the 'draw three' rules:
1. Moving the cards from the playing piles to the foundation: 28 moves
2. Since there are 24 cards in the talon, to expose them all: 8 moves
3. Move these cards from the waste pile to the foundation: 24 moves
28+8+24=60 Simples!
Note: if you're using 'draw one' rules, you need a total of 76 moves
28+24+24
> According to wikipedia there are 7000 trillion possible start
> configurations, and about 80% of them are theoretically winnable (if you
> don't make any wrong moves). I suspect it would be quite complex (or
> perhaps impossible without brute force) to find the maximum of the
> minimum numbers of moves needed to win from each start configuration.
> Just a guess, but that 7000 trillion number is going to rule out any
> brute force algorithms.
>
I suspected as much, but I live in hope of finding an elegant way of
calculating the answer - otherwise, I'll have wait for an affordable
quantum computer :-)
BTW Your prediction about The Saints performance seems to be coming
true. How about predicting that they'll return to form for the Everton game.
John
--
Protect the Earth
It was not given to you by your parents
You hold it in trust for your children
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 15/12/2014 03:49 PM, Doctor John wrote:
> I suspected as much, but I live in hope of finding an elegant way of
> calculating the answer - otherwise, I'll have wait for an affordable
> quantum computer :-)
We already have those; it's called THE REAL WORLD. ;-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 15/12/14 17:52, Orchid Win7 v1 wrote:
> On 15/12/2014 03:49 PM, Doctor John wrote:
>> I suspected as much, but I live in hope of finding an elegant way of
>> calculating the answer - otherwise, I'll have wait for an affordable
>> quantum computer :-)
>
> We already have those; it's called THE REAL WORLD. ;-)
Unfortunately, I don't seem to be able to master its programming
language :-(
John
--
Protect the Earth
It was not given to you by your parents
You hold it in trust for your children
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 15/12/2014 18:30, Doctor John wrote:
> Unfortunately, I don't seem to be able to master its programming
> language:-(
Well, you've had enough time to try. :-P
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 15/12/14 20:14, Stephen wrote:
> On 15/12/2014 18:30, Doctor John wrote:
>> Unfortunately, I don't seem to be able to master its programming
>> language:-(
>
> Well, you've had enough time to try. :-P
>
... and that from a man who still confuses SDL with LSD :-D
John (wanders off singing Lucy In The Sky With Diamonds)
PS I've just noticed that my spell-checker flags SDL but not LSD.
--
Protect the Earth
It was not given to you by your parents
You hold it in trust for your children
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 16/12/2014 03:44, Doctor John wrote:
> On 15/12/14 20:14, Stephen wrote:
>> On 15/12/2014 18:30, Doctor John wrote:
>>> Unfortunately, I don't seem to be able to master its programming
>>> language:-(
>>
>> Well, you've had enough time to try. :-P
>>
>
> .... and that from a man who still confuses SDL with LSD :-D
>
No, you are confusing me with someone who gives a damn. ;-)
> John (wanders off singing Lucy In The Sky With Diamonds)
>
>
Ah! Those were the days (my friend). :-D
> PS I've just noticed that my spell-checker flags SDL but not LSD.
>
Libra Solidus Denarius?
Windoze spell checker could not spell its way out of a wet paper bag.
Google is much better.
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Assuming you're using the 'draw three' rules:
> 1. Moving the cards from the playing piles to the foundation: 28 moves
> 2. Since there are 24 cards in the talon, to expose them all: 8 moves
> 3. Move these cards from the waste pile to the foundation: 24 moves
>
> 28+8+24=60 Simples!
OK it's clear I've either forgotten the rules or was always doing it
wrong! I would have said 52 moves...
> BTW Your prediction about The Saints performance seems to be coming
> true. How about predicting that they'll return to form for the Everton game.
After the loss with Burnley then I don't know what to expect next!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
This reminded me of a question I asked in another forum:
There's a video out there of a Texas Hold'em showdown between
two players where one of the players has four aces and the other
has a royal flush. What is the probability of this happening?
(Express the answer in the form "1 in x".)
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 17/12/2014 15:47, Warp a écrit :
> This reminded me of a question I asked in another forum:
>
> There's a video out there of a Texas Hold'em showdown between
> two players where one of the players has four aces and the other
> has a royal flush. What is the probability of this happening?
> (Express the answer in the form "1 in x".)
>
Mu. "0 in infinity" (not 1, it's 0). Unless you play with more than 52
cards (that's call cheating in the rural country-part, but may be it is
the rule in the self-called civilised area such as Wall street ?)
A royal flush has an ace (and king, queen...) , so that would make 5
aces in the deck. Heart, spade, diamond, club, and... what your name for
the fifth ?
--
Just because nobody complains does not mean all parachutes are perfect.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> There's a video out there of a Texas Hold'em showdown between
>> two players where one of the players has four aces and the other
>> has a royal flush. What is the probability of this happening?
>> (Express the answer in the form "1 in x".)
>>
>
> Mu. "0 in infinity" (not 1, it's 0). Unless you play with more than 52
> cards (that's call cheating in the rural country-part, but may be it is
> the rule in the self-called civilised area such as Wall street ?)
>
> A royal flush has an ace (and king, queen...) , so that would make 5
> aces in the deck. Heart, spade, diamond, club, and... what your name for
> the fifth ?
In Texas Hold'em each player only has 2 cards, and must choose 3 from
the 5 shared face-up cards on the table to make their hand. So it's
possible by a few combinations. Off the top of my head there are only
three "types" of possible hands that will work:
P1 P2 Shared cards
A A Q K A A 10 J x
A A x K A A 10 J Q
A x Q K A A A 10 J
Obviously the suit of P2's cards must match the relevant ones on the
table, and P2 could have any combination on 10,J,Q,K so long as the
others are on the table to make the royal flush. And the order of cards
doesn't matter. That should be enough information to figure out the
probability. If I get time later I'll give it a shot.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 18/12/2014 09:07, scott a écrit :
>>> There's a video out there of a Texas Hold'em showdown between
>>> two players where one of the players has four aces and the other
>>> has a royal flush. What is the probability of this happening?
>>> (Express the answer in the form "1 in x".)
>>>
>>
>> Mu. "0 in infinity" (not 1, it's 0). Unless you play with more than 52
>> cards (that's call cheating in the rural country-part, but may be it is
>> the rule in the self-called civilised area such as Wall street ?)
>>
>> A royal flush has an ace (and king, queen...) , so that would make 5
>> aces in the deck. Heart, spade, diamond, club, and... what your name for
>> the fifth ?
>
> In Texas Hold'em each player only has 2 cards, and must choose 3 from
> the 5 shared face-up cards on the table to make their hand. So it's
> possible by a few combinations.
Oups, yes, I forgot that shitty version of sharing cards from the table.
> Off the top of my head there are only
> three "types" of possible hands that will work:
>
> P1 P2 Shared cards
> A A Q K A A 10 J x
> A A x K A A 10 J Q
> A x Q K A A A 10 J
>
> Obviously the suit of P2's cards must match the relevant ones on the
> table, and P2 could have any combination on 10,J,Q,K so long as the
> others are on the table to make the royal flush. And the order of cards
> doesn't matter. That should be enough information to figure out the
> probability. If I get time later I'll give it a shot.
>
And this assumes of course that the shared card are neither four aces or
the royal flush.
From wikipedia, in texas hold'em, there is 4,324 royal flush (from the
133,784,560 combinations of one hand in a seven-cards poker).
Not all of them would allow a four-aces hand for another player: you
need 2 or more aces in the shared cards, and none in the royal-flush's
player's hand.
Interestingly, the 3 shared aces would allow 2 players to go 4-aces and
a third with a royal flush.
--
Just because nobody complains does not mean all parachutes are perfect.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Oups, yes, I forgot that shitty version of sharing cards from the table.
It's the shitty version that made me a few hundred £££ though - although
the £/hour was way below the minimum wage...
> Interestingly, the 3 shared aces would allow 2 players to go 4-aces and
> a third with a royal flush.
Are you sure about that?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le_Forgeron <lef### [at] free fr> wrote:
> > In Texas Hold'em each player only has 2 cards, and must choose 3 from
> > the 5 shared face-up cards on the table to make their hand. So it's
> > possible by a few combinations.
> Oups, yes, I forgot that shitty version of sharing cards from the table.
A shitty version that's arguably the most popular poker format in the
world by a wide margin.
> Interestingly, the 3 shared aces would allow 2 players to go 4-aces and
> a third with a royal flush.
Not with a legal deck. Since a deck has 4 aces, only one player can
have 4 aces.
Anyway, my original problem is still unanswered.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 18/12/2014 11:59, scott a écrit :
>> Oups, yes, I forgot that shitty version of sharing cards from the table.
>
> It's the shitty version that made me a few hundred £££ though - although
> the £/hour was way below the minimum wage...
>
>> Interestingly, the 3 shared aces would allow 2 players to go 4-aces and
>> a third with a royal flush.
>
> Are you sure about that?
>
No, that's why I cancelled the post.
--
Just because nobody complains does not mean all parachutes are perfect.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le 18/12/2014 21:16, Warp a écrit :
> Le_Forgeron <lef### [at] free fr> wrote:
>>> In Texas Hold'em each player only has 2 cards, and must choose 3 from
>>> the 5 shared face-up cards on the table to make their hand. So it's
>>> possible by a few combinations.
>
>> Oups, yes, I forgot that shitty version of sharing cards from the table.
>
> A shitty version that's arguably the most popular poker format in the
> world by a wide margin.
Only because it allows to have more players around the table: more
players, more money and more probability of entertainment.
With a 5 cards per player, and allowing each player to replace its hand
once, a 52 deck would limit the number of players to 5.
In theory, Texas can have up to 22 players. (44 players' cards, 3 burn,
5 community). Casino have max table at 13, but that's for reachability
from the deck's dealer.
>
> Anyway, my original problem is still unanswered.
>
There is only 133,784,560 hands on a seven-cards poker...
--
Just because nobody complains does not mean all parachutes are perfect.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Le_Forgeron <lef### [at] free fr> wrote:
> > Anyway, my original problem is still unanswered.
> There is only 133,784,560 hands on a seven-cards poker...
That doesn't answer my question.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> No, that's why I cancelled the post.
I guess cancelled posts don't work in Thunderbird, it doesn't even give
any hint that it might have been cancelled (like outlook does by putting
a score through the header).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 22/12/2014 13:07, scott wrote:
>> No, that's why I cancelled the post.
>
> I guess cancelled posts don't work in Thunderbird, it doesn't even give
> any hint that it might have been cancelled (like outlook does by putting
> a score through the header).
>
Isn't that the idea behind cancelling posts?
But from my experience with Thunderbird. It will show the post as
cancelled if it gets the header before it is cancelled. If it is
cancelled before Thunderbird checks for new mail. It will not show it.
--
Regards
Stephen
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |