Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Check randomly generated numbers have not been used before

by GotToBTru (Prior)
on Sep 16, 2016 at 20:29 UTC ( [id://1171961]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Check randomly generated numbers have not been used before
in thread Check randomly generated numbers have not been used before

You're exactly right about this. I knew this sort of thing had an official title, just didn't know what it was. I've seen this sort of algorithm called a "random number generator", but it is nearly the opposite. Having once issued a value in the space, there is 0% chance it will re-issue it. Well, until you start through the list a second time, in which case it will issue the very same list of numbers in exactly the same order. The "random" function in the BASIC interpreter I used 40+ years ago used something very much like this, and my first attempts at computer games were very disappointing until I figured that out ;)

But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

  • Comment on Re^3: Check randomly generated numbers have not been used before

Replies are listed 'Best First'.
Re^4: Check randomly generated numbers have not been used before
by AnomalousMonk (Archbishop) on Sep 16, 2016 at 23:38 UTC
    I've seen this sort of algorithm called a "random number generator", but it is nearly the opposite.

    That's the "pseudo" in "Pseudo-Random Number Generator." :)


    Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1171961]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-16 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found