wfcirilo / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

UniformGenerator using a seed of 0 #390

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Describe the feature you are interested and which may bring benefit to the
project ...

I have been using the Genetic Algorithm and Math.Random. I noticed that the 
UniformGenerator() uses a seed of 0 if you do not specify a seed. This causes 
the same set of random numbers to be generated every time. I would think that 
the user would specify a seed and keep it constant if they wanted to have the 
same set of random numbers. The current method is different from the .net 
Random() method that used Environment.TickCount if no seed if set. It took me a 
little while to figure out why my GA was finding the same solution every time. 

I would recommend consistency with the .net Random class.

Provide any references/links to publications/algorithms/etc. which could
help in development ...

Original issue reported on code.google.com by fcWhee...@gmail.com on 11 Sep 2014 at 6:17