# Which ML algorithm is the best for predict the next PRNG generated numbers?

I have a homework. The task is to decide, if the PRNG generated lottery is attackable/crackable or not.

## Details:

Lottery: There is a lottery game where you have to choose 8 numbers between 1-20 for the field A and choose 1 number between 1-4 for field B. It is generated every 5 minutes(7:05 - 22:00), so there are ~64k draws/year.

For example:

• A: [3, 5, 6, 7, 10, 13, 17, 18]
• B: 2

Possible dependent variables: Timestamp, DrawNum (It is between 85-264 every day. 7:05 is 85 because there are 425 minutes between 00:00 and 7:05. (425/5=85))

Unfortunately we don't have too much dependent variable and there is no clue for the PRNG algorithm. I think this two dependent variable is not enough to predict the numbers. I am thinking on an LSTM to predict the next 1stNum based on the previous ones and use the same model for the other numbers.

What do you think? How would you predict the next set of numbers? Which ML algorithm is the best for this use case?

• I don't think you need any ML here, but some data exploration and stats tests. See if you can reject the null hypothesis that the generated numbers are truly random. Dec 1, 2021 at 14:39
• @NeilSlater Thank you. I will start with that. If it is not truly random, what would be your approach? Dec 2, 2021 at 8:32
• If you find that it is not random, you can start with a simple bias towards the more likely values. If correlations between values are sophisticated, then you might benefit from some kind of AI-based approach that could help you find most-likely results. E.g. a GAN may be able to generate tickets that have higher probability of winning. Dec 2, 2021 at 13:03
• A completely different approach would be to try and reverse-engineer the PRNG in question. That is hard, not really approachable using current AI, it is more in the domain of cryptography. Dec 2, 2021 at 13:04
• For your stats tests you may want to look for correlations between values. If I were designing this homework, my first thought would be to correlate the PlusNum somehow with the draw. That may hide global variations from randomness, but be relatively easy to spot with some deeper analysis Dec 2, 2021 at 13:07