Author Topic: Rnd function  (Read 9083 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7709
    • View Profile
Rnd function
« Reply #30 on: October 23, 2005, 02:59:25 PM »
Yes, but you know nothing of what the computer is using to decide the random numbers, or what the period of the VB random function is, or how statistically random it is, etc.

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
    • http://community.webshots.com/user/objack2
Rnd function
« Reply #31 on: October 23, 2005, 03:24:30 PM »
Quote
Yes, but you know nothing of what the computer is using to decide the random numbers, or what the period of the VB random function is, or how statistically random it is, etc.
good enough for who's using it. ;)
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7709
    • View Profile
Rnd function
« Reply #32 on: October 23, 2005, 03:31:21 PM »
Right, you only need a good random number generator for scientific computing, and other times like that.

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Rnd function
« Reply #33 on: October 24, 2005, 01:48:44 AM »
yeah, but aint a good randomizer needed for ALs?
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Rnd function
« Reply #34 on: October 24, 2005, 02:27:51 AM »
I've done a couple of different tests of DB's randomness, and found it to be pretty good. The two main tests were a coin flipping bot and an ouija board bot.

The coin flipper basically tested if the rnd numbers were weighted towards one end or another for:
Code: [Select]
1 rnd 50 addstore.
*50 *.robage div 51 store
'Average of all random flips
There were no problems found.

The Ouija bot was to test if the rnd nums could form different words(alright too much watching White Noise that night :) )
Code: [Select]
' 27 therefore 28 random nums 0 and 27 representing space and period respectivly
27 rnd 50 store
27 rnd 51 store

*51 100 mult *50 add 70 store
' for a two letter word
I basically did the above many more times to wind up with 10 letters per cycle.

No words or ghosts were in evidence at the time, unless they were highly concerned with acronyms. :wacko:

For me this proves DB's randomness works reasonably well and doesn't need improvement.

Oh yeah, Zelos:

Added up a Whimsical section on the wiki if you're interested in making up a Db early history.
« Last Edit: October 24, 2005, 03:24:52 AM by Endy »

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Rnd function
« Reply #35 on: October 24, 2005, 11:45:13 AM »
I were thinking more on mutation randomizing
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7709
    • View Profile
Rnd function
« Reply #36 on: October 24, 2005, 12:21:37 PM »
I would say you'd want your mutations to be properly statistically randomo.  Why is why I copied some of the source in those random number chapters above for the C++ source.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Rnd function
« Reply #37 on: April 26, 2013, 03:22:54 PM »
Reminded me of this.
Oh my god, who the hell cares.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Rnd function
« Reply #38 on: April 26, 2013, 03:31:13 PM »
I actually had a discussion going on MythBusters forums on how to make a truly random r.n.g.  We where looking into using windows performance graphs built into the .net framework. The only thing that came out of that was it will be extremely platform specific and therefor completely unpractical.



On the flip side, the advantage of 'seeded' r.n.g. is the fact that it is extremely easy to debug. If you know 'when' the program crashed and what 'seed' was used, all you need to do is put the same seed back into the system and wait for the program to crash at the same exact 'time.' I am using time in quoty marks because I am thinking in terms of cycles not actual time.
« Last Edit: April 26, 2013, 03:36:07 PM by Botsareus »

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Rnd function
« Reply #39 on: April 26, 2013, 03:49:24 PM »
Did someone implement it, I wonder how random the results it gives would be.
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7709
    • View Profile
Re: Rnd function
« Reply #40 on: April 26, 2013, 04:50:47 PM »
Well you want to be careful about the difference between unpredictability and random.  Random implies a certain uniformity and shape to the numbers you get back over the long haul.  I imagine if you tried to hook in to random noisy things in the computer you could generate unpredictable bits, but they might by skewed so far in one direction that they end up being useless for a RNG.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Rnd function
« Reply #41 on: April 26, 2013, 05:27:39 PM »
If it's unpredictable, it's random. If a unpredictable number-generator doesn't return uniformity in the long run, it means you can predict what numbers it will more likely get.
It is rather complicated to find out if a number-generator is 'random', but you got tools for that.
Oh my god, who the hell cares.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Rnd function
« Reply #42 on: April 26, 2013, 06:10:49 PM »
Your best bet is to flush in the noisy stuff into an existing RNG. But be careful, because that will usually simplify the randomization instead of improving it unless you figure out the frequency and amplitude on this things.

I wish I had more for you then that. But the .net version of the RNG .net inherited from vb6 is only single precision. And I don't know the .net's "Random Class" that well to run experiments.