All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Games
Roll of the die (Posted on 2005-04-21) Difficulty: 4 of 5
The object of the dice game is to be the first player to reach a score of at least 100 points.
Each player’s turn consists of repeatedly rolling a die.
After each roll, the player has two choices: roll again, or stop.
- If the player rolls 1, nothing is scored in that turn and it becomes the opponent’s turn.
- If the player rolls a number other than 1, the number is added to the player’s turn total and the player’s turn continues.
- If the player stops, the turn total (the sum of the rolls during the turn), is added to the player’s score, and it becomes the opponent’s turn.

What's your strategy?

See The Solution Submitted by Hugo    
Rating: 4.1111 (9 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re(3): a wiser approach | Comment 12 of 23 |
(In reply to re(2): a wiser approach by armando)

Since the die doesn't have a memory, if a person has a round score of 18, it doesn't matter how it got that way, whether from 3 rolls of a six or 9 rolls of a two, so one expects the best strategy to depend on how many points one is risking rather than how many times one has already rolled the die.  But as armando points out, a simulation helps prove the point in some ways.  The following program simulates someone quitting at 20 playing against someone rolling 5 times regardless, per round.  In either instance, end-game strategies are not used, such as continuing to go when the opponent has 99 points already.

  p1 = 0: p2 = 0
   rTot = 0
    toss = INT(6 * RND(1) + 1)
    IF toss = 1 THEN
     rTot = 0
     EXIT DO
     rTot = rTot + toss
    END IF
   LOOP UNTIL rTot > 19 OR rTot = 0
   p1 = p1 + rTot
   IF p1 > 99 THEN EXIT DO
   rTot = 0
   FOR i = 1 TO 5
    toss = INT(6 * RND(1) + 1)
    IF toss = 1 THEN
     rTot = 0
     rTot = rTot + toss
    END IF
   p2 = p2 + rTot
   IF p2 > 99 THEN EXIT DO
  IF p1 > 99 THEN p1Win = p1Win + 1:  ELSE p2Win = p2Win + 1
  PRINT p1Win, p2Win

At the point at which it was stopped, player 1, who stopped on 20, won 13,961 games to 11,133 won by player 2.

If the first player's strategy was changed to stopping on 21, stopping at a similar point produced 13396 vs 12492.

If the first stopped on 20 and the second always went 6 times, it was 13996 vs 11007.

And stopping on 21 vs going 6 always, produced 13401 vs 12004.

  Posted by Charlie on 2005-04-25 00:48:47
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (5)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information