• JBert (disco)

    Wait, are you guys making up prize names on the spot?

    Congratulations on this new set of embellished requirements, the president's daughter would be proud of this achievement.

  • BenWiederhake (disco)

    Thanks for the great description, Remy :-) I'm a bit surprised, and overly joyful that my submission actually made it through!

    As I already wrote in the README: There is a way to "cheat" in such a way that nobody can realistically notice. If someone wants to be walked through the maths, raise your hand. Otherwise I'm going to be too lazy :stuck_out_tongue:

  • Maciejasjmj (disco)

    You're going to figure out a way to rip off this slot machine, and rebuild your bankroll.

    Why? You already have a perfectly good skewed roulette wheel...

  • TheCPUWizard (disco)

    Ben - (everything assumes a 38 number USA, double-zero wheel)... On the first spin, the odds of a number coming up is nearly 100% (it would be 100% if we exclude the chance various "problems" such as the ball leaving the wheel - rare, but it does happen). Now for a second spin (fair wheel), the odds of the same number coming up are 1/38 [because we don't care what the first number was, only if they are the same]. This is radically different than the article (assuming I did not misread while having my first cup of coffee) stating odd of 1/1444 - (aka 1/(n*n)

  • Remy (disco) in reply to JBert

    As I mentioned, the judging is entirely subjective, and I want to highlight clever and fun solutions, and yeah, we're making up prize names. Although "Bruce Said So" might stick around.

  • Nick_Johnson (disco) in reply to Remy

    The venerable IOCCC does the same thing.

  • dkf (disco) in reply to Maciejasjmj
    Maciejasjmj:
    You already have a perfectly good skewed roulette wheel...

    Why not make the slot perfectly fair and get a certain waitress to play it…

  • PWolff (disco)
    You had padded it, anyway- apparently while Gilda was showing you out the back door with one hand, she stole your wallet and got a really big tip with the other.

    What did the protagonist smoke to forget you NEVER. EVER. EVER. have all your money in one place?

  • Maciejasjmj (disco) in reply to dkf
    Comment held for moderation.
  • BenWiederhake (disco) in reply to TheCPUWizard

    Err, yes, that's perfectly true for a fair roulette wheel; I am aware of that.

    However, even the requirements don't want a fair roulette wheel. Both implementation and documentation (so this is "veritable") describe that, if a duplicate is about to happen, we spin the wheel again. So in order to actually see a duplicate, the following must happen:

    First call to FewRunsWheel.operator()(). This calls FairWheel.operator()(). Returns a number, let's say [s]42[/s] err 23 for example. Return that number.

    Second call to FewRunsWheel.operator()(). Calls FairWheel.operator()(), which returns 23 again. FewRunsWheel detects that, and drops the result, instead calling (and then returning blindly) again: FairWheel.operator()(), returning 23 a third time

    I think we can agree that FewRunsWheel.operator()() returning the same number three times in a row has probability 1/(n*n)

  • Zylon (disco)

    “GRT JOB,”

    "Greet job"?

    Anyway, since these are kind-of but not really obfuscated coding contests, I propose that they instead be dubbed obfuscated requirements contests. Somewhere, in the vast jumbled expanse between "this part is just for flavor" and "it must do this", there is an actual requirement. Can you find it?!

  • boomzilla (disco) in reply to Zylon
    Zylon:
    I propose that they instead be dubbed obfuscated requirements contests.

    Just like normal requirements!

  • JBert (disco) in reply to Zylon

    Hmmm, ORC does have a ring to it...

  • presidentsdaughter (disco) in reply to JBert
    JBert:
    the president's daughter would be proud of this achievement.

    I am!

  • PWolff (disco)
    Comment held for moderation.
  • JBert (disco) in reply to PWolff

    So the ticket almost lapsed. I guess he kept sending "you could be a winner" e-mails and got no reply.

  • Maciejasjmj (disco) in reply to PWolff
    PWolff:
    tampered with lottery equipment before buying a Hot Lotto ticket that would go on to win $14.

    Well, that's not really worth it, is i...

    article:
    tampered with lottery equipment before buying a Hot Lotto ticket that would go on to win $14.**3 million**

    Nevermind, DiscoOneBox...

  • PWolff (disco)
    Comment held for moderation.
  • PWolff (disco) in reply to PWolff
    Comment held for moderation.

Leave a comment on “The Lucky Deuce: Getting in the Slot”

Log In or post as a guest

Replying to comment #:

« Return to Article