Author Topic: Its might really be good to have sexrepro  (Read 5586 times)

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
Its might really be good to have sexrepro
« on: May 06, 2006, 02:31:09 PM »
When we run ex nihlo sims or just junk sims it might be really useful to have sexrepro so that once a bot develops repro he can use useful genes of the other bots that developed with him (that way the other genome is not wasted). Just wanted to say that.
« Last Edit: May 06, 2006, 02:32:08 PM by Welwordion »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Its might really be good to have sexrepro
« Reply #1 on: May 06, 2006, 03:22:37 PM »
You're not the first to say we need sexrepro.  It's on the list for 3.0.  It'll probably get implemented sometime in the next two years

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Its might really be good to have sexrepro
« Reply #2 on: May 06, 2006, 07:48:02 PM »
It's always been such a pain inthe ass to get it to work in some kind of realistic way.

Carlo tried it, I tried it, then we discussed it at length and kind of gave up for the time being.  
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Its might really be good to have sexrepro
« Reply #3 on: May 06, 2006, 08:43:08 PM »
The main issue still seems to be the issue of how to handle diploidness.

If a satisfactory solution for all can't be found, I'll either:

1.  Just implement my idea (I don't like the idea of unilaterally making decisions though).

2.  Implement Haploid sexual reproduction, as other Alife simulators have done.  For instance, Creatures.

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
Its might really be good to have sexrepro
« Reply #4 on: May 08, 2006, 06:15:57 AM »
I would be totally satisfied with something that mixes the genome .(two bots that have the same ancestor, then adjusting the mix according to all mutations that changed length?Basically you find out which part of the genome had which place in the original genome and add the empty spaces and inserted stuff inbetween as a decision between to write something or not)
« Last Edit: May 08, 2006, 06:27:39 AM by Welwordion »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Its might really be good to have sexrepro
« Reply #5 on: May 08, 2006, 09:15:07 AM »
But how to choose which two robots to mix?

That is the question.

Should one robot shoot a virus like sperm package to force another bot to reproduce and mix the DNA?

Should it shoot another bot to elicit a sperm package back from the other bot (like a -2 shot) then reproduce itself.

Should the bots be tied together to mix their DNA into a combined offspring?

The existing .sexrepro sysvar attempts to mix the DNA of the bot using it, with the DNA of the closest bot in physical space without any actual contact being made between then.
It has never worked all that well.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline S.o.G.

  • Bot Neophyte
  • *
  • Posts: 10
    • View Profile
Its might really be good to have sexrepro
« Reply #6 on: June 12, 2006, 11:33:21 AM »
Quote from: PurpleYouko
But how to choose which two robots to mix?

That is the question.

Should one robot shoot a virus like sperm package to force another bot to reproduce and mix the DNA?

Should it shoot another bot to elicit a sperm package back from the other bot (like a -2 shot) then reproduce itself.

Should the bots be tied together to mix their DNA into a combined offspring?

The existing .sexrepro sysvar attempts to mix the DNA of the bot using it, with the DNA of the closest bot in physical space without any actual contact being made between then.
It has never worked all that well.

How about something like fish do:

- a bot can make an egg, which is the same as a child except a percentage of nrg can be put into shell.

- everything that involves external interaction is disabled in an egg (shooting, tieing, moving, feeding). In exchange, it has reduced cost for everything else & possibly an nrg bonus. However the egg can see. This allows hatching ready for external conditions.

- a bot can fertilize an egg through a tie and/or shot

- a fertilized egg gets dna that combines egg & fertilizer's dna through one of several algorithms
    -- random pairwise choosing, gene-by-gene
    -- random split of dna
    -- randomly choose one dna & some kind of mechanism for swapping in "dominant" genes from the other. "Dominant" could be implemented by a command in the gene.

- egg & fertilizer can vote on which algorithm to use. Egg's vote gets priority

- an egg knows when it's being fertilized and can reject being fertilized

- egg can control how soon after fertilization it hatches

Offline scood

  • Bot Neophyte
  • *
  • Posts: 44
    • View Profile
Its might really be good to have sexrepro
« Reply #7 on: April 11, 2007, 06:44:55 AM »
not a bad idea!

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Its might really be good to have sexrepro
« Reply #8 on: April 13, 2007, 01:48:35 AM »
Ohh, we could have egg eaters also  

From all the sims I and others have done it looks like having even primitive methods of gene mixing can vastly speed up evolution. If we can just make it work better it'd be great.

Offline razzo

  • Bot Neophyte
  • *
  • Posts: 3
    • View Profile
Its might really be good to have sexrepro
« Reply #9 on: July 02, 2007, 03:58:08 PM »
Why not include all the possible methods? Sperm packages, eggs, anything? Allow evolution to decide over time.

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Its might really be good to have sexrepro
« Reply #10 on: July 02, 2007, 05:21:53 PM »
Can you program that into DB for us?

I don't mean to sound rude but it takes a lot of hard work from those that program DB to actually make things happen.

In the meantime those of us that play DB but are unable to make DB better have to pick and choose the things that might make a noticable difference. Unfortunately we can't sow our random seed (of theory) and see, we have to pick the seeds that might make the biggest difference. Given enough time we might be able to try everything but in the meantime what would be the best thing to try first?
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Its might really be good to have sexrepro
« Reply #11 on: July 02, 2007, 05:24:56 PM »
Simplest (and possibly best - opinions?) method of sexual reproduction would seem to be a crossover method
  • Take the DNA from both bots, and store them side by side into a 2 by <however long (in bps) the longest DNA strand is> array
  • Generate a random number from 1 to <however long the shortest DNA strand is minus one> and call it n
  • Swap (I think to do a swap you might need an extra column in which to temporarily hold one of the values while you move the other across) the bps at position n of the DNA array, and then work upwards, swapping bps until you reach the top
  • Repeat steps 2 and 3 an arbitrary, selected, bot-controllable or random number of times (or just the once)
  • Pick one of the columns of the array at random, and store that into the offspring's DNA array
1 4 2 6 3 5 7 3
5 7 3 5 6 8 8 2 1

n = 4

After one crossover

5 7 3 5 3 5 7 3
1 4 2 6 6 8 8 2 1
« Last Edit: July 02, 2007, 05:39:00 PM by Elite »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Its might really be good to have sexrepro
« Reply #12 on: July 02, 2007, 08:39:25 PM »
Yeah, I think crossover is the way to go for DNA shuffling.  There are some tricks involved with being sure that DNAs that are similar but of different lengths don't screw things up.

I'd prefer simulating things on the microscopic level (have haploid and diploid as alternating generations, like fungi) over something like sex as we're more used to it.  Both shouldn't be too hard to work out though.

I'm working on a whole new DNA system that combines the flexibility of neural nets with the straightforwardness of the current DNA system.  Sexual reproduction should easily come from this without too much work.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Its might really be good to have sexrepro
« Reply #13 on: July 06, 2007, 02:11:08 AM »
Quote
I'd prefer simulating things on the microscopic level (have haploid and diploid as alternating generations, like fungi) over something like sex as we're more used to it. Both shouldn't be too hard to work out though.

Err... We're haploid for a brief, but important part of our lives.  

Maybe require a hardened tie before sexrepro can commence. This way bots can be at least somewhat choosy about whom they give their genes to. Otherwise they could do some gene theft and swipe another bot's dna.