Forums › English Language Forums › Off-Topic › The Arcade

Search

Makeshift RNG

5 replies [Last post]
Thu, 11/19/2015 - 18:22
Skexalt

So pseudo-random numbers are generated through various methods, and one of the most basic ones is known as:
Middle Square number generation

However, starting from almost any seed, this will almost always result in the number 0. To prevent such a fallacy from occurring, we either will add the previous two numbers together, and that will become the new seed, OR you may link another thread and plug that number into the formula to get a new seed.
Should the new number be an odd number, take the middle value that is closer to your left c:

Here's an example:
I will start with (Node# * Month * Day * Hour * Minutes) as my seed, which will result in:

As of now, it is 11/19, 5:11, therefore...
71 [NODE] * 11 [MONTH] * 19 [DAY] * 5 [HOURS] * 11 [MINUTES] = 816145

My seed: 816145

Here's a less confusing flowchart for you to understand:

Number (Post A)
|
V
Extract middle 4 digit number (Ex: 1614 from 816145), or if less than 4 digits take whole number
|
V
if 0, generate new (linking whichever thread you want) or add previous two squared numbers together
|
V
Number^2
|
V
New number (Post B)
|
V
Cycle continues

Interesting things may occur, such as loops, in which declare the loop and then generate a new value.

Seed: 816145

Thu, 11/19/2015 - 18:46
#1
Crazee-Pi-Forum's picture
Crazee-Pi-Forum
Remember, don't shoot food.

And you're posting this because...?

Thu, 11/19/2015 - 20:02
#2
Skexalt
I thought we could play a

I thought we could play a game where we generate random integers :c
Too boring?

Fri, 11/20/2015 - 14:22
#3
Matikclocker's picture
Matikclocker
We're sorry, Matikclocker

We're sorry, Matikclocker cannot operate under heavy conditions.

This means I can't understand.

Fri, 11/20/2015 - 19:56
#4
Cryptian's picture
Cryptian
tl;dr

take the middle 4 digits of the previous posts number and square it to form your new number

if that number is 0, then generate a new number through the formula

Fri, 11/20/2015 - 21:34
#5
Corporal-Shade's picture
Corporal-Shade
I'm a Wizard

I uhh...

Powered by Drupal, an open source content management system