ScratchData LogoScratchData
Back to Layzej's profile

Rule30 RNG with SEED

LALayzej•Created December 16, 2022
Rule30 RNG with SEED
14
9
318 views
View on Scratch

Instructions

Will ALWAYS generate the same stream of pseudorandom numbers based on a predetermined seed. To use it: 1a) Generate a seed using the RNG_NewSeed block OR 1b) Use "Set Seed" block to set the seed yourself to any 32 bit number. 2) Generate pseudorandom numbers using a) "Pick Random" custom block. This works just like the built in "Pick Random" but generates consistent numbers based on a given SEED. OR b) Use RNG_RANDOM32 to generate a pseudorandom 32 bit number The display on this project just plots the random numbers in 2D to show that the random numbers are evenly distributed. The seed generator is not perfectly distributed, but it shouldn't matter.

Description

There is a great project by @papipupepappa that generates an image based on presets as well as randomly generated numbers: https://scratch.mit.edu/projects/776846260/#comments-305606356 I generated a really great pic, but even if I shared my presets you wouldn't be able to see the same picture I generated because there is a random element. This project could be useful in cases like this because you could share your presets as well as your seed and get the exact same pic. Rule30: https://upload.wikimedia.org/wikipedia/commons/a/aa/Rule30-256-rows.png Yeah, there's a typo on the top button. Should say "Test Rule30 Random Distribution"

Project Details

Project ID778117489
CreatedDecember 16, 2022
Last ModifiedDecember 20, 2022
SharedDecember 17, 2022
Visibilityvisible
CommentsAllowed