title: Can any existing Machine Learning structures perfectly emulate recursive functions like the Fibonacci sequence?
body: <p><strong>To be clear</strong> I don't mean, provided the last two numbers in the sequence provide the next one:</p>
  
  <pre><code>(2, 3, -&gt; 5)
  </code></pre>
  
  <p>But rather given any index provide the Fibonacci number: </p>
  
  <pre><code>(0 -&gt; 1) or (7 -&gt; 21) or (11 -&gt; 144) 
  </code></pre>
  
  <p>Adding two numbers is a very simple task for any machine learning structure, and by extension counting by ones, twos or any fixed number is a simple addition rule. Recursive calculations however...</p>
  
  <p>To my understanding, most learning networks rely on forwards only evaluation, whereas most programming languages have loops, jumps, or circular flow patterns (all of which are usually ASM jumps of some kind), thus allowing recursion.</p>
  
  <p>Sure some networks aren't forwards only; But can processing weights using the hyperbolic tangent or sigmoid function enter <strong>any</strong> computationally complete state? </p>
  
  <p>i.e. conditional statements, conditional jumps, forced jumps, simple loops, complex loops with multiple conditions, providing sort order, actual reordering of elements, assignments, allocating extra registers, etc?</p>
  
  <p>It would seem that even a non-forwards only network would only find a polynomial of best fit, reducing errors across the expanse of the training set and no further.</p>
  
  <p>Am I missing something obvious, or did most of Machine Learning just look at recursion and pretend like those problems don't exist?</p>
  
  <hr>
  
  <p><strong>Update</strong></p>
  
  <p>Technically any programming language can be considered the DNA of a genetic algorithm, where the compiler (and possibly console out measurement) would be the fitness function.
  The issue is that programming (so far) cannot be expressed in a hill climbing way - literally, the fitness is 0, until the fitness is 1. Things don't half work in programming, and if they do, there is no way of measuring how 'working' a program is for unknown situations. Even an off by one error could appear to be a totally different and chaotic system with no output. This is exactly the reason learning to code in the first place is so difficult, the learning curve is almost vertical.</p>
  
  <p>Some might argue that you just need to provide stronger foundation rules for the system to exploit - but that just leads to attempting to generalize all programming problems, which circles right back to designing a programming language and loses all notion of some learning machine at all. Following this road brings you to a close variant of LISP with mutate-able code and virtually meaningless fitness functions that brute force the 'nice' and 'simple' looking code-space in attempt to follow human coding best practices.</p>
  
  <p>Others might argue that we simply aren't using enough population or momentum to gain footing on the error surface, or make a meaningful step towards a solution. But as your population approaches the number of DNA permutations, you are really just brute forcing (and very inefficiently at that). Brute forcing code permutations is nothing new, and definitely not machine learning - it's actually quite common in regex golf, I think there's even an xkcd about it...</p>
  
  <p>The real problem isn't finding a solution that works for some specific recursive function, but finding a solution space that can encompass the recursive domain in some useful way.</p>
  
  <hr>
  
  <p>So other than Neural Networks trained using Backpropagation <em>hypothetically</em> finding the closed form of a recursive function (if a closed form even exists, and they don't in most real cases where recursion is useful), or a non-forwards only network acting like a pseudo-programming language with awful fitness prospects in the best case scenario, plus the virtually impossible task of tuning exit constraints to prevent infinite recursion... That's really it so far for machine learning and recursion?</p>