I am writing an application where I need a persistent random integer within a range for each day. The number should be different but persistent for each passing day. The output should be as uniform as possible, but distribution quality doesn’t have to be the best. I’d prefer a simple and “good enough” solution to this problem.
What kind of algorithm can I use for this?
Input: Current day (for example, an integer denoting days since some epoch)
Output: A random integer between X and Y
Thank you.
Edit: The platform I’m working in does not have a seeded PRNG implementation.
Algorithm:
Replace step three with a smarter algorithm if you want uniform probabilities.
EDIT: ok, you don’t have a PRNG. Then you might want to apply some hash algorithm to the current date and treat that as a random number.