The most common involve hand eye co-ordination - stacking wooden blocks,
hammering in nails with icepicks.
At least two are clearly mathematical. One is the classic connect four game,
which has been extensively modeled mathematically and is quite a deep game.
The other game is a solitaire. It has a ridiculously easy strategy. Its
called "Jackpot". There is a board with 9 wooden pegs, numbered 1..9. You
throw two dice. You can turnover a single peg which matches either one of
the dice or the sum of the two dice. Eg throwing 1,2 will let you turn over
1,2 or 3, but throwing 5,6 will only let you turn over 5 or 6 as there is no
11th peg. If you cannot turn over a peg you lose, if you turn over all 9 you
win.
I was able to guess the best strategy and verify it on the back of the bill
for my beer before playing it myself. That was itself sufficiently boring
that I went back you my hotel room, fired up my laptop and wrote a program
to play it a million times to see what percentage of games are won using the
optimum strategy. Which was probably a healthier thing to be doing in my
hotel room than the bargirl who showed me the game intended.
OK, what's the best strategy?
How often do you win when employing that strategy?
You're playing bar games in a town called "Phuket"?
Sounds like you're missing the point of something
or other.
> Having just returned from Phuket in Thailand, I can report the
> bargirls there play various games with customers to keep them
> drinking.
>
> At least two are clearly mathematical. One is the classic connect four
> game, which has been extensively modeled mathematically and is quite a
> deep game.
Elsewhere I wrote:
> ... Finally, I should thank the anonymous bartender in Banglamung who
> used Diagram 1 twenty-five years ago to make me aware that Connect
> Four is not an easy game.
Peter wrote:
> The other game is a solitaire. It has a ridiculously easy strategy.
> Its called "Jackpot". There is a board with 9 wooden pegs, numbered
> 1..9. You throw two dice. You can turnover a single peg which matches
> either one of the dice or the sum of the two dice. Eg throwing 1,2
> will let you turn over 1,2 or 3, but throwing 5,6 will only let you
> turn over 5 or 6 as there is no 11th peg. If you cannot turn over a
> peg you lose, if you turn over all 9 you win.
>
> OK, what's the best strategy?
I've also solved this game! (I don't know whether it would be faster
for me to hunt through directories or redo from scratch.)
You imply the optimal strategy is trivial. I suspect I know what
you intend; however IIRC there are situations where the trivial
strategy is slightly sub-optimal.
(BTW, although *I* would never take advantage of a bargirl, it's
quite easy to win this game. Just turn over the 9 on your second
roll regardless of dice, then 8, etc. She's paying no attention.)
James Dow Allen
For each position, starting from single pegs
and recursing back to all nine pegs, we can
compute the probability of success (clearing
all pegs) assuming that with each throw the
choice of action is dictated by maximizing
the resulting probability of success.
Pr(winning|pegs={1}) = 11/36
Pr(winning|pegs={2}) = 1/3
Pr(winning|pegs={3}) = 13/36
Pr(winning|pegs={4}) = 7/18
Pr(winning|pegs={5}) = 5/12
Pr(winning|pegs={6}) = 4/9
Pr(winning|pegs={7}) = 1/6
Pr(winning|pegs={8}) = 5/36
Pr(winning|pegs={9}) = 1/9
regards, chip
Well, yes. The idea is to get one's lazy self off the
bar stool and actually do it. I recoded from scratch just
now and posted the C code at
http://james.fabpedigree.com/phukdice.c
Obpuzzle: *Without* running the posted program, what is the
position where the almost-optimal trivial strategy loses the
most compared with the optimal strategy?
James Dow Allen
James Dow Allen
____________________________________
The almost-optimal trivial strategy is to take the "least likely" option. As
the probabilities in increasing order are 9,8,7,1,2,3,4,5,6 the summary
strategy is:
1. If sum>6 and not taken then take the sum.
2. Otherwise take the lowest not taken of throw1, throw2 and sum.
(Really just a greedy strategy).
My Monte-Carlo of this gives the chances of winning as somewhere between
0.079 and 0.081. As I can't compile your C program, do you get much the same
answer?
I couldn't extract from your C program exactly what your better strategy is.
Could you explain it, and provide the counter-example you alluded to?
PS I called my C# program "Jackpot". I prefer your name of "phuket.c", seems
to capture the essence of the game environment better ....!
Hi, Peter. The attribution prefixes (">") got omitted when you
replied
to my post. In other words, the "Well, yes ...." here looks like it
was
written by Peter, but was actually wrtiten by me.
> "James Dow Allen" <jdallen2...@yahoo.com> wrote in messagenews:
> 3d55be18-a86a-4b03...@m7g2000prd.googlegroups.com...
> Well, yes. The idea is to get one's lazy self off the
> bar stool and actually do it. I recoded from scratch just
> now and posted the C code at
> http://james.fabpedigree.com/phukdice.c
>
> Obpuzzle: *Without* running the posted program, what is the
> position where the almost-optimal trivial strategy loses the
> most compared with the optimal strategy?
SPOILER Warning. I give the answer to this "Obpuuzle" below.
>
> James Dow Allen
Back to Peter:
> The almost-optimal trivial strategy is to take the "least likely" option. As
> the probabilities in increasing order are 9,8,7,1,2,3,4,5,6 ...
>
> My Monte-Carlo of this gives the chances of winning as somewhere between
> 0.079 and 0.081. As I can't compile your C program, do you get much the same
> answer?
You speak of a C# program, below. May I ask *why* you can't compile
my C program?
> I couldn't extract from your C program exactly what your better strategy is.
> Could you explain it, and provide the counter-example you alluded to?
If you *run* the program, it will display *all* the exceptions to the
almost-optimal strategy, and, as its final line, give the net
probability
of success from the starting position. Changing a "0" to "1" near
very
beginning of program and recompiling will give you the probability
with the
almost-optimal strategy. Test your compilation environment by
confirming
you get the same answers as I get:
Win with optimal strategy = 0.079987
Win with almost-opt strategy = 0.079855
As seen, you're not giving up much to the bargirls by going with
only the "almost optimal" strategy! ... And it may seem like
perfectionistic nitpicking to complain that your strategy is
suboptimal. Don't know what the stakes you were playing for were;
IIRC from my misspent youth the main topic of negotiation would
be "Who brings the party hats?"
> PS I called my C# program "Jackpot". I prefer your name of "phuket.c", seems
> to capture the essence of the game environment better ....!
> ...
> Could you explain it, and provide the counter-example you alluded to?
The list of exceptions printed by phukdice.c include cases where you
prefer
any of 2, 3, 4, 5, or 6 to a smaller number.
The exception where you lose the most by playing "almost-optimal" is
in this problem:
> How do you play with a board of
> 2 4 5 6 8
> when rolling (1,4) or (4,5) ?
>
> The wrong play yields 10.88% win rate instead of 11.56%.
> Demonstration: If the *next* shake is 1-3 or 3-4, you'll
> be happy if you kept 4. (If 5-5 you'll be happy to keep
> 5. Any other shake is, I think, almost a toss-up.)
James Dow Allen
OK, I get it. On 24568 with a throw of 1,4 my algorithm takes the 5. I
calculate the chances of winning with 2468 being 3.8% but with 2568 I get a
win rate of 4.0%.
I can also see why; the assumption was that the individual pegs were
independent, but they are not; having for example only 235 left double
counts throwing a 2,3 (amongst others).
What I don't get is how you know the exact exceptions, or even how you
worked out they existed. Was this by exhaustive Monte-Carlo searching, or
did you use a counting argument ...
I think you meant "takes the 4".
> What I don't get is how you know the exact exceptions,...
Chip Eastham already outlined the solution method up-thread.
The software automatically finds all best strategies by brute
force. And, instead of "simulating a million games" we need
only consider 512*21*3 situations where 512 is the number of
board settings, 21 the number of dice rolls, 3 the maximum
number of legal plays at any turn.
My phukdice.c isn't well commented but *does* do the work.
Why couldn't you compile it?
James
I think you meant "takes the 4".
> What I don't get is how you know the exact exceptions,...
Chip Eastham already outlined the solution method up-thread.
____________________________
Yeah, sorry, I missed his explanation, worked it out for myself overnight
(or rather just woke up this morning knowing the algorithm, strange how that
happens).
I might have a little play with generalising this. Increasing the number of
pegs won't much change the game much, but increasing the number of dice may
make these exceptions to the simple strategy more significant and add to the
gameplay.
Then of course I will have to buy another ticket to Phuket to do some field
testing.
Thanks all for the insights ...
> The other game is a solitaire. It has a ridiculously easy strategy. Its
> called "Jackpot". There is a board with 9 wooden pegs, numbered 1..9. You
> throw two dice. You can turnover a single peg which matches either one of
> the dice or the sum of the two dice. Eg throwing 1,2 will let you turn
> over 1,2 or 3, but throwing 5,6 will only let you turn over 5 or 6 as
> there is no 11th peg. If you cannot turn over a peg you lose, if you turn
> over all 9 you win.
I know that one as "close the box" but in the version I know, you are not
restricted to the numbers on the individual dice e.g. if you throw 5+6 then
you can turn over *any* combination of digits that totals 11 e.g. 1,2,3,5.
My strategy is:
(a) Keep 2 up as long as possible, against the inevitable double-1.
(b) Subject to (a), take the largest possible number plus any smaller
digits.
(c) Split even numbers between even digits, e.g. for 10, take 6+4 rather
than 7+3. (Rationale: odd digits can make both odd and even sums, even
digits can only make even sums so are less useful.)
--
ξ:) Proud to be curly
Interchange the alphabetic letter groups to reply
How does the game end? If you're left with just the 6,
do you then need to roll exactly 6 (3,3 or 2,4 or 1,5) to win?
> My strategy is:
> (a) Keep 2 up as long as possible, against the inevitable double-1.
> (b) Subject to (a), take the largest possible number plus any smaller
> digits.
> (c) Split even numbers between even digits, e.g. for 10, take 6+4 rather
> than 7+3. (Rationale: odd digits can make both odd and even sums, even
> digits can only make even sums so are less useful.)
It might be better to consider what you're left with, rather than what
you take. But as you imply, it's bad to be left with just even
numbers.
Another game where the fact that even numbers never sum to an odd
plays a role is in backgammon bearing off. Avoid ending up with
all your men on the 5-, 3- and 1-points as even numbers will then have
little value.
> ξ:) Proud to be curly
What is that curli-cue and how did you enter it? Is it an ISO-xxx
code?
I see it now, with IE-G.Groups, but which "Encoding: works generally?
James
> On Dec 7, 1:56 am, Prai Jei <pvstownsend.zyx....@ntlworld.com> wrote:
>> I know that one as "close the box" but in the version I know, you are not
>> restricted to the numbers on the individual dice e.g. if you throw 5+6
>> then you can turn over *any* combination of digits that totals 11 e.g.
>> 1,2,3,5.
>
> How does the game end? If you're left with just the 6,
> do you then need to roll exactly 6 (3,3 or 2,4 or 1,5) to win?
Certainly the exact throw is needed to clear all the digits. Throwing excess
(e.g. 8 when you have just 3 and 4 left) is no good and does not count as a
win.
When the total of the remaining digits is 6 or less you only throw one die.
If you have just the 6 left and you throw anything but 6 you're f'd. If
you've got 1,2,3 left then you can't go bust on this throw.
In some versions of the rules, your penalty score if you fail to complete
all the digits, is to run the remaining digits together as a huge number so
you might have a penalty scores of 356,
That is why leaving the 2 up is so critical. If you begin with double-1 all
you can do is take the 2. If you then throw double-1 again you bomb out
with a penalty score of 13456789.
> Another game where the fact that even numbers never sum to an odd
> plays a role is in backgammon bearing off. Avoid ending up with
> all your men on the 5-, 3- and 1-points as even numbers will then have
> little value.
I'll bear that in mind.
>> ξ:) Proud to be curly
>
> What is that curli-cue and how did you enter it? Is it an ISO-xxx
> code?
It's a lower-case Greek letter xi. In KCharSelect you go to Table 3 and all
the Greek letters are there for the clipboarding. In Unicode its character
958 (hex 3BE).
> I see it now, with IE-G.Groups, but which "Encoding: works generally?
Probably Unicode. Mostly it comes out correct because the newsreader can
tell that that is the encoding.
--
ξ:) Proud to be curly
Interchange the alphabetic letter groups to reply
>> ξ:) Proud to be curly
>
> What is that curli-cue and how did you enter it? Is it an ISO-xxx
> code?
Just curious: are you curly too?
--
ξ:) Proud to be curly
Interchange the alphabetic letter groups to reply
I've got the software scaffold and can add additional rules
and scorings easily. First let's agree on the sets of
rules. Since S = 13456789 will dominate strategy if S
is in dollars, perhaps one should take log(S) as the dollar penalty.
> >> ξ:) Proud to be curly
I can cut-and-paste the xi ( ξ ) here in GGroups, or perhaps use
> ξ for html
but still don't know which keys to push in vi.
Prei Jei wrote:
> Just curious: are you curly too?
> ξ:) Proud to be curly
ξ ξ ξ ξ ξ ξ ξ ξ ξ ξ ξ ξ ξ ξ ξ ξ
I've oft-noted curly hair ....
Also, I am prideful ... among other deadly sins.
James