Class SolveRiddle20160304Task

  • All Implemented Interfaces:
    AnnotatedAntTask, AntTaskLogMethods, AntTaskMixIn, ClasspathDelegateAntTask, ConfigurableAntTask, Cloneable

    @AntTask("solve-riddle-2016-03-04")
    public class SolveRiddle20160304Task
    extends AbstractSimulationTask
    Ant Task to solve Can You Win This Hot New Game Show?

    Two players go on a hot new game show "Higher Number Wins." The two go into separate booths, and each presses a button, and a random number between zero and one appears on a screen. (At this point, neither knows the s number, but they do know the numbers are chosen from a standard uniform distribution.) They can choose to keep that first number, or to press the button again to discard the first number and get a second random number, which they must keep. Then, they come out of their booths and see the final number for each player on the wall. The lavish grand prize -- a case full of bullion gold -- is awarded to the player who kept the higher number. Which number is the optimal cutoff for players to discard their first number and choose another? Put another way, within which range should they choose to keep the first number, and within which range should they reject it and try their luck with a second number?

    Solution uses the Monte Carlo method.
    <solve-riddle-2016-03-04 classname="String" classpathref="Reference" count="int" description="String" taskname="String">
      <classpath .../>
    </solve-riddle-2016-03-04>
    
    Author:
    Allen D. Ball