Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 3:08 am
All times are UTC + 0
pesodu random number generator
Moderators: Global Moderators, Offtopic Moderators
Post new topic   Reply to topic Page 1 of 1 [4 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Dupl3xxx
Commander


Joined: 22 Aug 2006
Location: somewhere south of the north pole

PostPosted: Tue Apr 20, 2010 9:00 am    Post subject:  pesodu random number generator
Subject description: Trying some stuff
Reply with quote  Mark this post and the followings unread

I have made a pesodu random number generator.
It outputs numbers between 0 and 1000.
Now I could use some help. Is there an easy way to get statistics of how often each number apperes? Currently, it outputs all the number into a textfile in tha same dir as the exe is placed.
Also, can some of you comfirm that it doesn't start reapiting itself after 100 000 numbers?

-Dupl3xxx



Random number 02.zip
 Description:
The exe is inside this zip :D

Download
 Filename:  Random number 02.zip
 Filesize:  158.16 KB
 Downloaded:  69 Time(s)


_________________
This is a signature

Back to top
View user's profile Send private message Visit poster's website
Clazzy
Karma Police


Joined: 26 Nov 2002
Location: Algae Colony On Mars

PostPosted: Tue Apr 20, 2010 10:01 am    Post subject: Reply with quote  Mark this post and the followings unread

It seems biased towards three. I suppose it depends on your definition of random. I'm guessing you'd want it to be an even distribution?

See the image I attached for the distribution of numbers. If you want to know how I did it, this is what I did in OpenOffice to get the number frequency.



graph.png
 Description:
 Filesize:  6.12 KB
 Viewed:  1526 Time(s)

graph.png



_________________
Quote:
This is sexier than what this forum was supposed to tolerate. - Banshee

Back to top
View user's profile Send private message
Dupl3xxx
Commander


Joined: 22 Aug 2006
Location: somewhere south of the north pole

PostPosted: Tue Apr 20, 2010 12:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thank you for the tip and graph! Looks like it is quite even, but as you mention, it likes 3. Have been a thing since the begining...

Again, thank you!

EDIT:
After some testing and tweaking, I fond that I can make my app generat random numbers withinn a 0.7% margin form perfect distribution. That is, as long as I set the highest number it shuld output to a primenumber minus one.

With other words: It can generate evenly distributed numbers if the highest number is to output is 4 (5-1), 6 (7-1), 10 (11-1), 12 (13-1) and so on. Any tips as to what I can do with that?

_________________
This is a signature

Back to top
View user's profile Send private message Visit poster's website
Clazzy
Karma Police


Joined: 26 Nov 2002
Location: Algae Colony On Mars

PostPosted: Tue Apr 20, 2010 3:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

Generate trillions of dice throws for prime number-sided dice?

_________________
Quote:
This is sexier than what this forum was supposed to tolerate. - Banshee

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1739s ][ Queries: 14 (0.0102s) ][ Debug on ]