Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #1128

Re: What to pass to srand()?

Newsgroups comp.sys.apple2.programmer
Date 2014-01-19 21:19 -0800
References <lbdebg$vce$1@news4.open-news-network.org> <1b64f718-eed7-487d-91a3-55d0a926badf@googlegroups.com> <1878520103411843764.528255mjmahon-aol.com@news.giganews.com>
Message-ID <a104f54c-03a7-41f4-8d2b-4a841de4ce37@googlegroups.com> (permalink)
Subject Re: What to pass to srand()?
From gids.rs@sasktel.net

Show all headers | View raw


> Dealing cards, though, unless done from an infinite number of decks, is
> always without replacement. 


I was not referring to dealing.  

Consider this.  Everyone knows the card trick when you take a card, look at it and put it back.  This is with replacement.

You still can pick a random card from a random deck, then it won't matter how random the generator is.  Shuffle the deck using an imperfect random # generator, and pick a random card using the imperfect generator.  It won't matter if the sequence repeats because the cards at those locations will have been changed, making the outcome pretty random.

As in real life, I don't believe the die should be equally likely either.  To me this is not random either.  It is more like controlling the laws of averages, so each die has an equal chance of showing each number, which is what we humans want from a perfect world.  If this were true and each number had an equal chance of showing up, I would have won Lotto 6/49 a long time ago.  My lucky numbers sure are not being given an equal chance.

Back to comp.sys.apple2.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

What to pass to srand()? Matt <matt@clickertraining.co.nz> - 2014-01-18 21:28 +1300
  Re: What to pass to srand()? Marco Verpelli <mverpelli@libero.it> - 2014-01-18 01:31 -0800
    Re: What to pass to srand()? Matt <matt@clickertraining.co.nz> - 2014-01-19 09:22 +1300
      Re: What to pass to srand()? Egan Ford <datajerk@gmail.com> - 2014-01-18 15:24 -0700
        Re: What to pass to srand()? "Bill Buckels" <bbuckels@mts.net> - 2014-01-18 17:32 -0600
          Re: What to pass to srand()? "Bill Buckels" <bbuckels@mts.net> - 2014-01-18 17:38 -0600
        Re: What to pass to srand()? Michael J. Mahon <mjmahon@aol.com> - 2014-01-18 18:26 -0600
          Re: What to pass to srand()? Egan Ford <datajerk@gmail.com> - 2014-01-19 14:33 -0700
            Re: What to pass to srand()? Michael J. Mahon <mjmahon@aol.com> - 2014-01-19 23:27 -0600
          Re: What to pass to srand()? Vladimir Ivanov <vladitx@XXXyahooXXX.com> - 2014-01-20 01:35 +0200
  Re: What to pass to srand()? gids.rs@sasktel.net - 2014-01-18 21:17 -0800
    Re: What to pass to srand()? Michael J. Mahon <mjmahon@aol.com> - 2014-01-19 11:15 -0600
      Re: What to pass to srand()? gids.rs@sasktel.net - 2014-01-19 21:19 -0800
        Re: What to pass to srand()? Michael J. Mahon <mjmahon@aol.com> - 2014-01-20 00:14 -0600

csiph-web