Procedural Randomness

version 2 by Aaron Reed

  • Home page
  • Beginning
  • Previous



  • Example: ** Call Center - Random names consistently associated with telephone numbers.

    In this example, we're going to set up 10,000 phone numbers with consistent names and voicemail messages at each one.

        "Call Center".

        Include Procedural Randomness by Aaron Reed.

        Call Center is a room. "Sales have certainly been down in the years since call screening began. Still, you do have to call all these numbers. (Say DIAL and a 4-digit number to make a call.)".

        Understand "dial [a number]" as dialing. dialing is an action applying to one number.

        Check dialing:
            if the number understood < 0 or the number understood > 9999, say "Only four digit numbers are valid.".

        Carry out dialing:
            set seed to the number understood;
            say "After a few rings, you get voicemail. 'This is [one of]Alec [or]Bob [or]Cathy [or]Dennis [or]Eric [or]Frank [or]Gary [or]Henrietta [or]Irma [or]Jane [or]Karl [or]Laura [or]Morris [or]Nathan [or]Omar [or]Petunia [or]Quinn [or]Russel [with procedural randomness]";
            say "[one of]Adams [or]Beckerson [or]Cordwood [or]Dansbury [or]Eggerson [or]Fleetmeyer [or]Garrison [or]Hardy [or]Iglesias [or]Jones [or]Kurtz [or]Laurence [or]Michaels [or]Norris [or]Openheimer [or]Princeton [or]Quagmire [or]Roberts [with procedural randomness]";
            say ". [one of]Sorry I can't take your call[or]I'm not available[or]I'm not here right now[or]I don't have my phone on[or]I'm unable to answer the phone right now[with procedural randomness], but ";
            say "[one of]if you leave a name and number I'll be happy to get back to you[or]leave a message and I'll ring you back[or]say your contact info at the tone and I'll return your call[or]I'll return your call later[or]record a message and I'll get back to you later[with procedural randomness].' You hang up at the tone.".
            
        Test me with "dial 2938 / dial 9837 / dial 5000 / dial 2938".