Given list of fixed numbers from a mathematical constant such as Pi, is it is possible to train AI to attempt to predict the next numbers?

Which AI or neural network would be more suitable for this task?

Especially the one which will work without memorizing the entire training set, but the one which will attempt to find some patterns or statistical association.

  • $\begingroup$ That's going to depend on the PRNG algorithm. A good one would be completely unpredictable if you didn't know its state/seed. $\endgroup$
    – Ben N
    Aug 3 '16 at 18:22
  • $\begingroup$ I've narrowed down the question to Pi constant, I hope that helps. $\endgroup$
    – kenorb
    Aug 9 '16 at 10:03
  • $\begingroup$ As a mathematician, I really don't understand what your new question is/means. It is a well known conjecture that every string of (decimal) numbers/digtis appears infinitely many times in pi, so the next numbers could be anything. Also, there is a formula that allows us to calculate the nth (binary) digit of pi without knowing those before that, but finding the location of a string requires more since we can't use that formula backwards. $\endgroup$
    – wythagoras
    Aug 12 '16 at 10:39
  • $\begingroup$ @wythagoras I mean that maybe ANN can detect some pattern where we humans can't. $\endgroup$
    – kenorb
    Aug 12 '16 at 10:52

Pseudo-random number generators are specifically defined to defeat any form of prediction via 'black box' observation. Certainly, some (e.g. linear congruential) have weaknesses, but you are unlikely to have any success in general in predicting the output of a modern RNG. For devices based on chaotic physical systems (e.g. most national lotteries), there is no realistic possibility of prediction.

"Patterns or statistical association" is a much weaker criterion than 'prediction'. Some very recent work has applied topological data analysis to visualize patterns within the infamous Randu RNG.


You would probably have to pack recursive structures into finite-dimensional real vectors and there have been such attempts. The finite precision limits goes as far as the recursion can go.

The limitation of feedforward neural networks is restricted to finite input and output spaces, so recurrent may be more suitable for this task as in theory can process arbitrarily long strings of numbers, but it has much more practical difficulties than feedforward network.

These kind of methods are open to debate.

Source: SAS FAQ


  • Blair, 1997; Pollack, 1990; Chalmers, 1990; Chrisman, 1991; Plate, 1994; Hammerton, 1998; Hadley, 1999

Not the answer you're looking for? Browse other questions tagged or ask your own question.