Live data from Hacker News

Genetic brainfuck programming

github.com

1–10 of 31 posts

Re: Genetic brainfuck programming

#2
It's been a decade since I have written a BF program, but if I'm not mistaken, the winning strand in the gif example has quite a bit of dead code, for example here:

[[]++,]

This entire loop must always be skipped, because if entered, the inner [] loop will also enter, and run indefinitely.

It would be cool to run it through more iterations, to get to the local minimum of length, rather than just a correct program.

Re: Genetic brainfuck programming

#3

It's been a decade since I have written a BF program, but if I'm not mistaken, the winning strand in the gif example has quite a bit of dead code, for example here: [[]+ +,] This entire loop must always be skipped, because if entered, the inner [] loop will also enter, and run indefinitely. It would be cool to run it through more iterations, to get to the local minimum of length, rather than just a correct program.

With genetic code you’ll also get junk code, exactly as it happens for DNA :)

Re: Genetic brainfuck programming

#4
post #3

It's been a decade since I have written a BF program, but if I'm not mistaken, the winning strand in the gif example has quite a bit of dead code, for example here: [[]+ +,] This entire loop must always be skipped, because if entered, the inner [] loop will also enter, and run indefinitely. It would be cool to run it through more iterations, to get to the local minimum of length, rather than just a correct program.

With genetic code you’ll also get junk code, exactly as it happens for DNA :)

(I mean, pieces of junk code)

Re: Genetic brainfuck programming

#5

It's been a decade since I have written a BF program, but if I'm not mistaken, the winning strand in the gif example has quite a bit of dead code, for example here: [[]+ +,] This entire loop must always be skipped, because if entered, the inner [] loop will also enter, and run indefinitely. It would be cool to run it through more iterations, to get to the local minimum of length, rather than just a correct program.

Yeah, the next thing planned for it is user-settable hunger. Then, making more and more efficient code is simply a matter of following the unix philosophy

corvus -h 500 | corvus -h 300| corvus -h 200

So on and so forth as you get closer to [,.]

The dead code part was a organic artifact, and I actually don't think that I want to change that part. It sorta makes you wonder about how much dead code is in real DNA.

Re: Genetic brainfuck programming

#6
post #5

It's been a decade since I have written a BF program, but if I'm not mistaken, the winning strand in the gif example has quite a bit of dead code, for example here: [[]+ +,] This entire loop must always be skipped, because if entered, the inner [] loop will also enter, and run indefinitely. It would be cool to run it through more iterations, to get to the local minimum of length, rather than just a correct program.

Yeah, the next thing planned for it is user-settable hunger. Then, making more and more efficient code is simply a matter of following the unix philosophy corvus -h 500 | corvus -h 300| corvus -h 200 So on and so forth as you get closer to [,.] The dead code part was a organic artifact, and I actually don't think that I want to change that part. It sorta makes you wonder about how much dead code is in real DNA.

A vast fraction of DNA is thought to be junk code, actually. Some of it is even believed to be remnants of viruses that inserted themselves into human DNA.

Re: Genetic brainfuck programming

#8
As someone with a background in computer programming, I found biology quite frustrating. I wanted to see some underlying structure or meaning in the genetic code. It took me a long time to realize that it wasn't there. Biological systems and their genetic codes are the result of random trial and error filtered through Natural selection. Biological systems clearly have a design because you see the same "form" reappear in each generation, but the design itself is completely random. In other words, the design has to work, but it does not have to be sensible.

To summarize, the design of biological systems is random. It was a hard pill for me to swallow, and an utterly dissatisfying one at that.

Re: Genetic brainfuck programming

#9
post #8

As someone with a background in computer programming, I found biology quite frustrating. I wanted to see some underlying structure or meaning in the genetic code. It took me a long time to realize that it wasn't there. Biological systems and their genetic codes are the result of random trial and error filtered through Natural selection. Biological systems clearly have a design because you see the same "form" reappear…

> To summarize, the design of biological systems is random. It was a hard pill for me to swallow.

There are so many things about our universe that are very non-random, such as the physical laws, and more specifically the spherical shapes of planets/stars, the flatness of their surfaces, the flow of energy from stars to planets, etc.

An analogy could be that life forms randomly evolving with these constraints are like water particles randomly floating through a river. There are plenty of variations in where the particles can go, but they flow in a general direction.

Re: Genetic brainfuck programming

#10
post #8

As someone with a background in computer programming, I found biology quite frustrating. I wanted to see some underlying structure or meaning in the genetic code. It took me a long time to realize that it wasn't there. Biological systems and their genetic codes are the result of random trial and error filtered through Natural selection. Biological systems clearly have a design because you see the same "form" reappear…

> To summarize, the design of biological systems is random. It was a hard pill for me to swallow. There are so many things about our universe that are very non-random, such as the physical laws, and more specifically the spherical shapes of planets/stars, the flatness of their surfaces, the flow of energy from stars to planets, etc. An analogy could be that life forms randomly evolving with these constraints are like…

I guess I was trying to draw a distinction between biological systems and man made machines. I find the difference striking. I can look at a car engine, and if I stare at it long enough, I can make sense of it. The engine makes sense to me not just because it was designed by another human but also because its design is non-random. When I stare at the protein KcsA, which is the biological system that I study, I cannot make sense of its design. My conclusion is that its design is an outcome of chance. The protein works and has a design but it is not one that I can figure out.

Man made machines have a rational design. Biological systems have an "irrational" design. The most striking characteristic of a randomly designed system is that you cannot restart it. Once you shut it off it dies permanently.

Post reply on HN