Is there an algorithm which gets incrementally "smarter" as it runs? Mind the following program:

n = 0
best = 0
while (true):
  if (hash(n) &gt; best):
     best = hash(n)
  ++n


If you leave this program running for 10 years, when you come back you'll have a n : N such that hash(n) is really, really big. If someone ever needed a proof of ∃ n : ℕ . hash(n) &gt; K, you could probably sell/provide it to him. In a way, as time passed, that program became incrementally smarter at proving statements of this specific shape. In a way, you could say it was generating knowledge. Obviously, the knowledge generated by that program is very specific and probably useless. 

What I want to know is: is there any "generic" way to convert "computing power" in "knowledge"? In other words, is there an algorithm that, as it evolves, becomes incrementally more efficient at proving arbitrary statements? 

More formally, given a function A : {0,1}* -&gt; Theorem -&gt; Maybe Proof (which attempts to prove a theorem given some knowledge), and an heuristic H : {0,1}* -&gt; A -&gt; Number (which estimates the efficiency of A at proving arbitrary statements given a specific knowledge), does there exist a P : {0,1}* -&gt; {0,1}* such that ∀ n : ℕ . ∀ m : ℕ . n &gt; m ⇒ H(P^n(∅)) &gt; H(P^m(∅))?
Let's assume you're working on a toy programming language Flarp late at night and someone whispers in your ear a great deal of its particular Chaitin's Omega and you're clever enough to realize what you've got and type it down. 

You could then write a special interpreter function F and a little script that enumerates Flarp programs and runs them as follows (from the wikipedia page):


  Given the first n digits of Ω and a k≤n, the algorithm enumerates the
  domain of F until enough elements of the domain have been found so
  that the probability they represent is within 2−(k+1) of Ω. After this
  point, no additional program of length k can be in the domain, because
  each of these would add 2−k to the measure, which is impossible. Thus
  the set of strings of length k in the domain is exactly the set of
  such strings already enumerated.


As your algorithm ran and enumerated more and more programs, the size of programs for which you can solve the halting problem will grow as well, allowing you answer many interesting questions like Goldbach's conjecture, etc.

(obviously this answer is a bit of a joke. I'm also not an expert on any of the above and may have misrepresented things)