Half a croissant, on a plate, with a sign in front of it saying '50c'
h a l f b a k e r y
Strap *this* to the back of your cat.

idea: add, search, annotate, link, view, overview, recent, by name, random

meta: news, help, about, links, report a problem

account: browse anonymously, or get an account and write.



Word Macro Evolution Simulation

No need for the infinite monkeys.
  [vote for,

Word is pretty nifty. It has a set of rules by which it evaluates the grammatical goodness of a given sentence. It has a spellchecker. It has a powerful macro language.

I propse these features could be used to build an evolution simulator.

One would start with a block of text. Possible mutations and the frequency with which they occur would be programmed in - the possibilities should be wide and the frequency of each should be mutable as well. These would parallel genetic mutations: substitutions / deletions and duplications of letters, words, sentences and entire blocks of text.

From a parental text, the macro would generate 9 mutant versions (and one descendant that was a copy of the parent). After undergoing mutation, the selection pressure would be the Word grammatical editor. Sentences that are flagged for any reason are cut and pasted at the end of the text: they become junk DNA (which can be an important source for mutational novelty). The total length of the remaining grammatically passable text would be the condition for proceeding to conceive the next generation. Each group of mutants would be saved as text files (to save space). One could run many generations then marvel at the end result.

Reproduction as described would be asexual. However sex would not be hard to incorporate using the compare files function: two different iterations are compared and the differences randomly resolved in favor of one or the other. Does text sex yield improved grammatic fitness when compared to asexual reproduction? Other aspects like chromosomes etc would likewise be easy to include.

The only problem I have is total grammatic text length as the only test of genetic fitness. A very fit text could be (probably would be) nonsensical. But one could imagine other tests of fitness. For example, periodic generations of text could be posted to the web and readers could vote on which was the best. Such interruptions by a different set of evolutionary pressures would mimic stochastic evolution.

As an aside, there are many propositions for computer simulated evolution on the HB (eg: EVLU), but they are widely scattered. They may be worth assembling under a new category.

bungston, Mar 23 2007

Darwinian Poetry http://www.codeasar.../poetry/darwin.html
Poems created by natural selection [imaginality, Mar 23 2007]

Viral Sentences http://www.lycos.co...las-hofstadter.html
you really need to read the book itself [xenzag, Mar 23 2007]

Coin Toss Method of Programming Coin_20Toss_20Method_20of_20Programming
[quantum_flux, Jan 12 2008]

Robot Poetry http://techcrunch.c...of-art-or-whatever/
[theircompetitor, Feb 03 2014]


       Great! I'd love to see the output of this thing. Who can code this?
wagster, Mar 23 2007

       Have a sort of gene supressor that kills off anything not found in, say, the Bible, and see how long it takes you to get a nearly complete version.   

       And on the half day, God said 'Let there be buns'.
daseva, Mar 23 2007

       Nifty. Reminds me of the Darwinian poetry site (linked; you can't create new poems any more, but you can see lots of examples and discussion on the discussion boards, and read the how-it-works). Poems were produced by breeding earlier poems, with mutation and speciation built in. Users voted for their preferred poem out of two each time, with the worse one being culled.   

       From my experience of it when it was running live, 60% of the poems produced made no sense, 30% were vaguely surreal, and 10% were actually rather poetic.
imaginality, Mar 23 2007

       /the same correct sentence repeated 500 times/   

       I thought of this too. I think the grammar editor catches things like that. I do not think it would catch the same alternating 2 sentectes though. But this is an example of the rules of fitness - if it meets the rules, its in.   

       /compare the children with the parents / Yes, that is why the 10th offspring is a replica - too keep parental genomes that are fit.   

       It occurs to me that such a program could be used to generate programs that themselves can be tested for fitness - for example codes for a robot from Robot Battle, randomly varying from the starting point of a single robot. I think it will be very tough for evolution to best an intelligently desgined robot, but it would probably produce robots that compete in surprising ways.
bungston, Mar 23 2007

       [Bungston] you should read "Metamagical Themas" by Douglas Hofstadter. It's a wonderful book and the first chapters are about, inter alia, Viral Sentences. Will put in a link about these if I can find.
xenzag, Mar 23 2007

       I will add it to my current amazon order.
bungston, Mar 23 2007

       Still musing over this one. A different way to introduce other evolutionary pressures within the same format would be to usse modules from other languages. For example, in addition to grammatical goodness in english, the generation of mutants would be tested for grammatical goodness in french.   

       I think of this as like fish leaving the water - there would come some random phrase in an originally english text which passed muster in french, and this would beget a line of french texts. The genome of these french texts would contain a lot of junk text in english, betraying the heritage of the text in question - just as we humans have a tremendous amount of genetic baggage junk and otherwise which was once important for our predecessors, but not now.   

       I can imagine that in a macro simulator which had several language niches, it might be easier to colonize other romance languages once you were esconced in one of them. Some languages, like Finnish, would be hard to colonize no matter what.
bungston, Mar 26 2007

       So I've always been troubled by the mental image of monkeys typing Shakespeare. This idea inspired me to make my own little experiment in this theory. I started with a grand plan to randomly type the Bible using any valid Word character, but while programming, quickly reduced it to "Write BOB using uppercase alphabet characters (ASCII 65-90)". It only took 2647 tries the first time. Interestingly, every other 3 letter word I could think of was in the first 1000 randomly generated set of words, except AND and BOB. But, after 100,000 tries, I was not able to generate SCOTT or any other 5 letter word I could think of (using the "Find" command). This seems discouraging. I think tonight's research will be to 1) test various length words and calculate the average number of tries to generate them, use an exponential curve fit to see if I can calculate the number of tries to make a word of any given length. 2) Add additional characters to the random character pool to see how this influences the number of required tries before success.
cblunds, Mar 28 2007

       How about selection based on sending the text out as email and seeing how much money comes in?
Ford, Jan 11 2008


back: main index

business  computer  culture  fashion  food  halfbakery  home  other  product  public  science  sport  vehicle