RSS 2.0 Feed

» Welcome Guest Log In :: Register

Pages: (2) < [1] 2 >   
  Topic: EvoDice, Sandbox evolution< Next Oldest | Next Newest >  
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 01 2011,10:08   

Hi folks - based on our stick-poking of Joe G, I think I might actually build a dice based evolution toy.

Each dice has 6 sides (a-f) with at the start 6 corresponding numbers (1-6).

There is a population of N.

Each die is rolled and that is their survival number. Some fraction make it to the next round, some don't - highest numbers win.

Next we have mutation, where faces (a-f) have a chance of having their numbers changed

There might also be a sexual selection where survivors pair off an create baby dice, the infants taking their genomes (faces) from both parents, each face (a-f) has a 50% chance to come from either mum or dad.

Go to step 2, rinse and repeat.

I like this idea because individual fitness, is simply the average of all the faces, reproductive advantage is stochastic and 'negative' mutations (lowering fitness) can also embed.

Any thoughts, gentle science folk?

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
midwifetoad



Posts: 4003
Joined: Mar. 2008

(Permalink) Posted: Aug. 01 2011,10:44   

It's in the details. Can you make it visual, so it's clear what is happening?

--------------
Any version of ID consistent with all the evidence is indistinguishable from evolution.

  
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 01 2011,11:16   

I'll try. Let's take the hypothetical 'life' of some dice.

here's "Joe"

His sides are 1,2,3,4,5,6

He goes up for selection

and rolls a 5!  Nice work, although his average fitness is 3.5, he got a 5, which crosses some arbitrary hurdle. This means that joe and jim (another dice) get to have dice babies.

Jim's sides are 1,2,6,4,5,3 (he's had a mutation!) [mutations could be straight swaps of 2 faces, or the randomization of 1 face, or both)

let's see how their child, "John Paul" will be made up..

Joe ------- Jim
1    >    1
2    <    2
3    >    6
4    >    4
5    <    5
6    <    3

Wow, lucky "John paul" got Jim's 'c face' 6! that means his genome is sporting 2 6's. his average fitness is 4 (average 1,2,6,4,5,6) - so his fitness is increased. Of couse he can still roll a 1 in the survival test, but his chances of getting a good score are higher. Maybe Joe and Jim will have another kid, and he'll get a mutation...?


Is this helping?

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
OgreMkV



Posts: 3668
Joined: Oct. 2009

(Permalink) Posted: Aug. 01 2011,11:19   

So each face is a gene.  Each number possible number for that face is an allele.  

Each pairing is just a one or the other survives?

Perhaps add a craps table like effect for environmental selection?

--------------
Ignored by those who can't provide evidence for their claims.

http://skepticink.com/smilodo....retreat

   
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 01 2011,11:22   

Quote (OgreMkV @ Aug. 01 2011,11:19)
So each face is a gene.  Each number possible number for that face is an allele.  

Each pairing is just a one or the other survives?

Perhaps add a craps table like effect for environmental selection?

Every dice gets to roll to see if it survives to reproduce. we can either have it roll against another dice, or roll above a certain threshold. remember, a dice (1,1,1,1,1,6) can still roll a 6 and bring five '1's' into the gene pool. But the odds are less (differential reproductive advantage)

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
OgreMkV



Posts: 3668
Joined: Oct. 2009

(Permalink) Posted: Aug. 01 2011,11:55   

Quote (Richardthughes @ Aug. 01 2011,11:22)
Quote (OgreMkV @ Aug. 01 2011,11:19)
So each face is a gene.  Each number possible number for that face is an allele.  

Each pairing is just a one or the other survives?

Perhaps add a craps table like effect for environmental selection?

Every dice gets to roll to see if it survives to reproduce. we can either have it roll against another dice, or roll above a certain threshold. remember, a dice (1,1,1,1,1,6) can still roll a 6 and bring five '1's' into the gene pool. But the odds are less (differential reproductive advantage)

Interesting.

Can you force certain dice numberings?  

Either way, I can see that this would have value, to show that bad mutations can follow along with good mutations.

--------------
Ignored by those who can't provide evidence for their claims.

http://skepticink.com/smilodo....retreat

   
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 01 2011,11:58   

I'd start them off all homogeneously (1,2,3,4,5,6) and use mutation and sexual selection to change the genomes. Of course you'd track the average fitness and could record how well beneficial and negative mutations embed themselves in the population.

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
J-Dog



Posts: 4402
Joined: Dec. 2006

(Permalink) Posted: Aug. 01 2011,12:13   

This might apply, or be an entirely different game...

Let's say that our subject - let's call him "joe" - is evolutionarily fit, but the subject has made a decision not to cooperate, and thus acts and thinks exceedingly dumb, and is thus a candidate for very early removal from the gene pool.  

In rich's game, can this quasi-human be assigned a factor?
(double 1's for example?)

added in edit:  I like your "joe and jim" gene linkage.  very fitting.

--------------
Come on Tough Guy, do the little dance of ID impotence you do so well. - Louis to Joe G 2/10

Gullibility is not a virtue - Quidam on Dembski's belief in the Bible Code Faith Healers & ID 7/08

UD is an Unnatural Douchemagnet. - richardthughes 7/11

  
Mindrover



Posts: 65
Joined: April 2010

(Permalink) Posted: Aug. 01 2011,12:15   

It would be expensive, but I would suggest the dice that come in LEGO sets, as you can swap die faces easily.

Another possibility is blank dice that can be written upon with dry-erase or wet-erase pens/crayons.

The logistics of keeping track of dice populations by assigning numbers to a-f as mentioned above is a bit more than most people want for a table game.

For the environmental selection, I would suggest a deck of cards. Each card would have a test (total roll > 21; roll more "1"s than "5"s; etc) and different birth/death/mutation rates for those populations that "pass" or "fail" these tests.

  
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 01 2011,12:20   

Quote (Mindrover @ Aug. 01 2011,12:15)
It would be expensive, but I would suggest the dice that come in LEGO sets, as you can swap die faces easily.

Another possibility is blank dice that can be written upon with dry-erase or wet-erase pens/crayons.

The logistics of keeping track of dice populations by assigning numbers to a-f as mentioned above is a bit more than most people want for a table game.

For the environmental selection, I would suggest a deck of cards. Each card would have a test (total roll > 21; roll more "1"s than "5"s; etc) and different birth/death/mutation rates for those populations that "pass" or "fail" these tests.

I think it has to exist inside a computer to get a sufficiently large population and number of generations.

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
Schroedinger's Dog



Posts: 1692
Joined: Jan. 2009

(Permalink) Posted: Aug. 01 2011,12:23   

I would be very curious to see a computer program running on these premises. Any programmer around? Wes? :p

--------------
"Hail is made out of water? Are you really that stupid?" Joe G

"I have a better suggestion, Kris. How about a game of hide and go fuck yourself instead." Louis

"The reason people use a crucifix against vampires is that vampires are allergic to bullshit" Richard Pryor

   
OgreMkV



Posts: 3668
Joined: Oct. 2009

(Permalink) Posted: Aug. 01 2011,12:24   

Quote (Mindrover @ Aug. 01 2011,12:15)
It would be expensive, but I would suggest the dice that come in LEGO sets, as you can swap die faces easily.

Another possibility is blank dice that can be written upon with dry-erase or wet-erase pens/crayons.

The logistics of keeping track of dice populations by assigning numbers to a-f as mentioned above is a bit more than most people want for a table game.

For the environmental selection, I would suggest a deck of cards. Each card would have a test (total roll > 21; roll more "1"s than "5"s; etc) and different birth/death/mutation rates for those populations that "pass" or "fail" these tests.

I've got a simulation that I use to explain how complexity can come about using cards.

It's basically like 7-card stud, except fitness is judged after each card is laid down and all but the top 2-3 hands are discarded. (in terms of poker hands)

Then, everyone playing starts with those hands or (theoretically) simple modifications to those hands.  This is used to represent how more fit organisms (genes) rapidily increase in the population.

In this simulation, it's easy to see that a Royal Flush is the best possible hand, but it very rarely appears because of the steps it has to have to develop.  Any pair would beat the flush draw and thus likely eliminate the flush draw.  So you end up with several local maximums instead of an ultimate maximum.

--------------
Ignored by those who can't provide evidence for their claims.

http://skepticink.com/smilodo....retreat

   
midwifetoad



Posts: 4003
Joined: Mar. 2008

(Permalink) Posted: Aug. 01 2011,12:27   

I think you could make it a fairly simple javascript game.

The face of the die could be displayed as a digit inside a colored square. If you mouse over a die, it would display the genes (the list of digits on the six faces).

Mouseover could also display the current fitness score. You could display the population in a grid, and could borrow from the game of Life. A die could mate with any of the dice it "touches." Perhaps you could make a simple mate selection rule.

Maybe you don't need an arbtrary fitness score. You get to mate if there's a suitable mate, based on the mate selection rule, touching you.

I'm not sure I understand fitness as you defined it.

--------------
Any version of ID consistent with all the evidence is indistinguishable from evolution.

  
Mindrover



Posts: 65
Joined: April 2010

(Permalink) Posted: Aug. 01 2011,13:17   

Yes, as originally described (and closer to the point you want to get across) this should be a computer simulation.

Since my son is getting to that age where "family game night" is becoming a possibility, I am trying to find\build games that can be played at the table.

My idea has simply not competed well enough against these "computer-based" populations.  :p

  
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 01 2011,13:26   

Quote (midwifetoad @ Aug. 01 2011,12:27)
I'm not sure I understand fitness as you defined it.

I'm using the sides of the dice as 'fitness', perhaps improperly. Each side of the dice has a chance of being rolled at the selection trail. So an average of the faces is a proxy for its relative chances in that trail. Now (1,1,1,6,6,6) has the same fitness as (3,3,3,4,4,4) but if the hurdle is [3] then clearly the second die is superior. perhaps head to head trails are the preferred selection test?

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
Mindrover



Posts: 65
Joined: April 2010

(Permalink) Posted: Aug. 01 2011,13:41   

Quote (Richardthughes @ Aug. 01 2011,13:26)
Quote (midwifetoad @ Aug. 01 2011,12:27)
I'm not sure I understand fitness as you defined it.

I'm using the sides of the dice as 'fitness', perhaps improperly. Each side of the dice has a chance of being rolled at the selection trail. So an average of the faces is a proxy for its relative chances in that trail. Now (1,1,1,6,6,6) has the same fitness as (3,3,3,4,4,4) but if the hurdle is [3] then clearly the second die is superior. perhaps head to head trails are the preferred selection test?

You could roll-off amongst those dice that pass the fitness test.

You could also go the other way around,  rolling against the hurdle first, then selecting for average value against the higher rolls.

  
midwifetoad



Posts: 4003
Joined: Mar. 2008

(Permalink) Posted: Aug. 01 2011,15:23   

Is anyone interested in trying to define the behavior of a web based game?

I've suggested a simple way to display the population, but I am not really the person to define the underlying mechanism.

I have a game already that might some of the visual aspects already coded.

--------------
Any version of ID consistent with all the evidence is indistinguishable from evolution.

  
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 01 2011,15:25   

rereading. I've used the word 'toy'. Maybe 'simulation' or "educational aid" would be better.

Where's that Oleg? He's an edumacationalist.

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
Wesley R. Elsberry



Posts: 4991
Joined: May 2002

(Permalink) Posted: Aug. 02 2011,07:39   

It looks like a spot of fun. I wrote up something similar as a "game of gene" a few years back, but haven't been able to locate it in a brief search.

--------------
"You can't teach an old dogma new tricks." - Dorothy Parker

    
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 02 2011,08:23   

I can sorta make excell do it, but Because of the column/rows schema I'm either severely limited on population or generations, because I have to build it in a table type format. It should be built in Pearl, maybe?

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 02 2011,13:17   

Fun with evodice

N=250,
Mutation rate (chance per face) = 0.1%



--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
OgreMkV



Posts: 3668
Joined: Oct. 2009

(Permalink) Posted: Aug. 02 2011,14:03   

Quote (Richardthughes @ Aug. 02 2011,13:17)
Fun with evodice

N=250,
Mutation rate (chance per face) = 0.1%


But they are still DICE!1!!1!!11!!!1




Seriously, very nice.  I think that dip in the middle is really cool.  I'm assuming a couple of bad mutations hit around that time.

--------------
Ignored by those who can't provide evidence for their claims.

http://skepticink.com/smilodo....retreat

   
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 02 2011,14:06   

Yeah, excel isn't really the right tool for the job. Playing with it you can see a race - can the positive mutation gain a foothold, or will negative mutations degrade it? Of course, the odds should favour positive mutations in the long run. It would be cool to track individual mutations and create family trees using them.

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
OgreMkV



Posts: 3668
Joined: Oct. 2009

(Permalink) Posted: Aug. 02 2011,14:41   

Quote (Richardthughes @ Aug. 02 2011,14:06)
Yeah, excel isn't really the right tool for the job. Playing with it you can see a race - can the positive mutation gain a foothold, or will negative mutations degrade it? Of course, the odds should favour positive mutations in the long run. It would be cool to track individual mutations and create family trees using them.

You know, thinking about it further, it looks like the sim hit what is close to a global max right before the dip.

It's just because there is a limited number of available mutations.  As the die fitness gets higher, then the likelihood of the next mutation being detrimental increases. So, in this simulation, you should see a large drop in fitness soon after the sim hits a very high overall fitness.

That wouldn't happen if the number on the die face was not limited to 1-6.

--------------
Ignored by those who can't provide evidence for their claims.

http://skepticink.com/smilodo....retreat

   
Richardthughes



Posts: 11178
Joined: Jan. 2006

(Permalink) Posted: Aug. 02 2011,14:55   

Quote (OgreMkV @ Aug. 02 2011,14:41)
Quote (Richardthughes @ Aug. 02 2011,14:06)
Yeah, excel isn't really the right tool for the job. Playing with it you can see a race - can the positive mutation gain a foothold, or will negative mutations degrade it? Of course, the odds should favour positive mutations in the long run. It would be cool to track individual mutations and create family trees using them.

You know, thinking about it further, it looks like the sim hit what is close to a global max right before the dip.

It's just because there is a limited number of available mutations.  As the die fitness gets higher, then the likelihood of the next mutation being detrimental increases. So, in this simulation, you should see a large drop in fitness soon after the sim hits a very high overall fitness.

That wouldn't happen if the number on the die face was not limited to 1-6.

The maximum fitness would be 6, Average (6,6,6,6,6,6) and this fitness could only ever be degraded, by mutation. It would be hard to reach because, for example (6,6,6,6,6,5) needs the a mutation (0.1%) on the right face (0.1667) and only a six will do (0.1667) = 0.000027778. It means you're almost 35 times as likely to get a negative or neutral mutation for this dice (if you allow mutations to mutate into..themselves) - if you're 'lucky' enough to get a mutation at all.

--------------
"Richardthughes, you magnificent bastard, I stand in awe of you..." : Arden Chatfield
"You magnificent bastard! " : Louis
"ATBC poster child", "I have to agree with Rich.." : DaveTard
"I bow to your superior skills" : deadman_932
"...it was Richardthughes making me lie in bed.." : Kristine

  
OgreMkV



Posts: 3668
Joined: Oct. 2009

(Permalink) Posted: Aug. 02 2011,15:10   

Quote (Richardthughes @ Aug. 02 2011,14:55)
Quote (OgreMkV @ Aug. 02 2011,14:41)
 
Quote (Richardthughes @ Aug. 02 2011,14:06)
Yeah, excel isn't really the right tool for the job. Playing with it you can see a race - can the positive mutation gain a foothold, or will negative mutations degrade it? Of course, the odds should favour positive mutations in the long run. It would be cool to track individual mutations and create family trees using them.

You know, thinking about it further, it looks like the sim hit what is close to a global max right before the dip.

It's just because there is a limited number of available mutations.  As the die fitness gets higher, then the likelihood of the next mutation being detrimental increases. So, in this simulation, you should see a large drop in fitness soon after the sim hits a very high overall fitness.

That wouldn't happen if the number on the die face was not limited to 1-6.

The maximum fitness would be 6, Average (6,6,6,6,6,6) and this fitness could only ever be degraded, by mutation. It would be hard to reach because, for example (6,6,6,6,6,5) needs the a mutation (0.1%) on the right face (0.1667) and only a six will do (0.1667) = 0.000027778. It means you're almost 35 times as likely to get a negative or neutral mutation for this dice (if you allow mutations to mutate into..themselves) - if you're 'lucky' enough to get a mutation at all.

Yeah, I think that's what I'm saying.

The fitness drop (overall) was because past a certain fitness, it's much more likely to have a negative mutation than a positive one.

In that 6,6,6,6,6,5 example all but one mutation would result in lower fitness.

--------------
Ignored by those who can't provide evidence for their claims.

http://skepticink.com/smilodo....retreat

   
Wesley R. Elsberry



Posts: 4991
Joined: May 2002

(Permalink) Posted: Aug. 04 2011,19:16   

I wrote up a first pass at "evodice" in Python. It's a bit more complicated than strictly necessary because I wanted to have a code base to expand upon, so that doing things like extending the number of loci (sides of die), allowing for multiple chromosomes, allowing for more possible allelic variants, etc., could all be approached.

There are classes for "Chromosome", "Die", and "SimRun". So far, I've only implemented things for a strictly asexual reproduction of a single-stranded single chromosome, so this doesn't incorporate the sexual reproduction Rich talked about. The code is pretty much tossed off, so don't look to it for elegance.

I've done just a few runs and wanted to share some output graphics. I started all dice with [1,1,1,1,1,1] as their chromosome.

Population size 10, mutation rate 0.05:



Population size 100, mutation rate 0.05:



Population size 100, mutation rate 0.5:



I just noticed in preview that Ikonboard swallowed the Python double underline convention. So I'll put the code up and link to it here.

Edited by Wesley R. Elsberry on Aug. 04 2011,19:26

--------------
"You can't teach an old dogma new tricks." - Dorothy Parker

    
OgreMkV



Posts: 3668
Joined: Oct. 2009

(Permalink) Posted: Aug. 04 2011,20:39   

Quote (Wesley R. Elsberry @ Aug. 04 2011,19:16)
I wrote up a first pass at "evodice" in Python. It's a bit more complicated than strictly necessary because I wanted to have a code base to expand upon, so that doing things like extending the number of loci (sides of die), allowing for multiple chromosomes, allowing for more possible allelic variants, etc., could all be approached.

There are classes for "Chromosome", "Die", and "SimRun". So far, I've only implemented things for a strictly asexual reproduction of a single-stranded single chromosome, so this doesn't incorporate the sexual reproduction Rich talked about. The code is pretty much tossed off, so don't look to it for elegance.

I've done just a few runs and wanted to share some output graphics. I started all dice with [1,1,1,1,1,1] as their chromosome.

Population size 10, mutation rate 0.05:



Population size 100, mutation rate 0.05:



Population size 100, mutation rate 0.5:



I just noticed in preview that Ikonboard swallowed the Python double underline convention. So I'll put the code up and link to it <a href="/features/ec/evodice.py" target="_blank">here</a>.

So did negative mutations just not take hold?

I find that very interesting and it seems somewhat different from the results Rich had in Excel.

Of course, that may be the cold medication talking... or the giant pink armadillo.

--------------
Ignored by those who can't provide evidence for their claims.

http://skepticink.com/smilodo....retreat

   
Wesley R. Elsberry



Posts: 4991
Joined: May 2002

(Permalink) Posted: Aug. 04 2011,23:42   

I haven't seen Rich's spreadsheet, so I'm not sure what the differences might be. I did just do a run with N=250 and u=0.1 as Rich had for his graph, and my run has average fitness per locus climbing to near 6 by generation 60. That would seem to indicate that my simulation and his differ in some salient property or rule.

--------------
"You can't teach an old dogma new tricks." - Dorothy Parker

    
Wesley R. Elsberry



Posts: 4991
Joined: May 2002

(Permalink) Posted: Aug. 05 2011,00:00   

For my script, these are the relevant rules/behaviors:

* Each "die" in the initial population starts with all faces at '1'.

* If all the rolls are the same, 10% of the population is killed off and children replace those. (This is because the initial population is guaranteed to do this, which would not be the case if the initial condition were [1,2,3,4,5,6].)

* Per generation, several things happen. The average fitness per locus across the population is calculated. One roll per die is made. If the roll equals or exceeds the average fitness, the "die" survives. The remaining slots in the population are taken by children of survivors, where those generating children are randomly taken from the survivors group.

--------------
"You can't teach an old dogma new tricks." - Dorothy Parker

    
  34 replies since Aug. 01 2011,10:08 < Next Oldest | Next Newest >  

Pages: (2) < [1] 2 >   


Track this topic Email this topic Print this topic

[ Read the Board Rules ] | [Useful Links] | [Evolving Designs]