Why is it hard for a program to generate random numbers?

后端 未结 26 3508
自闭症患者
自闭症患者 2020-12-15 05:38

My kids asked me this question and I couldn\'t really give a concise, understandable explanation.

So I\'m hoping someone on SO can.

26条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-15 06:21

    It is relevant to note that humans perform very poorly at generating random numbers. Computers are worse because they just follow a strict set commands. Humans can only generate good (pseudo) random numbers when following an algorithm, a set of commands. Computers are the same.

    Although it should be noted that computers can gather entropy from the "environment" connected to it, like keyboard and mouse actions, what aids in generating random numbers (either directly or by seeding a PRNG).

提交回复
热议问题