Welcome To Darwinbots > Newbie
sexrepro code
jknilinux:
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!
bacillus:
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: ---cond
*.eye5 30 >
'conspec equals
start
-8 .shoot store
stop
--- End code ---
Then add *.fertilized 0 != to the reproduction condition, and change .repro to .sexrepro.
BTW not that you are a newbie anymore
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
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...
Peter:
--- 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...
--- End quote ---
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
--- End quote ---
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.
Navigation
[0] Message Index
[#] Next page
Go to full version