Announcement

Collapse
No announcement yet.

Random Float Making Predictable Results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Random Float Making Predictable Results

    I ran a little experiment.
    This program creates 4 random floats between 75 and 100 and than adds them up. The average result should be 400.
    It repeats it a great number of times (500 in my case). Than it tells the player how runs were above the 400 average and how many were at or below the 400 average

    It's a dead even 50/50 split. Even if I have it run 10,000 cycles it's still a 50/50 split.

    This is not a problem for me but I think it should be reported and people should be aware of it.
    Attached Files

    #2
    Hello,
    Why do you use "above 400" to set "not above 400" and "not above 400" to set "above 400" Wouldn't it be inverted to have the right result ?
    Edit : And from 75 to 150 * 4 : 300 to 600, i think average is 450.
    Last edited by Fen; 05-09-2015, 05:12 AM.

    Comment


      #3
      This is just the nature of the best when it comes to random number generators. What you could do is change the seed at the start of play. Perhaps generate a new GUID and feed that into the seed?

      Comment

      Working...
      X