HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

What is the field studying the search and generation of computer programs?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
fieldthestudyingsearchwhatgenerationcomputerprogramsand

Problem

This Github repo hosts a very cool project where the creator is able to, give an integer sequence, predict the most likely next values by searching the smallest/simplest programs that output that integer sequence. I was trying to approach the same idea using lambda-calculus instead of a stack-based language, but I was stuck on the enumeration of valid programs on LC's grammar.

Anyway, what is the field studying that kind of idea and how can I grasp the current state-of-art?

Solution

What you are describing is a Kolmogorov complexity approach. The Kolmogorov complexity of an integer sequence (or a string) is the size of the minimal program computing it (in some fixed Turing-complete language). Here we're looking for the minimal program which generates $n+1$ numbers, the first $n$ of which are the given sequence.

Kolmogorov complexity is not computable - that is, one cannot compute the size of a minimal program computing a given sequence. The implementation you mention computes a restricted version of Kolmogorov complexity in which the programs are very simple (and always halt).

Another (non-computable) approach is the universal probability distribution in which a given integer sequence of complexity $x$ is given a probability in proportion to $2^{-x}$. By conditioning on the first $n$ numbers produced, we can construct a probability distribution on the next number. By restricting the set of programs, we can make this distribution computable (though perhaps not efficiently).

Context

StackExchange Computer Science Q#19605, answer score: 3

Revisions (0)

No revisions yet.