Register | Sign In


Understanding through Discussion


EvC Forum active members: 63 (9162 total)
4 online now:
Newest Member: popoi
Post Volume: Total: 916,352 Year: 3,609/9,624 Month: 480/974 Week: 93/276 Day: 21/23 Hour: 1/6


Thread  Details

Email This Thread
Newer Topic | Older Topic
  
Author Topic:   Evolution Generator Program
Admin
Director
Posts: 13014
From: EvC Forum
Joined: 06-14-2002
Member Rating: 1.9


Message 1 of 59 (571981)
08-03-2010 7:12 AM


Just starting the thread.

--Percy
EvC Forum Director

  
Percy
Member
Posts: 22473
From: New Hampshire
Joined: 12-23-2000
Member Rating: 4.7


Message 2 of 59 (571984)
08-03-2010 7:16 AM


Evolution Generator
I written a simple evolution generator program. You can find it here:
It is a much more accurate representation than Marshall's of what evolution is really like. ICANT referenced Perry Marshall's program over at the When does design become intelligent? (AS OF 8/2/10 - CLOSING COMMENTS ONLY) thread, see this reply to ICANT that has the link's to Marshall's program: Message 635
I would appreciate feedback on the program.
--Percy
Edited by Percy, : Clarify.

Replies to this message:
 Message 3 by Wounded King, posted 08-03-2010 9:01 AM Percy has replied
 Message 7 by Blue Jay, posted 08-03-2010 11:44 AM Percy has replied
 Message 8 by dwise1, posted 08-03-2010 12:31 PM Percy has replied
 Message 9 by Blue Jay, posted 08-03-2010 12:34 PM Percy has replied
 Message 10 by Aware Wolf, posted 08-03-2010 12:42 PM Percy has replied
 Message 11 by ICANT, posted 08-03-2010 1:15 PM Percy has replied
 Message 24 by CosmicChimp, posted 08-03-2010 10:45 PM Percy has seen this message but not replied
 Message 27 by ringo, posted 08-04-2010 2:03 PM Percy has replied

  
Wounded King
Member
Posts: 4149
From: Cincinnati, Ohio, USA
Joined: 04-09-2003


Message 3 of 59 (571993)
08-03-2010 9:01 AM
Reply to: Message 2 by Percy
08-03-2010 7:16 AM


Re: Evolution Generator
My first thoughts are that supervising every generation by hand is a bloody nightmare. For myself a scenario utilising a set of selection criteria to automatically select the sequences to go into the next generation would be far preferable.
My ideal output would be some sort of graph of generation against fitness/identity to target sequence, as well as an archive of all of the offspring and progeny from each generation. I definitely see the value of having every step in the process there for scrutiny, I just don't like having to do all the scrutiny myself every generation.
I appreciate that this approach doesn't allow you to vary the mutation rate generation by generation, but I'm not sure how useful that ability is anyway.
TTFN,
WK

This message is a reply to:
 Message 2 by Percy, posted 08-03-2010 7:16 AM Percy has replied

Replies to this message:
 Message 4 by Percy, posted 08-03-2010 9:17 AM Wounded King has replied

  
Percy
Member
Posts: 22473
From: New Hampshire
Joined: 12-23-2000
Member Rating: 4.7


Message 4 of 59 (571999)
08-03-2010 9:17 AM
Reply to: Message 3 by Wounded King
08-03-2010 9:01 AM


Re: Evolution Generator
Wounded King writes:
My first thoughts are that supervising every generation by hand is a bloody nightmare.
Yeah, you're right, but I wanted to be as similar to Marshall's program as possible, and with the number of matches displayed next to the select box I find I can go through 40 generations in five minutes with little problem, usually selecting between 2 and 4 strings to contribute to the next generation.
For myself a scenario utilising a set of selection criteria to automatically select the sequences to go into the next generation would be far preferable.
Agreed, and I hope to add an "automatic" option.
My ideal output would be some sort of graph of generation against fitness/identity to target sequence, as well as an archive of all of the offspring and progeny from each generation. I definitely see the value of having every step in the process there for scrutiny, I just don't like having to do all the scrutiny myself every generation.
I agree, but it takes it to another level of time committment, and then it gets out of the realm of what ICANT might possibly understand. An understandable illustration for the average layperson was my goal, something that when someone mentions Marshall's program you could come straight back with a link to my program. That's why I made sure they looked very similar.
I appreciate that this approach doesn't allow you to vary the mutation rate generation by generation, but I'm not sure how useful that ability is anyway.
I wouldn't have any problem varying the mutation rate automatically. One approach would be to track progress toward the goal and to reduce the mutation rate when it leveled off. Another approach would be to measure number of mutations against number of correct letters. Of course, you could quickly go through so many generations in an automatic mode that keeping the mutation rate high in the early stages wouldn't be necessary.
Another improvement would be to have multiple targets, which would bring the program a little closer to actual evolution. You would quickly observe that random changes early in the process would direct lines of descent toward different niches.
Wish I had serious time for this, there's so much that could be done.
--Percy

This message is a reply to:
 Message 3 by Wounded King, posted 08-03-2010 9:01 AM Wounded King has replied

Replies to this message:
 Message 5 by Wounded King, posted 08-03-2010 9:22 AM Percy has replied

  
Wounded King
Member
Posts: 4149
From: Cincinnati, Ohio, USA
Joined: 04-09-2003


Message 5 of 59 (572002)
08-03-2010 9:22 AM
Reply to: Message 4 by Percy
08-03-2010 9:17 AM


Re: Evolution Generator
Just out of interest what did you use for the program? Is this the front end of a perl script?
TTFN,
WK

This message is a reply to:
 Message 4 by Percy, posted 08-03-2010 9:17 AM Percy has replied

Replies to this message:
 Message 6 by Percy, posted 08-03-2010 9:27 AM Wounded King has seen this message but not replied

  
Percy
Member
Posts: 22473
From: New Hampshire
Joined: 12-23-2000
Member Rating: 4.7


Message 6 of 59 (572005)
08-03-2010 9:27 AM
Reply to: Message 5 by Wounded King
08-03-2010 9:22 AM


Re: Evolution Generator
Yeah, it's just Perl, but it could just as easily have been PhP. I'm faster in Perl.
--Percy

This message is a reply to:
 Message 5 by Wounded King, posted 08-03-2010 9:22 AM Wounded King has seen this message but not replied

  
Blue Jay
Member (Idle past 2716 days)
Posts: 2843
From: You couldn't pronounce it with your mouthparts
Joined: 02-04-2008


Message 7 of 59 (572032)
08-03-2010 11:44 AM
Reply to: Message 2 by Percy
08-03-2010 7:16 AM


Re: Evolution Generator
Hi, Percy.
I made the word "science" (actually "sCiEncE") in 54 generations, using 5 offspring per parent and 1 mutation per offspring. I also used a rule where I always selected 4 individuals to contribute to the next population.
What's interesting to me about it is that there seemed to be about three quirks:
  1. It took about 10 generations before I got my first matching letter.
  2. It took a long time (I can't remember how long) to get from 6 correct letters to 7.
  3. Once you get to the target sequence, it's impossible to drive it to fixation, because the offspring always mutate.
The first two I think are real quirks of evolution: the first template on which evolution could work would have to have been generated randomly, and fine-tuning (6 to 7 letters) would be hard to stabilize.
The last one might also be a real quirk of evolution (the difficulty of driving a trait to absolute fixation); but I think it's more a quirk of the generator. Maybe you could allow a range of mutations in each offspring, instead of saying exactly how many? So, instead of saying "1 mutation per individual," it could be "0-1" or "0-2."
I have no idea how difficult that might be to program, because I know nothing about programming.
{AbE: Also, maybe the possibility of a moving target sequence would make it more realistic?}
Edited by Bluejay, : Marked addition

-Bluejay (a.k.a. Mantis, Thylacosmilus)
Darwin loves you.

This message is a reply to:
 Message 2 by Percy, posted 08-03-2010 7:16 AM Percy has replied

Replies to this message:
 Message 12 by Percy, posted 08-03-2010 1:37 PM Blue Jay has not replied

  
dwise1
Member
Posts: 5945
Joined: 05-02-2006
Member Rating: 5.4


Message 8 of 59 (572050)
08-03-2010 12:31 PM
Reply to: Message 2 by Percy
08-03-2010 7:16 AM


Re: Evolution Generator
Basically looks like a WEASEL, a model of "cumulative selection" which was presented by Richard Dawkins in Chapter 3 of The Blind Watchmaker.
About 20 years ago, I used his description (he didn't post the code) to write my own WEASEL in Turbo Pascal and called it MONKEY, after Eddington's infinite monkeys (though not based on the Internet's "Infinite Monkey Protocol Suite" (IMPS), RFC 2795 (01 April 2000)). Musgrave included it in his Almost Like a Whale page where he includes many other WEASELs as well. He links to a self-extracting archive of my source code and executable, plus another link to a mathematical analysis I had written. Turns out that despite low probabilities for each individual step, the probability that each and every step would fail (a requirement for the whole system to fail) is vastly less, the end result being that the probability of eventually reaching the goal (eventually meaning within minutes or seconds) exceeds 99.99%. In comparison, single-step selection would have to run for several times longer than the current age of the universe in order to have one chance in a million of success.
If you try to run the program, it will crash. That is because your PC is too fast. The Turbo Pascal start-up code has a timing loop that calibrates its delay timeouts. I think it was around the time the first Pentium came out that the processor's speed became too great and as a result that start-up code would crash. Borland did eventually issue a patched start-up module that I linked in, but it didn't make it to Musgrave's site.
I had started to convert MONKEY to C, but its original design was strongly based on the Pascal idiom to make that conversion easy.



A. S. Eddington. The Nature of the Physical World: The Gifford Lectures, 1927:


... If I let my fingers wander idly over the keys of a typewriter it might happen that
my screed made an intelligible sentence. If an army of monkeys were strumming on
typewriters they might write all the books in the British Museum. The chance of
their doing so is decidedly more favourable than the chance of the molecules
returning to one half of the vessel.
Douglas Adams. The Hitchhikers' Guide to the Galaxy:


"Ford!" [Arthur] said, "there's an infinite number of monkeys outside who
want to talk to us about this script for Hamlet they've worked out."
Lennon and McCartney:


Everybody's got something to hide, except for me and my monkey!
RFC 2795: The Infinite Monkey Protocol Suite (IMPS)


Abstract

This memo describes a protocol suite which supports an infinite
number of monkeys that sit at an infinite number of typewriters in
order to determine when they have either produced the entire works of
William Shakespeare or a good television show. The suite includes
communications and control protocols for monkeys and the
organizations that interact with them.


Edited by dwise1, : Custom Signature

This message is a reply to:
 Message 2 by Percy, posted 08-03-2010 7:16 AM Percy has replied

Replies to this message:
 Message 14 by Percy, posted 08-03-2010 1:51 PM dwise1 has not replied

  
Blue Jay
Member (Idle past 2716 days)
Posts: 2843
From: You couldn't pronounce it with your mouthparts
Joined: 02-04-2008


Message 9 of 59 (572052)
08-03-2010 12:34 PM
Reply to: Message 2 by Percy
08-03-2010 7:16 AM


Re: Evolution Generator
Hi, Percy.
I just noticed a glitch. I tried it with "2 offspring per parent," and the check box unchecks after each generation. It doesn't happen for 1, 5 or 10 offspring: just for 2.

-Bluejay (a.k.a. Mantis, Thylacosmilus)
Darwin loves you.

This message is a reply to:
 Message 2 by Percy, posted 08-03-2010 7:16 AM Percy has replied

Replies to this message:
 Message 13 by Percy, posted 08-03-2010 1:42 PM Blue Jay has not replied

  
Aware Wolf
Member (Idle past 1438 days)
Posts: 156
From: New Hampshire, USA
Joined: 02-13-2009


Message 10 of 59 (572053)
08-03-2010 12:42 PM
Reply to: Message 2 by Percy
08-03-2010 7:16 AM


Re: Evolution Generator
Pretty cool, Percy.
I played around with developing something like this a while back. I wasn’t too keen on my early attempts, because, like your program here, the selection pressure was driving the organism to a particular solution, rather than presenting a problem and letting random mutations develop their own solution(s). How to program that, though?
The best I was able to come up with was a picture that mutated. I started with a grid of 20x20 squares, each with a random color. Its offspring would mutate by having a random number of squares change its color to a new random color. The human operator would choose a child picture to be the new parent, all other children died away. The selection pressure then became whatever the human wanted it to be. I was hoping that the random picture itself would suggest something. Hey, that kind of looks like an apple/fork/lightning bolt/whatever. The human would then select that child, and as he kept making selections, a nice picture of an apple/whatever would appear.
In practice, it was a flop. At 6 children per generation (the most I could fit on the screen without scrolling), and roughly 15 seconds per generation minimum, it looked to take much longer than my attention span to generate any picture of note. I tried upping the mutation rate, but that caused any pattern that started to emerge to disintegrate. I tried altering the number of squares in the grid, the number of colors available, how far a random mutation could jump along the color scale (e.g. red to orange allowed, red to blue not); nothing seemed to help much. Only by simplifying tremendously — 4x4 grid, 4 colors, selection pressure: blue=good, not blue=bad — did I get anywhere, but that wasn’t very satisfying.

This message is a reply to:
 Message 2 by Percy, posted 08-03-2010 7:16 AM Percy has replied

Replies to this message:
 Message 15 by Percy, posted 08-03-2010 1:52 PM Aware Wolf has not replied
 Message 18 by Wounded King, posted 08-03-2010 5:15 PM Aware Wolf has replied

  
ICANT
Member
Posts: 6769
From: SSC
Joined: 03-12-2007
Member Rating: 1.5


Message 11 of 59 (572060)
08-03-2010 1:15 PM
Reply to: Message 2 by Percy
08-03-2010 7:16 AM


Re: Evolution Generator
Hi Percy,
Percy writes:
I would appreciate feedback on the program.
Maybe I am doing something wrong.
How many parents should I use each generation?
Am I to select the child with the most matches each generation?
I ran the generator for 84 generations with 1 parent from each generation of 10 OFFspring with 10 mutations I did random selection of a child for each generation. At the end of 84 generations I have all zeros under select.
I ran the generator for 55 generations using 10 OFFspring with 10 mutations. I did random selection of 1 OFFspring from each parent for the following generation. At the end of the 55 generations
Parent 1 has 2 OFFspring with 1 match and 1 OFFspring with 2 matches.
Parent 2 has 1 OFFspring with 1 match and 1 OFFspring with 3 matches.
Parent 3 has 1 OFfspring with 1 match.
For my text string I used the alphabet lower case in order.
I just ran 1 Parent with 2 OFFspring then selected all OFFspring as parents until I reached 32 Parents.
I then ran the 32 parents with 1 OFFspring selecting all OFFspring as Parents at 38 generations I have 12 OFF spring with 1 match, 4 OFFspring with 2 matches and 1 OFFspring with 3 matches.
Everything was run with 10 mutations.
What am I doing wrong?
God Bless,

"John 5:39 (KJS) Search the scriptures; for in them ye think ye have eternal life: and they are they which testify of me."

This message is a reply to:
 Message 2 by Percy, posted 08-03-2010 7:16 AM Percy has replied

Replies to this message:
 Message 16 by Percy, posted 08-03-2010 1:58 PM ICANT has replied
 Message 19 by Blue Jay, posted 08-03-2010 5:35 PM ICANT has not replied

  
Percy
Member
Posts: 22473
From: New Hampshire
Joined: 12-23-2000
Member Rating: 4.7


Message 12 of 59 (572062)
08-03-2010 1:37 PM
Reply to: Message 7 by Blue Jay
08-03-2010 11:44 AM


Re: Evolution Generator
Bluejay writes:
  1. It took about 10 generations before I got my first matching letter.
  2. It took a long time (I can't remember how long) to get from 6 correct letters to 7.
  3. Once you get to the target sequence, it's impossible to drive it to fixation, because the offspring always mutate.
The first two I think are real quirks of evolution: the first template on which evolution could work would have to have been generated randomly, and fine-tuning (6 to 7 letters) would be hard to stabilize.
About number 1, that will vary, sometimes you're luckier than others. About number 2, getting the final few letters to match is the toughest, because there's only one right answer. In the real world there are millions of correct answers, and even creationists must acknowledge this because everyone's DNA is different.
The last one might also be a real quirk of evolution (the difficulty of driving a trait to absolute fixation); but I think it's more a quirk of the generator. Maybe you could allow a range of mutations in each offspring, instead of saying exactly how many? So, instead of saying "1 mutation per individual," it could be "0-1" or "0-2."
I have no idea how difficult that might be to program, because I know nothing about programming.
This is very easy, and I considered doing it, but I was afraid what I had was already too different from Marshall's program to be easily understood.
{AbE: Also, maybe the possibility of a moving target sequence would make it more realistic?}
This, too, is relatively easy. It would reflect a changing environment. It would show how organisms could get caught between needing a high mutation rate to keep up with a changing environment but not so high that fitness is undermined.
--Percy

This message is a reply to:
 Message 7 by Blue Jay, posted 08-03-2010 11:44 AM Blue Jay has not replied

  
Percy
Member
Posts: 22473
From: New Hampshire
Joined: 12-23-2000
Member Rating: 4.7


Message 13 of 59 (572064)
08-03-2010 1:42 PM
Reply to: Message 9 by Blue Jay
08-03-2010 12:34 PM


Re: Evolution Generator
Bluejay writes:
I just noticed a glitch. I tried it with "2 offspring per parent," and the check box unchecks after each generation. It doesn't happen for 1, 5 or 10 offspring: just for 2.
Thanks for finding this, typo, it's fixed now.
--Percy

This message is a reply to:
 Message 9 by Blue Jay, posted 08-03-2010 12:34 PM Blue Jay has not replied

  
Percy
Member
Posts: 22473
From: New Hampshire
Joined: 12-23-2000
Member Rating: 4.7


Message 14 of 59 (572070)
08-03-2010 1:51 PM
Reply to: Message 8 by dwise1
08-03-2010 12:31 PM


Re: Evolution Generator
I was hoping to make something that was only incrementally more complicated than Perry's program but that gave a more accurate picture of how evolution works. I vaguely remember The Blind Watchmaker, but it's been over 20 years. I recall that he had a chapter about an evolution program, and I guess that's the WEASEL program you mention. Neat stuff, I still have the book on my shelf. At the time I read it I was carrying on a snail-mail debate with a fundamentalist Christian I'd met on an airplane and I sent her a copy. I'm sure she found it worked great as a paperweight.
--Percy

This message is a reply to:
 Message 8 by dwise1, posted 08-03-2010 12:31 PM dwise1 has not replied

  
Percy
Member
Posts: 22473
From: New Hampshire
Joined: 12-23-2000
Member Rating: 4.7


Message 15 of 59 (572071)
08-03-2010 1:52 PM
Reply to: Message 10 by Aware Wolf
08-03-2010 12:42 PM


Re: Evolution Generator
Yeah, I can see the problems you faced. It would probably work great if selection was automated, but then it wouldn't provide any insights to the people watching it. They'd just gradually see a picture emerge.
--Percy

This message is a reply to:
 Message 10 by Aware Wolf, posted 08-03-2010 12:42 PM Aware Wolf has not replied

  
Newer Topic | Older Topic
Jump to:


Copyright 2001-2023 by EvC Forum, All Rights Reserved

™ Version 4.2
Innovative software from Qwixotic © 2024