Body: <p>I have a homework. The task is to decide, if the PRNG generated lottery is attackable/crackable or not.</p>
  <h2><strong>Details:</strong></h2>
  <p><strong>Lottery</strong>:
  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.</p>
  <p>For example:</p>
  <ul>
  <li>A: [3,    5,  6,  7,  10, 13, 17, 18]</li>
  <li>B: 2</li>
  </ul>
  <p><strong>Possible dependent variables:</strong>
  <em>Timestamp</em>, <em>DrawNum</em> (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))</p>
  <p><a href="https://i.sstatic.net/qINZY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qINZY.png" alt="enter image description here" /></a></p>
  <p>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.</p>
  <p>What do you think? How would you predict the next set of numbers?
  Which ML algorithm is the best for this use case?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-01T14:39:23.900Z
Comments.Text: 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.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-02T08:32:12.103Z
Comments.Text: @NeilSlater Thank you. I will start with that. If it is not truly random, what would be your approach?
Comments.UserDisplayName: JoKeR
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-02T13:03:17.753Z
Comments.Text: 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.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-02T13:04:03.877Z
Comments.Text: 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.
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-02T13:07:31.783Z
Comments.Text: 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
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-31T07:31:46.453Z
Comments.Text: Any PRNG is not truly random, and should in theory be crackable. Since most are based on the seed, its importand to find the current seed value and the boolean operators that it uses. You can use ML to find the later as well.
Comments.UserDisplayName: Natural Number Guy
Tags: <neural-networks><machine-learning><long-short-term-memory><prediction>
Title: Which ML algorithm is the best for predict the next PRNG generated numbers?
UserDisplayName: JoKeR
ThreadText: # Which ML algorithm is the best for predict the next PRNG generated numbers?
  
  (Asked by: username_0 on 2021-12-01)
  
  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))
  
  [![enter image description here](https://i.sstatic.net/qINZY.png)](https://i.sstatic.net/qINZY.png)
  
  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?
  
  **Tags:** neural-networks, machine-learning, long-short-term-memory, prediction
  > **Comments:**
  > **username_1**: 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.  
  > **username_0**: @NeilSlater Thank you. I will start with that. If it is not truly random, what would be your approach?  
  > **username_1**: 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.  
  > **username_1**: 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.  
  > **username_1**: 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  
  > **username_2**: Any PRNG is not truly random, and should in theory be crackable. Since most are based on the seed, its importand to find the current seed value and the boolean operators that it uses. You can use ML to find the later as well.  
  
  ---
  
  ## 0 answers
  
  