😠 Really weird random number generator.

Posts 1–7 of 7 · Page 1 of 1
😠 Really weird random number generator.
Alright so in batch, i've made this little program that generates random words with 6 letters, so you know there is like 30 million different possibilities (26^6 26 letters 6 spots for those letters).

When the random words are generated with about a second delay I get completely random each time right?

But when there is like a 10 ms or no delay at all I keep getting 3 of the same words in a row.

Wtf?

How do computers generate random numbers/letters etc.? Do they take time to generate them? Because if I give them time everything is all random and nice, but if I don't I get same 6 letter word at least 3-4 times in a row before a new one is created?

This is really weird to me.. any explanations? or solutions?

- - - Updated - - -

I can provide proof of this aswell, its really bugging me that I have to put a time delay between each random word. Don't ask me why I make this by the way
Ik delay it depends on your CPU specs but every CPU atm should be fine at 20ms.

And It's possible to get 3 in a row. Random.org sometimes does that aswell. But AFAIK every system is not perfect, moreover talking about random stuff.
My guess would be it hasn't processed yet/updated so you are getting the same output each time for X times until the thread is released, then it works as intended.
Quote Originally Posted by Mayion View Post
My guess would be it hasn't processed yet/updated so you are getting the same output each time for X times until the thread is released, then it works as intended.
He can try using + delay

Also, if you don't need a fast pick use 500ms. It's enough.
Quote Originally Posted by Daniel Mendes View Post


He can try using + delay

Also, if you don't need a fast pick use 500ms. It's enough.
I need a fast pick, no there is no way I get the same 3 6 letter combinations in a row as I said there is 30 million combinations and the chance is 1/30 mil/30 mil/30mil... and it happens all the time too.

I think it might be because computers pick random numbers based on atmosphere and since they are picked so fast the atmosphere is the same (?) and I get the same numbers or something like that idk.

This thread can be closed, it works fine with 50ms cooldown so I guess thats fine.
Could you include a code snippet? maybe you're running async, or forgot to use rand.next or something??
Complete 'random' doesnt exist. In fact it are certain algorithms that make it look like it's random. Most random functions use time and delay in their algorithms as well. It could be that it has something to do with that, but that would mean the random function is seriously bad.

- - - Updated - - -

Quote Originally Posted by Mayion View Post
My guess would be it hasn't processed yet/updated so you are getting the same output each time for X times until the thread is released, then it works as intended.
OFFTOPIC:
Gotta be one of the best avatars. Love that character!
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us