Coding Math: Episode 51 - Pseudo Random Number Generators Part I

Поділитися
Вставка
  • Опубліковано 17 жов 2024

КОМЕНТАРІ • 56

  • @notbarbara2647
    @notbarbara2647 5 років тому +45

    Wow, this video deserves way more views. This was an awsome + visual explanation. Thanks for taking the time to make this video

  • @maskedjiro1271
    @maskedjiro1271 5 років тому +15

    Your voice is just perfect for these kind of videos!!!

  • @PixelOutlaw
    @PixelOutlaw 8 років тому +9

    This is especially useful when you are working with small languages like Scheme which by default do not provide a random number generator.

  • @kriszenn1125
    @kriszenn1125 5 років тому +2

    Wow! I could use this for a one-time pad encoder and decoder. Since the middle squares method repeats more often, it's probably the right choice because I could send that sequence to another person using one number (seed), and they can decode my message!

  • @DxBALLxD
    @DxBALLxD 3 роки тому

    Thanks man this explanation has been stellar. I've been wanting to get a grip on procedural generation for a while and only heard vague horror stories about recursive loops and such throwing the organic look off completely. Now I know some official terminology to look out for

  • @brutalmustache9533
    @brutalmustache9533 5 років тому +1

    Thanks a lot! This video made the PRNG algorithm much clear for me.

  • @styleisaweapon
    @styleisaweapon 4 роки тому +3

    Did you really say that Linear Congruential Generators have bad distribution? They literally have perfect distribution in practice. Distribution isnt their flaw. Their primary flaw is that n-tuples of their sequence fall on simple linear n-dimensional hyperplanes. An improvement is to temper the output. The low period of the lower order bits isnt a flaw either. The flaw there is using the entire state. There is no known method of sequence generation that is more efficient than tempered LCG's that also performs better on statistical tests like bigcrush. It is now also known that elaborate chaining of LCG's, like in the case of the Mersenne Twister, is statistically inferior to simple tempered LCG's.

    • @KeithPeters
      @KeithPeters 4 роки тому

      This is an epic comment. Thanks!

  • @ngroy8636
    @ngroy8636 4 роки тому +2

    13:37 : are you saying that you can see repeats in a higher dimension? can you emphasis on that idea? Thank you!

  • @stefanodomeni
    @stefanodomeni Рік тому +3

    Why is it so difficult for professors to just teach like this in school

  • @EntangledFrequency
    @EntangledFrequency 8 років тому +4

    Very useful! Particularly that starting to get into openCL and need a PRNG on GPU is important for what I want to do.

  • @kushclient5010
    @kushclient5010 2 роки тому

    a "TRNG" using light is more of just a "CRNG" for a like chaotic random number generator, because it's just something so unpredictable it's hard to figure out. If you had the same light with everything being the same, it would give the same response. hence it not being a true random number generator.

  • @benjamindeworsop8348
    @benjamindeworsop8348 6 років тому +1

    brilliant and clear video - super helpful

  • @GurlNamedBrettMarie
    @GurlNamedBrettMarie 4 роки тому

    What about an app that picks numbers 1 through 75 with 15 lines. How can I tell which line fills up first?

  • @rismorismo
    @rismorismo 8 місяців тому

    So good presentation!!! Thanks!

  • @NunyaBizznezz6969
    @NunyaBizznezz6969 Рік тому

    I wanted random in minecraft.. Put a pressure plate in my cow pen. When the cow happens across it, feels pretty random

  • @Kokurorokuko
    @Kokurorokuko 3 роки тому +2

    I'm watching this with reversed colors so it isn't so bright and this dude says "it might go all black" @9:25 and I'm like "you trippin dawg, that's white"

  • @vincentcleaver1925
    @vincentcleaver1925 4 роки тому

    This has been very helpful. I'm writing dirty JS in html pasted into my blog... 3js is not an option for me to do 'eeal' 3D, but I have been using '2 and a half' D and PR# for procedural world map generation etc. I wish you had a patreon, I'd like to pay you back

  • @issacthompson330
    @issacthompson330 3 роки тому +2

    Personally, I want to make an RPG where if the player wanted to, they could predict the RNG with a little effort as the number that affects the seed is a combination of all the character stats that are publicly available.

  • @kevnar
    @kevnar 5 років тому

    If only we could harness the chaos of internet conspiracy theorists to seed a random number generator.

  • @MiserableDuck95
    @MiserableDuck95 4 роки тому

    How is it determined which of the generated seeds will be returned to the user as the "random number"

  • @anwiseru9064
    @anwiseru9064 5 років тому +2

    good presentation. i enjoyed the video!

  • @yimoawanardo
    @yimoawanardo 8 років тому +2

    Very useful lesson ! Thanks !

  • @morgansommers5238
    @morgansommers5238 2 роки тому

    can this be applied to MATLAB as well?

  • @tantangurm
    @tantangurm Рік тому

    Awesome content. Kudos

  • @grimreaper5295
    @grimreaper5295 4 роки тому

    my question is how did you get those inputs to work. like how did the program you use understand what seed meant for the input value?

    • @johnmcdaniels9231
      @johnmcdaniels9231 4 роки тому +2

      seed is just a variable name.. it could have been anything. he was telling the program what to do with it

  • @subhashsarangi
    @subhashsarangi 6 років тому +1

    How to do that pattern visualization in python3

  • @Ozterkvlt
    @Ozterkvlt 7 років тому

    shouldnt you be getting an overflow eventually working with an M the size of 2^31?

  • @gamesniper98
    @gamesniper98 5 років тому

    what tool do u use

  • @smashinglabu3942
    @smashinglabu3942 6 років тому +1

    20, 8, 6, 15, 35, 6, 10, 5, 20, 23, 14, 28, 28.....

    • @inventor15
      @inventor15 5 років тому

      Do you have more sample data?

  • @halvedbagel5827
    @halvedbagel5827 7 років тому +3

    great video!
    thanks for sharing!

  • @peter4210
    @peter4210 4 роки тому

    a true Random number can actually clump and give a set that is not close to the theological probability. PRNG are actually going to give something closer to the theoretical probability

  • @johnconley4955
    @johnconley4955 3 роки тому +2

    Whenever I get stuck with something Math, I'm with Keith. So here I am again(⓿_⓿) at stupid o'clock. Hope you are well Keith

    • @hiranga
      @hiranga 3 роки тому

      i dont rly know how to code but I was wondering if there's a simple way to convert this into python?

  • @mirriamjulile9738
    @mirriamjulile9738 2 роки тому

    How to find the Seed for the first time?

  • @kamoroso94
    @kamoroso94 8 років тому

    Isn't the formula used in the Linear Congruential Generator similar to one you may use for hashing?

    • @KeithPeters
      @KeithPeters 8 років тому +1

      Probably. My understanding of hashing is combining existing data with repeatable random data. Hash the same data with the same seed, you get the same result.

    • @Huststyler
      @Huststyler 8 років тому

      Yes I've seen something similar except with bitwise operations and modulus.

  • @GlennCrinerLA
    @GlennCrinerLA 6 років тому +2

    do lottery machine use this??

    • @elucified8883
      @elucified8883 5 років тому +1

      EXACTLY,,They do..
      If you somehow get to know about the parameters (multiplier, increment , modulus and seed) You might get to know about the winning lottery number as well.😁
      ua-cam.com/video/aZbEF1aduok/v-deo.html

  • @Maxime78Paris
    @Maxime78Paris 7 років тому

    slot machines are based on pseudo random generators and "pseudo" because a machine that has a predefined payback rate to the players can by definition not be random. However if you're able to notice or being aware enough to understand that you re in a repeating cycle (bad cycle) then would you be able to apply it to slot machines by leaving a slot machine for another hoping for better winning odds based on the fact that you just left a loosing slot machine (repeating loosing cycles) for another machine that could possible be in a good cycle ? therefore you d have saved money by not feeding a machine that would not have given anything back from the cycle ?

  • @peichen3332
    @peichen3332 7 років тому +1

    Thank you sir

  • @rockonyo100
    @rockonyo100 7 років тому +2

    Awesome.Thanks :)

  • @jakobb.4214
    @jakobb.4214 2 роки тому

    cool video

  • @bryan8r237
    @bryan8r237 2 роки тому

    you hacked the eddie

  • @bluenation989
    @bluenation989 6 років тому +1

    Sir please can I get your email

  • @keithwallace5277
    @keithwallace5277 5 років тому

    subscriiiiibing

  • @pustai1627
    @pustai1627 3 роки тому

    I was the like #999 :(( but super usefull vid

  • @kebekbutcher
    @kebekbutcher 4 роки тому +1

    3:08 so we won't talk about the real RNG??? WTF is this video...

    • @kebekbutcher
      @kebekbutcher 4 роки тому

      I am still watching the rest of the video, but wtf at that point... I had to make that comment, let's see what is next...

    • @theboiyoulove5124
      @theboiyoulove5124 4 роки тому

      @@kebekbutcher Bro real RNG's are dependant on the hardware.
      What i meant by that is that there is some kind of special hardware which detects various things like the temperature the radioactive waves etc. These numbers are random,using this they create truly random numbers.
      Hope that helps!