3 ms·
As CPU excess increases, I guess I've always thought that eventually code blocks could be grown using genetics inspired algorithmic processes that could just tr
by th0ma5 15y ago
As CPU excess increases, I guess I've always thought that eventually code blocks could be grown using genetics inspired algorithmic processes that could just try everything possible until something works well.
- andreyf 15y agoSounds like you're talking about genetic programming: https://en.wikipedia.org/wiki/Genetic_programming https://en.wikipedia.org/wiki/Genetic_programming
- judofyr 15y agoIt took the universe 13.7 billion years and an ever-expanding memory space; I'm not entirely sure if this is the right approach…
- MattRogish 15y agoIsn't that just BogoSort? :) http://en.wikipedia.org/wiki/Bogosort http://en.wikipedia.org/wiki/Bogosort
- RodgerTheGreat 15y agoTo some extent this is already done in a process called "Superoptimization"[1]. In that case, though, correct code is used as a rigorous functional specification, and the Superoptimization process will replace segments with shorter or faster opcode sequences with identical side effects. [1] http://en.wikipedia.org/wiki/Superoptimization http://en.wikipedia.org/wiki/Superoptimization
- jules 15y agoYou are underestimating the rate at which the number of possibilities to be searched explodes exponentially. Read the paper on Denali, an optimizer that conceptually tries all possible instruction sequences to compile a piece of a program optimally. Even though they used sophisticated pruning techniques and state of the art combinatorial solvers it didn't work for anything beyond a couple of instructions (less than 10), and AFAIK nothing practical ever came of it. Say you can currently successfully synthesize instruction sequences of length 6. The thing with exponential growth is that even if computers became a million times faster, then you might be able to achieve instruction sequences of length 9, not of length 6 million.