Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

Donate!

pls donate


#1 2019-06-15 10:34:02

PiotrGrochowski
Member
From: Poland (born in 8 №v 2004)
Joined: 2016-04-27
Posts: 903

What pseudo-random number generator is the best?

Here is the summary:

Mersenne Twister is very old
xorshift is the outdated version of xoshiro/xoroshiro
xoshiro/xoroshiro is the competitor of PCG
PCG is the competitor of xoshiro/xoroshiro


I'm known as "haslo" in EE.

Offline

#2 2019-06-15 11:12:02

Gosha
Member
From: Russia
Joined: 2015-03-15
Posts: 5,871

Re: What pseudo-random number generator is the best?

Why do you need the best pseudo-random number generator?

As long as they give pseudo-random numbers and don't start repeating numbers too soon, you are fine

Offline

#3 2019-06-15 11:16:10

PiotrGrochowski
Member
From: Poland (born in 8 №v 2004)
Joined: 2016-04-27
Posts: 903

Re: What pseudo-random number generator is the best?

Gosha wrote:

Why do you need the best pseudo-random number generator?

As long as they give pseudo-random numbers and don't start repeating numbers too soon, you are fine

even if it takes 1000 years for each random number it's fine?


I'm known as "haslo" in EE.

Offline

#4 2019-06-15 12:09:05

TaskManager
Formerly maxi123
From: i really should update this
Joined: 2015-03-01
Posts: 8,096

Re: What pseudo-random number generator is the best?

PiotrGrochowski wrote:
Gosha wrote:

Why do you need the best pseudo-random number generator?

As long as they give pseudo-random numbers and don't start repeating numbers too soon, you are fine

even if it takes 1000 years for each random number it's fine?

What lol
Just use random.org


i8SwC8p.png
signature by HG, profile picture by bluecloud, thank!!
previous signature by drstereos













like.php?tid=46047&pid=754703

Online

Wooted by:

#5 2019-06-15 13:29:01, last edited by PiotrGrochowski (2019-06-15 13:40:31)

PiotrGrochowski
Member
From: Poland (born in 8 №v 2004)
Joined: 2016-04-27
Posts: 903

Re: What pseudo-random number generator is the best?

TaskManager wrote:
PiotrGrochowski wrote:
Gosha wrote:

Why do you need the best pseudo-random number generator?

As long as they give pseudo-random numbers and don't start repeating numbers too soon, you are fine

even if it takes 1000 years for each random number it's fine?

What lol
Just use random.org

The problem is, it isn't FAST like prng are. xoshiro256** generates random numbers in sub-ns speed.

But, most importantly, PCG is better than xoshiro256**, while xoshiro256** is better than PCG.


I'm known as "haslo" in EE.

Offline

#6 2019-06-15 14:01:16

TaskManager
Formerly maxi123
From: i really should update this
Joined: 2015-03-01
Posts: 8,096

Re: What pseudo-random number generator is the best?

PiotrGrochowski wrote:
TaskManager wrote:
PiotrGrochowski wrote:
Gosha wrote:

Why do you need the best pseudo-random number generator?

As long as they give pseudo-random numbers and don't start repeating numbers too soon, you are fine

even if it takes 1000 years for each random number it's fine?

What lol
Just use random.org

The problem is, it isn't FAST like prng are. xoshiro256** generates random numbers in sub-ns speed.

But, most importantly, PCG is better than xoshiro256**, while xoshiro256** is better than PCG.

So speed is your criteria for an RNG that could be considered best?


i8SwC8p.png
signature by HG, profile picture by bluecloud, thank!!
previous signature by drstereos













like.php?tid=46047&pid=754703

Online

#7 2019-06-15 14:26:32

Different55
Forum Admin
Joined: 2015-02-07
Posts: 15,980

Re: What pseudo-random number generator is the best?

Just use whatever's easiest in whatever language/environment. If it ever becomes a problem, then look into other options.


"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto

Offline

Wooted by:

#8 2019-06-15 16:15:49

Growler
Formerly Snowester
Joined: 2017-05-31
Posts: 429

Re: What pseudo-random number generator is the best?

Bruh, random.org has unnoticeable speed, you could just use their RNG for near-instant speed.


1565540400.png

Offline

#9 2019-06-15 18:02:54

PiotrGrochowski
Member
From: Poland (born in 8 №v 2004)
Joined: 2016-04-27
Posts: 903

Re: What pseudo-random number generator is the best?

Growler wrote:

Bruh, random.org has unnoticeable speed, you could just use their RNG for near-instant speed.

Quota that maxes out at 1000000 bits and regenerates 200000 bits a day, FYI. xoshiro256** is an algorithm so it doesn't have this limitation.

But, most importantly, PCG is better than xoshiro256**, while xoshiro256** is better than PCG.


I'm known as "haslo" in EE.

Offline

#10 2019-06-15 19:44:36

Tomahawk
Forum Mod
From: BiH
Joined: 2015-02-18
Posts: 2,173

Re: What pseudo-random number generator is the best?

Moved to Bots and Programming.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

#11 2019-06-15 20:03:54, last edited by PiotrGrochowski (2019-06-15 20:05:27)

PiotrGrochowski
Member
From: Poland (born in 8 №v 2004)
Joined: 2016-04-27
Posts: 903

Re: What pseudo-random number generator is the best?

Tomahawk wrote:

Moved to Bots and Programming.

Is this a joke or what? The PCG vs xoshiro256** competition has nothing to do with EE.


I'm known as "haslo" in EE.

Offline

Wooted by:

#12 2019-06-15 22:10:08, last edited by Different55 (2019-06-15 23:37:09)

Different55
Forum Admin
Joined: 2015-02-07
Posts: 15,980

Re: What pseudo-random number generator is the best?

Why are you so hung up on PCG vs xoshiro256** specifically? According to the articles you linked, they both suffer from many of the same flaws. If those flaws are acceptable, xoshiro256** is 3x faster. Although 3 * 0.95 nanoseconds is still tiny. And it seems like all they seem to be saying in those articles is that PCG and xoshiro256** aren't CSPRNGs, which wasn't a goal of theirs anyway. I don't see any complaints about either being statistically not-random so they're probably fine for most use cases?

If you don't care, use your language/environment default for ease of use.
If you need speed, either honestly seems fine. xoshiro256** is faster.
If you need quality, find a cryptographically secure PRNG.


"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto

Offline

#13 2019-06-15 22:11:56

Different55
Forum Admin
Joined: 2015-02-07
Posts: 15,980

Re: What pseudo-random number generator is the best?

Also, moving on back to Off Topic. This is programming-related, but not EE Programming which is what Bots and Programming is for.


"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto

Offline

Wooted by: (2)

#14 2019-06-16 06:34:20

PiotrGrochowski
Member
From: Poland (born in 8 №v 2004)
Joined: 2016-04-27
Posts: 903

Re: What pseudo-random number generator is the best?

Different55 wrote:

Why are you so hung up on PCG vs xoshiro256** specifically? According to the articles you linked, they both suffer from many of the same flaws. If those flaws are acceptable, xoshiro256** is 3x faster. Although 3 * 0.95 nanoseconds is still tiny. And it seems like all they seem to be saying in those articles is that PCG and xoshiro256** aren't CSPRNGs, which wasn't a goal of theirs anyway. I don't see any complaints about either being statistically not-random so they're probably fine for most use cases?

If you don't care, use your language/environment default for ease of use.
If you need speed, either honestly seems fine. xoshiro256** is faster.
If you need quality, find a cryptographically secure PRNG.

Of course neither is a CSPRNG, this topic is for people to discuss on which PRNG is the best for general purpose.


I'm known as "haslo" in EE.

Offline

#15 2019-06-17 03:15:39

Different55
Forum Admin
Joined: 2015-02-07
Posts: 15,980

Re: What pseudo-random number generator is the best?

They seem very similar practically speaking. Both past statistical tests, both fail if you don't take care in seeding them. xoshiro is 3x faster but, again, both are very speedy. I would probably lean towards xoshiro myself.


"Sometimes failing a leap of faith is better than inching forward"
- ShinsukeIto

Offline

Different551560737739752616

Board footer

Powered by FluxBB

[ Started around 1571002437.0425 - Generated in 0.043 seconds, 13 queries executed - Memory usage: 1.48 MiB (Peak: 1.67 MiB) ]