Author Topic: sexrepro code  (Read 6172 times)

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
sexrepro code
« on: October 18, 2008, 11:53:44 PM »
Hi everyone,

I'm working on starting an evosim with no movement, except for ties, and only sexrepro for reproduction. I have a veggy that requires sexrepro, and found a good bot to start with (PY's Inchworm 2). However, IW2 doesn't use sexrepro, and I don't know how to make it able to use sexrepro. Is there some magic line of code that I can use to replace every .repro instruction in it? Better yet, is there a sexrepro-only version of a bot that uses only ties to move, or a guide on using sexrepro? Thanks!

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
sexrepro code
« Reply #1 on: October 19, 2008, 12:27:09 AM »
I guess this is leading on from the pollination discussion is it? If you are trying to get the veggies to be pollinated by inchworms, tough luck, I'n not sure you can do that. If the inchworms are reproducing with each other, try adding this code, adding in the conspec system:
Code: [Select]
cond
 *.eye5 30 >
 'conspec equals
start
 -8 .shoot store
stop
Then add *.fertilized 0 != to the reproduction condition, and change .repro to .sexrepro.
BTW not that you are a newbie anymore  
« Last Edit: October 19, 2008, 12:30:56 AM by bacillus »
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
sexrepro code
« Reply #2 on: October 19, 2008, 12:49:50 AM »
Ok, so something like this for the reproduce and the avoid conspec gene?

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']
...

'avoids conspecs
' ******************


cond
*.eye5 30 >
'conspec equals
start
-8 .shoot store
stop

cond
*.type 1 =
*.eye5 20 >
*.refeye *.myeye =
*.multi 1 =
*.newmom 0 =
*.robage 50 >
start
5 .avoid store
stop

cond
*.avoid 0 >
start
0 .fixpos store
15 .sx store
.avoid dec
1 .tienum store
.fixpos .tieloc store
1 .tieval store
stop

'reproduce
' *************
cond
*.type 1 =
*.nrg 5000 >
*.fertilized 0 !=
start
1 .deltie store
stop


By the way, what does "1 .deltie store" have to do with reproducing? Why isn't it "50 .repro store"? Thanks!

BTW Once I've made my own bot, I've passed into non-newbiehood. In the meantime...
« Last Edit: October 19, 2008, 12:51:26 AM by jknilinux »

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
sexrepro code
« Reply #3 on: October 19, 2008, 10:04:46 AM »
Quote from: jknilinux
Ok, so something like this for the reproduce and the avoid conspec gene?

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']
...

'avoids conspecs
' ******************


cond
*.eye5 30 >
'conspec equals
start
-8 .shoot store
stop

cond
*.type 1 =
*.eye5 20 >
*.refeye *.myeye =
*.multi 1 =
*.newmom 0 =
*.robage 50 >
start
5 .avoid store
stop

cond
*.avoid 0 >
start
0 .fixpos store
15 .sx store
.avoid dec
1 .tienum store
.fixpos .tieloc store
1 .tieval store
stop

'reproduce
' *************
cond
*.type 1 =
*.nrg 5000 >
*.fertilized 0 !=
start
1 .deltie store
//added
50 .sexrepro store
//added
stop


By the way, what does "1 .deltie store" have to do with reproducing? Why isn't it "50 .repro store"? Thanks!

BTW Once I've made my own bot, I've passed into non-newbiehood. In the meantime...
Probably for deling the birthtie or something, no wait where is it for? Birthtie isn't at spot 1 is it?

I just added this little line in the code. You can better also look for normal .repro conditions and delete those. Well, if you don't want to have that kind of reproduction.
Quote
//added
50 .sexrepro store
//added
Oh my god, who the hell cares.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
sexrepro code
« Reply #4 on: October 19, 2008, 10:31:48 AM »
The parrent birth tie is 0 and the child tie is 1...
So just have
*.robage 0 =
.deltie inc
somewhere...

And the
'conspec equals
part, should be replaced with something like
*.refshoot *.myshoot =
*.refeye *.myeye = and

And you may also wan't to take a look at the conditions in the veggy... if a bot only reproduces with a certain amount of energy then there's no need to try and fertilize it if it doesn't have enough energy to repoduce anyway... and if your bot avoids it's own species then you need to chase them when you wan't to fertilize someone.
Also the veggy uses volontary movement so it will have a hard time fertilizing it's own kind... however if the inchworm ferilizes it by accident or mutation then it'll reproduce and may become an inchworm who gains energy every cycle.

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
sexrepro code
« Reply #5 on: October 20, 2008, 02:20:18 PM »
Quote from: Moonfisher
The parrent birth tie is 0 and the child tie is 1...
So just have
*.robage 0 =
.deltie inc
somewhere...

And the
'conspec equals
part, should be replaced with something like
*.refshoot *.myshoot =
*.refeye *.myeye = and

And you may also wan't to take a look at the conditions in the veggy... if a bot only reproduces with a certain amount of energy then there's no need to try and fertilize it if it doesn't have enough energy to repoduce anyway... and if your bot avoids it's own species then you need to chase them when you wan't to fertilize someone.
Also the veggy uses volontary movement so it will have a hard time fertilizing it's own kind... however if the inchworm ferilizes it by accident or mutation then it'll reproduce and may become an inchworm who gains energy every cycle.

Fertilization wasn't what I was trying to do. These were the planned settings:

large field, few veggies
High Brownian motion
DNA scripts that kill anything with .repro, up, dn, etc...
DNA scripts that kill anything w/o .sexrepro
0 costs, except for negative per-bot costs for MBs and ~.01 nrg per cycle.

I was thinking this should encourage complex multicellular evolution, maybe producing ameoba-like MBs. I was under the impression that if the I2s .sexrepro'ed with the veggies, the children would not be hybrid algae, because then the new algae could quickly learn how to move and kill everything. So we don't allow that, right? Otherwise, current fertilization of algae should only make super-algae. Unless...

You can't store .sexrepro shots from an algae and fire them later at another algae, right?


Anyway, thanks for all the suggestions. The current code works (they can reproduce), but I found a problem- I2 is extremely slow in 2.44. Maybe 5 minutes to move a few inches, with 15c/s. Was it always like that, or is it a recent physics change or something? Also, when they repro a few times (no mut), the offspring have one huge cell and one tiny cell, and the tiny cell cannot move at all because of the huge thing dragging behind it.
Does anyone know a better MB that only uses ties to move?

Thanks!!!
« Last Edit: October 20, 2008, 03:23:56 PM by jknilinux »

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
sexrepro code
« Reply #6 on: October 21, 2008, 08:05:25 PM »
So, does anyone know a better MB that moves only by using ties?

Offline bacillus

  • Bot Overlord
  • ****
  • Posts: 907
    • View Profile
sexrepro code
« Reply #7 on: October 21, 2008, 11:32:44 PM »
No, but I think it was suggested at one time to make a two-celled bot, one end fixes itself and the other swings forward, then they exchange positions.
"They laughed at Columbus, they laughed at Fulton, they laughed at the Wright brothers. But they also laughed at Bozo the Clown."
- Carl Sagan

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
sexrepro code
« Reply #8 on: October 22, 2008, 01:10:54 PM »
It could be several things that go against inchworm, coul be the fluid resistance preventing it from moving (you could try it with no fluid resistance and see what happens), or it could be that ties don't adjust very fast, or maybe inchworm doesn't stiffen the ties, not sur how it worked back then...
If it's just the fluids, then you can let the unfixed bot shrink in size... feel free to steal the body regulating code from Fruitflies (It'll get you to 1 I body size rather fast, should leave very litle fluid resistance. (Remember to grow big again if you need to shoot at something)

If the bot doesn't have 40 .stifftie store in there somewhere then that might help...

And if it's the ties in general that's a problem, then you need to do as bacillus said and swing the bot instead (Again reduce it's size to reduce the fluid resistance). And it's easier to fix the angle and turn in order to swing a bot (tie angles work in a very odd way from my experience).

I'd toy around with this myself, but not sure I have the time atm, just started a new job, so many new things to take in, kind of tired in the evening and got all sorts of stuff going on latley, not enough time for DB :'(

If your veggies use .sexrepro then bots can fertilize them with a -8 shot and their offspring would be a mix of the bots genes and it's own, sometimes many of the bots genes. So if your veggies reproduce sexualy then they stand a good chance of stealing the bots genes, it's bound to happen sooner or later.
I'd recommend regular reproduction for the veggies...

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
sexrepro code
« Reply #9 on: October 22, 2008, 02:00:31 PM »
Quote from: jknilinux
So, does anyone know a better MB that moves only by using ties?
Tie-bot or tierbot maybe. I know it exists. Pretty old too for a working MB.

http://www.darwinbots.com/Forum/index.php?showtopic=2942

No, I think it is duo. Well atleast look at this league. One of them is moving by ties, atleast.
Oh my god, who the hell cares.

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
sexrepro code
« Reply #10 on: October 22, 2008, 02:06:29 PM »
Well, I'll try that sim later on this week, and I'll let you know if there are any problems.

The reason why the vegs need to use .sexrepro is because the sim settings will kill anything without it... I need to keep my bots using it, and I can't keep that setting from applying to the veggies, so I need the veggies to use it. I'll try different veg settings, maybe really huge deletion mutation rates for them....

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
sexrepro code
« Reply #11 on: October 22, 2008, 03:26:08 PM »
If the fluid resistance affects the movement caused through ties, then just keep high fluid resistance and a low energy gain per kiloveggy... then let the veggy stay big to gain energy with something like :
*.body *.nrg 3 mult <
*.body 30000 < and
*.nrg 30 mult *.body sub .strbody store

And only make small offspring :
*.nrg 7000 >
*.fertilized 0 > and
10 .sexrepro store


Then the alge will need to be big to gain energy, and babyes who don't grow will starve. Day and night cycles would probably also help a lot. And pond mode with some gravity might also make things interesting, add some boyancy to the alge, this would also make them reproduce more often with eachother since the group at the surface and bottom...

Either way the point is that if the alge need to be realy big to gain energy they're less likely to evolve movement... or atleast it would be a different kind of movement, would be very interesting if something actualy did evolve, so either way you win

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
sexrepro code
« Reply #12 on: October 22, 2008, 04:04:26 PM »
Another trick if big veggies are the goal: there's a veggy feeding method called quadratically based on body (or something like that).  It'll feed veggies increasingly more the more body they have.  So a bot with 32000 body would get more nrg than 32 bots with 1000 body.

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
sexrepro code
« Reply #13 on: October 23, 2008, 11:06:10 AM »
Regarding multibots that move I do not know about complete bots, but I worked on some genes enabling crawling with ties I will attach the specific bots.
Also was the crossover code not fucked up? I tried an simple organism with sexrepro a while ago and the bug reportabout sims crashing when I did run it is still open.

Edit: Beware there is a spot where I wrote *.readtie writpos store but is supposed to be *.readtie .writpos store the .  is lacking .
« Last Edit: November 01, 2008, 07:16:48 AM by Welwordion »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
sexrepro code
« Reply #14 on: October 23, 2008, 04:47:04 PM »
No idea.  If you're up for it try it again and see if it's still borked in the latest version, and then bump the bug thread if it is.  At the very least when Eric starts going through the bugs again he can maybe bump it up in his priority list.