Stanford Seminar - PCG: A Family of Better Random Number Generators

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

КОМЕНТАРІ • 28

  • @joshirth8400
    @joshirth8400 9 років тому +11

    The title from the description should be the title of the video. The currently used one isn't very descriptive. I only watched this video because it was linked elsewhere with a better title. I wouldn't have clicked on a " of " link.

  • @thomasoa
    @thomasoa 9 років тому +14

    I wish they had applied some filter to the audio to solve the occasional explosive buzz. Very irritating. But the content is great.

  • @katelikesrectangles
    @katelikesrectangles 9 років тому +4

    I really appreciate that this was low on maths, and very approachable given the subject matter. Thanks!

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

    Thank you Dr O'Neill. I'm still loving your PCG code.

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

    At 1:09:51 Dr. O'Neill states that the Intel RDRAND instruction was not using "transistor-based noise" but was moving to it soon. According to Intel's documentation (software.intel.com/content/www/us/en/develop/articles/intel-digital-random-number-generator-drng-software-implementation-guide.html), first published in 2014, and to the Wikipedia Article (en.wikipedia.org/wiki/RDRAND) on the Bull Mountain Technology, this is not the case.

  • @thorham1346
    @thorham1346 7 років тому +4

    Why is the C++ reference implementation of PCG so complicated?

  • @hagarbebado
    @hagarbebado 7 років тому +4

    at 1:03:08 how can a program produce different numbers without any source of randomness such as time, etc? Does anyone have a continuation for that teaser?

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

      I'm still searching for that.

    • @zuowang5481
      @zuowang5481 6 років тому

      I want to know the answer for the teaser too

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

      @@zuowang5481 Someone pointed at this in another commend: ua-cam.com/users/redirect?redir_token=_-xKHVuo_rUeoYjXwNAyy67eo_R8MTU3NzU4ODIzN0AxNTc3NTAxODM3&event=comments&q=http%3A%2F%2Fwww.pcg-random.org%2Fposts%2Fsimple-portable-cpp-seed-entropy.html&stzid=UghlNSo7dhEGZXgCoAEC.8FPv1Dlssr28Vw0p3BwX3l

    • @websnarf
      @websnarf 2 роки тому +1

      Well, if a single static program takes no external input, then all it can do is transform its start state to its end state. So from a "non-cheating" point of view, there is no way for a program to do what she claims.
      However, she only said "the program takes *no input*". She did not say that the program had to be the same on each run. So it's kind of stupid, but if the program simply outputs the results of a PRNG from a fixed seed, then launches a separate helper program, which waits for the first program to halt (so as to avoid OS protections that prevent a running program's binary from being modified) then rewrites the binary of the starting program to advance it's seed (via the same PRNG, I suppose) then I think that satisfies what she said.
      While cheesy, it also makes the point that a way to implement entropy is to start with a PRNG, let it remember its state, and just let it run iteratively forever. This solution has obvious problems, that I will let the reader think about, on the other hand, is not totally unsound. It certainly could be *part* of an entropy-gathering solution.

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

      I’d like to know the answer to this as well. Given the broad application, and thus the usefulness of such a mechanism, it doesn’t seem quite in the interest of educational sharing to withhold such information.

  • @8th-oneeffortmultipleplatf41
    @8th-oneeffortmultipleplatf41 9 років тому +1

    Very useful, thanks!

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

    Is that Rob Pike at 1:01:25?

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

    Good talk!

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

    How can a program, that takes no input at all, produce a different result each time you run it?
    This is from 1.03.00. This seems impossible, and the only ideas, both mentioned later in the video, are, either use the address space randomization, if your OS has it, or use the 'random' processor instruction like the newer Intels have.
    Did she mean one of those?

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

      I would also like to know about that, upvoted.

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

      Commenting so I'm notified about later replies.

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

      I think this must be it (her blog): www.pcg-random.org/posts/simple-portable-cpp-seed-entropy.html

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

      she was lying, she does use input in the form of internal computer states such as ids/ clock/ timestamps/ etc.

    • @DeNieuweBeelding
      @DeNieuweBeelding 3 роки тому +3

      @@stuffedk I don't think she's talking about this stuff: she rules out taking the system time, which in principle should rule out other kinds of internally generated inputs, which are the same basic concept. I suspect she's talking about a program that rewrites itself every time you run it. For example, it could be a PCG implementation which stores its state in the data segment of the binary, and which edits the binary to overwrite the old state with the new one.

  • @robertoa.ruizvial5917
    @robertoa.ruizvial5917 8 років тому +2

    wow!! ... your code is very very obfuscated, please re-encode. Too much MACROS ...: "the premature optimization ...

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

      It's not that easy to read, but I think the idea is to make it as fast as possible, so that you can inline and RNG as part of something else. Still, I wish someone would add a more readable version along the lines of the simple C implementation.

  • @michaelstekrt8031
    @michaelstekrt8031 2 роки тому +2

    The sound is fucking bad... Yo could invest for better post-editing

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

    When it comes to building a terrible random number generator, I will always consider "Algorithm K" to be the canonical standard.

  • @KamyarMohajerani
    @KamyarMohajerani 3 місяці тому

    Is it really expensive to compute “digits” of pi? en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula