Main Page | Report this Page
 
   
Science Forum Index  »  Statistics - Math Forum  »  Maximize the stratey of winning
Page 1 of 1    
Author Message
jionglong
Posted: Thu Mar 08, 2007 5:38 am
Guest
Hi,

Someone asked me this question:

Each time you roll a fair-sided die. You can stop at any point and
your score is the last score you scored on your die. If you roll a 1
you have to stop and you score 1. If you roll a 2, 3, 4, 5 or 6 you
can choose to roll again How to devise a strategy to maximise your
chances of getting a better score than your opponent?

I am not sure what the optimal strategy should be. But the
Expectation is 3.5, so my guess is that if I get 2 or 3, I will roll
again. If I get 4,5 or 6 I will stop. But it is, on average, making
me score higher than 3.5 only.

Please advise.
Guest
Posted: Thu Mar 08, 2007 5:38 am
In article <1173346704.788683.224920@t69g2000cwt.googlegroups.com>,
"jionglong" <jionglong@gmail.com> writes:
Quote:
Hi,

Someone asked me this question:

Each time you roll a fair-sided die. You can stop at any point and
your score is the last score you scored on your die. If you roll a 1
you have to stop and you score 1. If you roll a 2, 3, 4, 5 or 6 you
can choose to roll again How to devise a strategy to maximise your
chances of getting a better score than your opponent?

I am not sure what the optimal strategy should be. But the
Expectation is 3.5, so my guess is that if I get 2 or 3, I will roll
again. If I get 4,5 or 6 I will stop. But it is, on average, making
me score higher than 3.5 only.

Please advise.


Rather than expectations, you should look at the probability of winning
(see "Game Theory"). Sensible strategies are:
(1) accept the first roll
[your score is then a discrete uniform on 1..6 Smile ]
(2) roll again while your score is 2
(3) roll again while your score is 2 or 3
(4) roll again while your score is 2, 3 or 4
(5) roll again while your score is 2, 3, 4 or 5.

You can draw up a table of the probability of winning, depending
on the strategy you & your opponent choose.

My quick calculation - which could be wrong - is that you might
as well accept your first roll (which at least saves effort),
while your opponent should roll while he has a 2, 3 or 4.
You then have a probability of 1/3 of getting a better score
than your opponent.

[NOTE: if you have a rematch when scores are equal, that is
of course a different game, & is left as an exercise...]

-- Ewart Shaw
--
J.E.H.Shaw [Ewart Shaw] strgh@uk.ac.warwick TEL: +44 2476 523069
Department of Statistics, University of Warwick, Coventry CV4 7AL, UK
http://www.warwick.ac.uk/statsdept http://www.ewartshaw.co.uk
3 ((4&({*.(=+/))++/=3Smile@([:,/0&,^Sadi.3)@|:"2^:2))&.>@]^Sadi.@[) <#:3 6 2
jionglong
Posted: Thu Mar 08, 2007 7:17 am
Guest
I find the strategies a bit confusing. For example, if I score a 2,
should I use strategy (2),(3),(4) or (5)?

thanks

Quote:
Rather than expectations, you should look at the probability of winning
(see "Game Theory"). Sensible strategies are:
(1) accept the first roll
[your score is then a discrete uniform on 1..6 Smile ]
(2) roll again while your score is 2
(3) roll again while your score is 2 or 3
(4) roll again while your score is 2, 3 or 4
(5) roll again while your score is 2, 3, 4 or 5.

You can draw up a table of the probability of winning, depending
on the strategy you & your opponent choose.

My quick calculation - which could be wrong - is that you might
as well accept your first roll (which at least saves effort),
while your opponent should roll while he has a 2, 3 or 4.
You then have a probability of 1/3 of getting a better score
than your opponent.
Nick
Posted: Thu Mar 08, 2007 7:20 am
Guest
<strgh@mimosa.csv.warwick.ac.uk> wrote in message
news:esoomk$i3s$1@wisteria.csv.warwick.ac.uk...
Quote:
In article <1173346704.788683.224920@t69g2000cwt.googlegroups.com>,
"jionglong" <jionglong@gmail.com> writes:
Hi,

Someone asked me this question:

Each time you roll a fair-sided die. You can stop at any point and
your score is the last score you scored on your die. If you roll a 1
you have to stop and you score 1. If you roll a 2, 3, 4, 5 or 6 you
can choose to roll again How to devise a strategy to maximise your
chances of getting a better score than your opponent?

I am not sure what the optimal strategy should be. But the
Expectation is 3.5, so my guess is that if I get 2 or 3, I will roll
again. If I get 4,5 or 6 I will stop. But it is, on average, making
me score higher than 3.5 only.

Please advise.


Rather than expectations, you should look at the probability of winning
(see "Game Theory"). Sensible strategies are:
(1) accept the first roll
[your score is then a discrete uniform on 1..6 Smile ]
(2) roll again while your score is 2
(3) roll again while your score is 2 or 3
(4) roll again while your score is 2, 3 or 4
(5) roll again while your score is 2, 3, 4 or 5.

You can draw up a table of the probability of winning, depending
on the strategy you & your opponent choose.

My quick calculation - which could be wrong - is that you might
as well accept your first roll (which at least saves effort),
while your opponent should roll while he has a 2, 3 or 4.
You then have a probability of 1/3 of getting a better score
than your opponent.

[NOTE: if you have a rematch when scores are equal, that is
of course a different game, & is left as an exercise...]

On the Countdown TV programme where the contestant chooses 9 letters from
separate pools of consonants and vowels, one at a time the contestants ask
for a consonant or a vowel - obviously based on what letters have already
come up.

It seems to me that they might just as well start off by choosing, say, 2
(or 3) vowels and 4 consonants.

The only time that I have seen this practice varied was when there was a
whizkid of 11 on the programme and he had clearly thought about the
strategy, and I think he asked for so many vowels and so many consonants -
in the same way that they do with the choice of numbers.

Having said that the one-by-one choice of letters probably makes for better
TV.

It probably makes most sense to choose initially 5 consonants, and then on
the basis of the possibilities with these to decide how many vowels to go
for.

Nick
RossClement@gmail.com
Posted: Thu Mar 08, 2007 10:38 am
Guest
On Mar 8, 9:38 am, "jionglong" <jiongl...@gmail.com> wrote:
Quote:
Hi,

Someone asked me this question:

Each time you roll a fair-sided die. You can stop at any point and
your score is the last score you scored on your die. If you roll a 1
you have to stop and you score 1. If you roll a 2, 3, 4, 5 or 6 you
can choose to roll again How to devise a strategy to maximise your
chances of getting a better score than your opponent?

I am not sure what the optimal strategy should be. But the
Expectation is 3.5, so my guess is that if I get 2 or 3, I will roll
again. If I get 4,5 or 6 I will stop. But it is, on average, making
me score higher than 3.5 only.

Please advise.

Disclaimer: I'm no expert statistician, but that doesn't always shut
me up.

I'm not quite sure that I completely understand your game. For
example, does your opponent know your score when they start playing?
(If so, that would make the opponent's strategy very simple).

What you can easily do is work out the expected utility of the two
decisions you have at each stage, stop, or roll the dice again.

For 1, you have no choice, the rules of the game say that you must
stop, and your result is 1.

For 6, it's a no brainer that you should stop immediately.

For other numbers, you have a choice.

If we look at 2, we know that if we stop now, our result is 2. And we
can calculate the expected gain of throwing the dice ONLY IN TERMS OF
WHERE WE END UP ON THE NEXT STEP. That's:

1/6 * -1 (throw a 1) + 1/6 * 0 (another 2) + 1/6 * 1 (throw a 3) + 1/6
* 2 + 1/6 * 3 + 1/6 * 4
= 1.

So we expect to gain if we throw again when we have a 2. For a 3,
it's:

1/6 * -2 + 1/6 + -1 + 1/6 * 0 + 1/6 * 1 + 1/6 * 2 + 1/6 * 3
=
RossClement@gmail.com
Posted: Thu Mar 08, 2007 10:56 am
Guest
Disclaimer: I'm no expert statistician, but that only sometimes shut
me up.

I'm not sure that I 100% understand your game. For example, does your
opponent know what number you throw? If so, that would make the
opponent's strategy quite simple.

You say that the expected value of throwing is 3.5, but that's
assuming that you stop on the next throw. This is calculating your
expected value as:

(1+2+3+4+5+6)/6 (since all are equiprobable).

But this is incorrect. Because if you threw a 2, you wouldn't stick
with it, but would throw again. Because you expect to gain by doing
so. So the expected long-term gain of throwing a 2 is more than 2. If
we recalculate the expected gain of throwing the dice using the
expected value of 3.5 as result of throwing a 2 (or a 3) next time, we
get an expected gain of:

(1+3.5+3.5+4+5+6)/6 = 3.8333'

But that makes the expected gain of throwing even higher.

Iterating this a few times gives us an expected value of throwing the
dice of 4.0. (Somebody more mathematically skilled than I would have
gone straight there, I did the iterations Smile ).

So the result would seem to be (*) that you should throw again with a
2 or a 3, should stick with a 5 or a 6, and it doesn't matter what you
do if you get a 4.

(*) Unless I've got this wrong, more likely than not :-)

Cheers,

Ross-c
Bob Dole
Posted: Thu Mar 08, 2007 12:16 pm
Guest
On Mar 8, 3:38 am, "jionglong" <jiongl...@gmail.com> wrote:
Quote:
Hi,

Someone asked me this question:

Each time you roll a fair-sided die. You can stop at any point and
your score is the last score you scored on your die. If you roll a 1
you have to stop and you score 1. If you roll a 2, 3, 4, 5 or 6 you
can choose to roll again How to devise a strategy to maximise your
chances of getting a better score than your opponent?

I am not sure what the optimal strategy should be. But the
Expectation is 3.5, so my guess is that if I get 2 or 3, I will roll
again. If I get 4,5 or 6 I will stop. But it is, on average, making
me score higher than 3.5 only.

Please advise.

Often a good place to start in figuring out the problem formulaicly is
to do some simulations.

There are 5 strategies:
stop at the first roll (if you get a 2 or higher),
stop if you get a 3 or higher (otherwise continue),
stop if you get a 4 or higher (otherwise continue),
stop if you get a 5 or higher (otherwise continue),
stop only if you get a 6 (otherwise continue).

If we simulate a random sequence of die rolls, we can determine for
each sequence whether it is uniquely better (W), is tied for the best
strategy (T), or is not the best strategy (L). The results for 2000
random sequences are shown below.


Stop at
stop at: 2 3 4 5 6
W 3.9% 1.4% 1.8% 4.3% 17.7%
T 49.6% 55.3% 58.0% 60.3% 48.8%
L 46.6% 43.4% 40.2% 35.5% 33.6%

Based on this, it would appear that it is better to keep rolling until
you get a 6.

However, if you have one opponent, the advantage of a "6" strategy is
less clear. Let's suppose we have one stopping at "6", the other at
"5". There's an advantage to the "6" strategy, but it's not huge.

Better head to head
6 17.7%
T 66.6%
5 15.8%

Furthermore, 6 versus 4 isn't much different:

Better head to head
6 26.6%
T 49.2%
4 24.3%

and these small differences are an artifact of these particular 2000
sequences.

Consider that a "stop only at 6" rule is really a "stop at 1 or 6,
whichever comes first", so half the time you end up with a 1, and half
the time with a 6.

A "stop if 5 or better" rule is a "stop at 1 or 5 or 6, whichever
comes first", so a third of the time you end up with a 1, a third of
the time a 5, and a third of the time a 6.

If we have two players playing against each other, one using a "stop
at 6" rule and the other "stop at 5", this means:

one third of the time both players will get a "1" score
one third of the time both players will get a "6" score
one third of the time one player will get a "5"
half of that (1/6) the other player will get a "1" and lose
half of that (1/6) the other player will get a "6" and win

So, half of the time each player will win.

I will leave consideration of other rule pairs to somebody who feels
like doing more typing!
jpshinny
Posted: Thu Mar 08, 2007 1:12 pm
Guest
On Mar 8, 4:38 am, "jionglong" <jiongl...@gmail.com> wrote:
Quote:
Hi,

Someone asked me this question:

Each time you roll a fair-sided die. You can stop at any point and
your score is the last score you scored on your die. If you roll a 1
you have to stop and you score 1. If you roll a 2, 3, 4, 5 or 6 you
can choose to roll again How to devise a strategy to maximise your
chances of getting a better score than your opponent?

I am not sure what the optimal strategy should be. But the
Expectation is 3.5, so my guess is that if I get 2 or 3, I will roll
again. If I get 4,5 or 6 I will stop. But it is, on average, making
me score higher than 3.5 only.

Please advise.

I'm sorry, maybe I missed this. Does each player know what the other
one got? Are they blind? Does someone "go first" then stop?

Jonathan
jpshinny
Posted: Thu Mar 08, 2007 1:17 pm
Guest
On Mar 8, 4:38 am, "jionglong" <jiongl...@gmail.com> wrote:
Quote:
Hi,

Someone asked me this question:

Each time you roll a fair-sided die. You can stop at any point and
your score is the last score you scored on your die. If you roll a 1
you have to stop and you score 1. If you roll a 2, 3, 4, 5 or 6 you
can choose to roll again How to devise a strategy to maximise your
chances of getting a better score than your opponent?

I am not sure what the optimal strategy should be. But the
Expectation is 3.5, so my guess is that if I get 2 or 3, I will roll
again. If I get 4,5 or 6 I will stop. But it is, on average, making
me score higher than 3.5 only.

Please advise.

Actually, I invented a game once in which each player rolled a die.
Each player could choose a "do over" number. If the player rolled
that number, he got to take that number and add it to the next roll
for his score. If he hit the do over number again, he added again and
kept going.

So if a person's do over is 3, the sequence 5 is worth 5, 3 then 5 is
worth 8, and 3 and 3 and 5 is worth 11 and so forth.

The do over number is picked in advance and is constant.

Results: The average outcome regardless of the do over number is 4.2
(easy to prove), while a player choosing a do over of 1 beats a player
choosing a do over of 6 a vast majority of the time. (I approximated
this with a program, assuming that more than 10 do overs was
impossible. I am sure I lost the program.)

Jonathan
Guest
Posted: Thu Mar 08, 2007 2:44 pm
"Bob Dole" <tsdev@mailcity.com> writes:

Quote:
On Mar 8, 3:38 am, "jionglong" <jiongl...@gmail.com> wrote:
Hi,

Someone asked me this question:

Each time you roll a fair-sided die. You can stop at any point and
your score is the last score you scored on your die. If you roll a 1
you have to stop and you score 1. If you roll a 2, 3, 4, 5 or 6 you
can choose to roll again How to devise a strategy to maximise your
chances of getting a better score than your opponent?

I am not sure what the optimal strategy should be. But the
Expectation is 3.5, so my guess is that if I get 2 or 3, I will roll
again. If I get 4,5 or 6 I will stop. But it is, on average, making
me score higher than 3.5 only.

Please advise.

Often a good place to start in figuring out the problem formulaicly is
to do some simulations.

It can be useful to teach you something about a problem that is too
difficult to solve exactly, or to check your solution for a problem
that you have solved exactly.

This problem can be solved exactly.

Quote:
There are 5 strategies:
stop at the first roll (if you get a 2 or higher),
stop if you get a 3 or higher (otherwise continue),
stop if you get a 4 or higher (otherwise continue),
stop if you get a 5 or higher (otherwise continue),
stop only if you get a 6 (otherwise continue).

These are the only strategies that need be considered.

Quote:
If we simulate a random sequence of die rolls, we can determine for
each sequence whether it is uniquely better (W), is tied for the best
strategy (T), or is not the best strategy (L). The results for 2000
random sequences are shown below.


Stop at
stop at: 2 3 4 5 6
W 3.9% 1.4% 1.8% 4.3% 17.7%
T 49.6% 55.3% 58.0% 60.3% 48.8%
L 46.6% 43.4% 40.2% 35.5% 33.6%

Based on this, it would appear that it is better to keep rolling until
you get a 6.

However, if you have one opponent, the advantage of a "6" strategy is
less clear. Let's suppose we have one stopping at "6", the other at
"5". There's an advantage to the "6" strategy, but it's not huge.

Better head to head
6 17.7%
T 66.6%
5 15.8%

Furthermore, 6 versus 4 isn't much different:

Better head to head
6 26.6%
T 49.2%
4 24.3%

and these small differences are an artifact of these particular 2000
sequences.

Consider that a "stop only at 6" rule is really a "stop at 1 or 6,
whichever comes first", so half the time you end up with a 1, and half
the time with a 6.

A "stop if 5 or better" rule is a "stop at 1 or 5 or 6, whichever
comes first", so a third of the time you end up with a 1, a third of
the time a 5, and a third of the time a 6.

If we have two players playing against each other, one using a "stop
at 6" rule and the other "stop at 5", this means:

one third of the time both players will get a "1" score
one third of the time both players will get a "6" score
one third of the time one player will get a "5"
half of that (1/6) the other player will get a "1" and lose
half of that (1/6) the other player will get a "6" and win

So, half of the time each player will win.

I will leave consideration of other rule pairs to somebody who feels
like doing more typing!

Here is a complete table of the head-to-head results, where a win by the
player one has been assigned the value 1, a loss the value 0 and a tie
the value 1/2. I've converted the fractions to decimal for easier
comparison:

two
stop on: 2 3 4 5 6
- -------- -------- -------- -------- ---
2 0.5 0.45 0.416667 0.416667 0.5
3 0.55 0.5 0.45 0.433333 0.5
one 4 0.583333 0.55 0.5 0.458333 0.5
5 0.583333 0.566667 0.541667 0.5 0.5
6 0.5 0.5 0.5 0.5 0.5

Because the game is symmetric (I'm assuming that neither player sees what
the other player is doing) the value is 1/2. There are two basic strategies
for player one that guarantee a value of at least 1/2: stop on 5, or
stop on 6. Stop on 5 is obviously more attractive, since it penalizes
player two if he picks any strategy other than stop on 5 or stop on 6.

The OP asked about maximizing the chance of getting a better score than
the opponent. So maybe he is asking about the asymmetric game where ties
go to player two!

Here's what the head to head results look like. Wins for player one has
been assigned the value 1, while ties and losses the value 0:

two
stop on: 2 3 4 5 6
- -------- -------- -------- -------- --------
2 0.416667 0.366667 0.333333 0.333333 0.416667
3 0.466667 0.4 0.35 0.333333 0.4
one 4 0.5 0.45 0.375 0.333333 0.375
5 0.5 0.466667 0.416667 0.333333 0.333333
6 0.416667 0.4 0.375 0.333333 0.25

The value of this game is 1/3. Player two limits one's chances to this
value by choosing stop on 5. No other strategy performs so well.
It almost doesn't matter what player one does, but he must be careful
about choosing stop on 6 in case player two departs from his best strategy.
There are seven grand strategies player one can choose which form the basis
of all grand strategies that guarantee a value of 1/3:

1. stop on 2
2. stop on 3
3. stop on 4
4. stop on 5
5. a 1:1 mixture of stop on 2 and stop on 6
6. a 5:4 mixture of stop on 3 and stop on 6
7. a 2:1 mixture of stop on 4 and stop on 6

All other grand strategies which guarantee a value of 1/3 are
non-negatively-weighted linear combinations of these strategies.

(The above solution comes from software I've written that analyzes game
theory matrices. I was first exposed to the subject in high school by
the very fun book, _The Compleat Strategyst_, by J.D. Williams.)

Scott
--
Scott Hemphill hemphill@alumni.caltech.edu
"This isn't flying. This is falling, with style." -- Buzz Lightyear
Bob Dole
Posted: Thu Mar 08, 2007 9:01 pm
Guest
On Mar 8, 12:44 pm, hemph...@hemphills.net wrote:
Quote:
"Bob Dole" <t...@mailcity.com> writes:


I will leave consideration of other rule pairs to somebody who feels like doing more typing!

Here is a complete table of the head-to-head results...

My earlier compliment hasn't shown up after several hours, so I'll
assume it's lost in cyberspace and try again: Great answer.
Stephen J. Herschkorn
Posted: Sat Mar 10, 2007 1:07 am
Guest
Guest
Posted: Sat Mar 10, 2007 5:28 pm
Stephen J. Herschkorn
Posted: Sun Mar 11, 2007 3:28 pm
Guest
hemphill@hemphills.net wrote:

Quote:
"Stephen J. Herschkorn" <sjherschko@netscape.net> writes:



In sci.stat.math, "jionglong" <jionglong@gmail.com> writes:



Each time you roll a fair-sided die. You can stop at any point and
your score is the last score you scored on your die. If you roll a 1
you have to stop and you score 1. If you roll a 2, 3, 4, 5 or 6 you
can choose to roll again How to devise a strategy to maximise your
chances of getting a better score than your opponent?

I am not sure what the optimal strategy should be. But the
Expectation is 3.5, so my guess is that if I get 2 or 3, I will roll
again. If I get 4,5 or 6 I will stop. But it is, on average, making
me score higher than 3.5 only.



If no player observes any other, you cannot come up with "a strategy
to maximise your chances of getting a better score than your
opponent," since each player can use the same strategy.



This analysis is faulty. It is true that each player can use the same
strategy, and thus the expected value of the game is to win half the
time. (You can either replay the game on ties or just count them as
half a win--the analysis is the same.) You can still solve for the
strategy that achieves this maximum value. I posted my results earlier.
The strategy "stop on 6" has an expected value of 1/2 against any
strategy the opponent chooses. However, the strategy "stop on 5" has
a chance of winning which is greater than 1/2, should the opponent choose
a strategy which stops on 2, 3 or 4.



I see. Supposing each player uses a strategy, stop if you roll k or
better (if you do), is there a dominant strategy? That is, is there a
strategy that guarantees that your probability of (strictly) winning is
at least as great as your opponent's?

Suppose Player 1 uses k and Player 2 uses m. If k > m, P{1 wins} =
P{1 rolls k} =
(7-k) / (8-k), as shown below (or previously, depending on how you think
about it). If k <= m,
P{1 wins} = P{1 rolls k, 2 rolls 1} = P{1 rolls k} P{2 rolls 1} = (7-k)
/ [(8-k) (8-m)].

By inspection, Player 1 should choose 6 to guarantee that his/her
probability of winning is at least as great as Player 2's. This agrees
with Hemphill's result.

Quote:
I also analyzed the asymmetric game where "player one" really wants to
beat his opponent, and ties are counted the same as losses. In this
case, the best he can do is to win 1/3 of the time.



Perhaps you are looking for a strategy to maximize your expected
score. Intuitively, the strategy will be of the sort, pick a number
n between 2 and 6; stop as soon as you get 2 or higher, if you
can. Note that there are (6 - n + 1) + 1 = 8-n numbers you will
possibly stop on. With probability
(7-n) / (8-n), you wil get a conditionally expected score of (n+6) /
2. Thus, the expected score is
1 / (8-n) + (7-n) / (8-n) (n+6) / 2 = (44 + n - n^2) / [2 (8-n)].
By inspection, this value is maximized when n = 4 or 5; the maximal
expected score is 4.

Or perhaps you were interested in a two-player game where the second
player observes the first player's score. This is an interesting
question. There are several possible scenarios.



I agree that this is interesting.



1) A tie ends the game, and each player wants to maxmize his/her
chance of winning.



This formulation is a little unclear to me. If a tie ends the game,
then the possibility of ending in a tie has to be considered. How
does it count? Do both players lose? If so, the game is non-zero
sum.



The OP asked how "to maximise your chances of getting a *better* score
than your opponent" (emphasis mine). That is the goal in this scenario.

[remainder of quoted post omittted]

--
Stephen J. Herschkorn sjherschko@netscape.net
Math Tutor on the Internet and in Central New Jersey and Manhattan
 
Page 1 of 1       All times are GMT - 5 Hours
The time now is Thu Jan 08, 2009 1:59 am