Archived

This topic is now archived and is closed to further replies.

CTRL_ALT_DELETE

seeding a random number generator

Recommended Posts

Is there realy a need to re-seed a random number generator after a certain number of rand() calls if it is initially seeded with the time? It would seem to me that it should produce psedu random numbers forever, and the only way to duplicate those would be to seed it with the same exact number(the time) again. However, I recently heard that the generator "goes stale" and that it is a good idea to re-seed after a certain number of calls. Any thoughts on this?

Share this post


Link to post
Share on other sites
spock    217
quote:
Original post by CTRL_ALT_DELETE
I recently heard that the generator "goes stale" and that it is a good idea to re-seed after a certain number of calls.


If it does, it''s not a very good RNG and the proper cause of action would be to switch to a better generator.

Share this post


Link to post
Share on other sites