Re:Evolutionary Algorithm: Evolving "Hello, World"
by tomjen3 on Wednesday September 28, 2011 @07:38AM
(#3047376)
Somebody actually did that, in Lisp, to be able to write a hello world program in a completely fucked out language.
The problem with just generating a hello world program is that there is no guarantee that you wont end up with a bunch of endless loops.
Re:Evolutionary Algorithm: Evolving "Hello, World"
by rmc on Wednesday September 28, 2011 @06:33AM
(#3047230)
A lot of programmes have a regular grammer & parsers for their language. You can then use parsers and the like to turn a tree into a source code (and vice versa) and evolve programmes.
Re:Evolutionary Algorithm: Evolving "Hello, World"
by user24 on Wednesday September 28, 2011 @07:05AM
(#3047290)
yeah I think genetic programming is often done with Lisp.
Re:Evolutionary Algorithm: Evolving "Hello, World"
by dmoney on Wednesday September 28, 2011 @07:35AM
(#3047369)
I don't see a reason to write the genetic algorithm in Lisp, but for the code that's being evolved it seems like the logical choice due to its minimal syntax. I'm working on a PHP program for evolving programs, and the evolved programs are in a lisp-like dialect made for just that purpose.
Re:Evolutionary Algorithm: Evolving "Hello, World"
by user24 on Wednesday September 28, 2011 @07:41AM
(#3047382)
IIRC it's something to do with the fact that lisp can easily be represented as a tree and so crossover is very simple; just swap branches. I don't know lisp so I'm just regurgitating info I picked up at university.
But for a minute there I was hoping that the OP was going to evolve an actual "hello world" program. That might be an interesting exercise to do over a Lisp-like language.