Need for predictable random generator

前端 未结 30 1038
情话喂你
情话喂你 2020-11-27 09:04

I\'m a web-game developer and I got a problem with random numbers. Let\'s say that a player has 20% chance to get a critical hit with his sword. That means, 1 out of 5 hits

30条回答
  •  [愿得一人]
    2020-11-27 09:26

    You've got a misunderstanding of what random means.

    Which of these is more random?

    While the second plot looks more evenly distributed, the more random is actually the first plot. The human mind often sees patterns in randomness, so we see the clumps in the first plot as patterns, but they're not - they're just part of a randomly selected sample.

提交回复
热议问题