Darwinbots Forum
Welcome To Darwinbots => Newbie => Topic started by: Houshalter on January 02, 2010, 08:33:40 PM
-
This is a noob question since im sure someones tried something like this before, but what if we sped up evolution by putting all the best human created bots together in a simulation and forcing them to sexually reproduce. That way all the best genes would mix together and with survival of the fittest the best combination would survive (hopefully). You would just have to get a bunch of bots and change their .repro to .sexrepro and make a veggie that would target bots and fire -8 shots at them. You could make the costs low so the mutant hybrids would have some chance at survival. Mutations would hopefully modify the genes so they work together with each other better, and since its sexual reproduction only, the best genes would be spread through the population quickly. Just wondering if anyones tried anything like that and what the results were.
-
I don't think anyone's tried this. You're welcome to give it a go and see what results. I imagine most bots are too different from each other to produce viable children, though.
-
I did all that and after about 20k cycles all the bots were dead except for a bunch of tie bots. something about there dna lets them produce successful offspring when fertilized by the modified animal_minimalis I used as a veggie. I ran the simulation without the tiebots and the other bots survived for a bit but then all but a small handfull of the bots I had in the sim died. Its something about the competitive nature of the bots. I can't get them to intermingle and combine their dna. I'm going to try some other things like smaller sim sizes. It might also be because I disabled the vision on the vegs to keep them from combining dna from more powerfull bots and wiping out everything.
-
You could program a mod for darwinbots that scrambles a gene list, and lets 2 scrambled bots compete with each other, and let the winner compete with a new scrambled bot.
-
Sexual reproduction doesn't work at all for some reason. The female doesn't use any of the males dna when she reproduces making it just another form of asexual reproduction. I have another idea though. What if you copied the entire dna of each bot and pasted it at the end of a single bot making one super bot with hundreds of genes from dozens of bots. It wouldn't be very efficient but with mutations in place it could evolve some interesting behaviors.
EDIT: Heres FrankenstienBot in the attachment.
-
You need the bots to fire -8 shots at their own and even enemy bots. Then the bots getting hit need to reproduce before the fertilized counter runs out.
Also if the DNA is too far appart I think it doesn't mix well, may just take one or the other. I think you would have more luck adding this gene to the end of all the bots :
cond
*.vtimer 2 <
start
*.vtimer 0 =
*.genes rnd .mkvirus store
not
10 .vshoot store
stop
Not sure if this actualy works, haven't tested it, but you get the idea... just spread random genes through a virus from all the bots, see what happens...
If the sim stabilizes you can always throw in a few random bots manualy to spice things up again, see if some new genes catch on...
But I wouldn't add any realy small tie feeders like fruitflies or rapebots (lovebot, quickdraw and Saber).
-
I did have the veggies targeting the bots and firing - 8 shots at them. I was hoping the gene that causes them to shoot - 8 shots would get mixed in with the other bots but it just takes the dna of the longer bot and copys it (although I noticed after a while the bots got close to veggies when the wanted to reproduce to get the -8 shots.) Also your idea sounds plausible but theres no way to stop a bot from getting duplicate genes. It just makes the genome grow longer and longer and longer. Maybe theres away to test the dnalength of all the genes and the delete any genes that are the same lengh. possibly useing .dnalen or something like it.
-
If you want genes to be mingled, then the virus approach would be the best one. Just have a virus that shoots a random gene every turn, or cycles through its genes, and if an infected cell has more genes than it should (normal + 2 genes), then it deletes one of its genes at random.
-
Like this?
start
*.vtimer 0 =
*.genes rnd .mkvirus store
*.vtimer 1 =
.vshoot inc
*870 0 =
*.genes 870 store
*.genes 3 add *870 =
*.genes rnd .delgene
stop
It seems to work but this is my first virus so I might have messed up or something. I just loaded it as a veggie to let it infect other species. I also disabled its vision to prevent it from absorbing the dna of more powerful bots then using it to wipe out everything. One thing I noticed is that at first the virus shots travel only as far as any other type of shot but then later in the simulation they just go on and on and on and on etc, etc. Also the number of genes in the bot continues to grow even though it only takes up to 2 new genes every generation. (100 generations times 2 is 200 new genes! Most of them are probably duplicates to.)
-
Seems like it should work. But either way by spreading viral defences and slime genes it would counter the effect of the virus. Also bots with a genome too long will mutate too much to survive, so they should adapt.
You can always set a longer interval for shooting out a new gene so you don't spam the bots too much with random DNA...
Like
*.robage 300 mod 0 =
*.robage 10000 < and
This way you would be able to regulate how many new genes you want floating around the sim.
-
Heres a new version of the virus:
start
*.vtimer 0 =
*.genes rnd .mkvirus store
*.vtimer 1 =
.vshoot inc
*870 0 =
*.genes 870 store
*.genes *870 >
*.genes rnd .delgene
*.robage 0 =
100 rnd 871 store
*871 66 >
870 dec
0 871 store
*871 33 <
*871 0 != and
870 inc
0 871 store
*871 33 >
*871 66 < and
0 871 store
'the following is optional for deleting extra virus genes
'*872 *.thisgene !=
'*.thisgene 872 store
'*872 *.thisgene !=
'*872 .delgene store
stop
Two things are different now if a bot successfully reproduces with the virus gene then the offspring will have a 33% chance of either adding a new gene, deleting a gene or keeping the same number of genes. There is also now an optional piece of dna for deleting extra viruses. You can also put in that piece that causes it to shoot every so many cycles but I wouldn't because it already takes long enough to spread the virus at the begging of the sim. Also the virus won't be able to penetrate bots with working virus resistance genes therefore it can't spread them unless the virus starts the sim already in the bots dna.
-
A viral defence won't be able to delete this virus since it spreads random genes, so any attemt to delete it will just delete the gene it's trying to spread (So the bot will loose some genes till it hits the virus)
But the genes spread from other bots will still pass most viral defences since they're not hostile, also mutations will break parts of viral defences (Which in this case may prove to be an advantage)
Only slime bots will be able to stay clean for a while, but sooner or later something is bound to get through. If you're planning to run the sim for a long time then eventualy everything will be infected, and ou don't want to overdo it. If you have 2 new genes per generation it's not quite the same as 2 mutations per gen, a lot of mutations aren't functional or just cause a minor tweek.
But I like the idea of deleting or adding genes, together with mutations it should help keep the dna length down, since bots that are too long will mutate too much, making the virus itself a benefitial gene of sorts.
Also you mentioned the virus shots lasting longer aorund the end. This could be a different virus from one of the bots, but it could also mean your own virus is mutating to fire stronger shots, making the new virus more potent and widespread. So instead of evolving the bots you're evolving a stronger virus. I'm not sure it's realy a problem though, maybe making the alge imune to viruses would help (This way the virus depends on the bots to survive, but it may take a semi large sim for it to work)
EDIT :
Firgured I'd give it a try too, using this gene :
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']start
*.vtimer 0 =
*.genes rnd .mkvirus store
*.vtimer 1 =
*.robage *.dnalen mod 0 = and
10 .vshoot store
stop
start
*971 0 =
*.genes 971 store
*.robage 0 =
100 rnd 20 < and
971 inc
*971 *.genes >
*.genes rnd .delgene store
stop
This way the longer the genome the less often it spread the virus. Also it doesn't remove genes, only adds (Mutations should take care of deleting genes)
Also I introduce selected bots from F1 that I know have some nice genes, and a viral defence that won't block the behavior of this virus. (Starting with the weakest)
This way the bots have time to get infected so they can pass off some genes to the next species.
-
The virus eventually develops to become harmful in every sim I've tried. You can tell by the costx graph (I have the dynamic costs really sensitive). In the begging it rises as the bots compete against each other and natural selection and all that and then it drops suddenly. It continues to fall untill it reaches -30 or somethin and theres only six bots left and then they eventually die to. I wonder if theres anything we can do to make the virus favor working with its host. I could raise the dna upkeep cost and increase minor/major deletion rates and make the vegs immune. Anything else?
Second how did you make the scrolling codebox?
Last look at this, its simmilar to what the virus is supposed to do. Here (http://en.wikipedia.org/wiki/Horizontal_gene_transfer).
-
I think the trick is the "mice in the haystacks". Get a bunch of seperate simulations going, where most of the time they're separated. Then mix them a bit for a brief time and then separate them again. If a virus kills off all the bots in a "haystack", it'll get repopulated from a more successful one. It helps prevent catastrophic extinction.
-
In the end I couldn't get the different species to coexist long enough to transfer genes, so I just shoved the dna from 3 bots into the alge and disabled movement and such (And added a gene for zeroing out certain vars)
The last gene is the one spreading the other genes as viruses. And it spreads itself more often to make sure most bots get the gene for cleaning up excess genes.
So far everything I've tryed leads to the dna growing way too fast.
This is what I'm trying atm...
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']def realgenes 121
def rightgenes 122
def random 123
def huntx 124
def hunty 125
def hunt 126
def huntnr 127
def nrone 128
def spread 973
def key 500
def hunttime 5
def ouch 10
def cycle 20
def switch 10
def count 950
def spin 951
def count1 952
cond
*.memval 1904 !=
*.eye1 *.eye9 !=
*.eye1 *.eye5 >
*.eye9 *.eye5 > or
start
*.eye1 *.eye9 sub sgn 139 mult .aimsx store
stop
cond
*.memval 1904 !=
*.eye2 *.eye8 !=
*.eye2 *.eye5 >
*.eye8 *.eye5 > or
start
*.eye2 *.eye8 sub sgn 104 mult .aimsx store
stop
cond
*.memval 1904 !=
*.eye7 *.eye3 !=
*.eye3 *.eye5 >
*.eye7 *.eye5 > or
start
*.eye3 *.eye7 sub sgn 70 mult .aimsx store
stop
cond
*.memval 1904 !=
*.eye6 *.eye4 !=
*.eye4 *.eye5 >
*.eye6 *.eye5 > or
start
*.eye4 *.eye6 sub sgn 35 mult .aimsx store
stop
cond
*.memval 1904 !=
*.eye5 0 >
*.robage 1 >
start
*.refxpos *.refypos angle .setaim store
stop
cond
*.spin 30 =
start
0 .spin store
stop
cond
*.eye5 50 <
*.eye5 0 > and
*.memval 1904 != and
*.spin 20 >= or
start
*.refvelup 20 add .up store
*.refveldx .dx store
.spin inc
stop
cond
*.eye5 50 >
*.memval 1904 !=
start
*.refvelup .up store
*.refveldx .dx store
stop
cond
*.eye9 0 =
*.eye8 0 =
*.eye7 0 =
*.eye6 0 =
*.eye5 0 =
*.eye4 0 =
*.eye3 0 =
*.eye2 0 =
*.eye1 0 =
*.spin 20 <
start
300 .aimsx store
.spin inc
stop
cond
*.memval 1904 =
*.robage 2 >
*.spin 20 <
start
200 .aimsx store
.spin inc
stop
'****************
'* Reproduction *
'****************
cond
*50 1 =
start
628 .aimsx store
0 50 store
stop
cond
*.nrg 1000 >
*.body 500 >
*.eye5 50 <
start
628 .aimsx store
51 .repro store
1 50 store
stop
cond
*.robage 0 =
start
955 4 rnd add .memloc store
1904 955 store
1904 956 store
1904 957 store
1904 958 store
1904 959 store
1 .tie store
0 .out1 store
0 .aimsx store
.shoot .vloc store
.shoot .ploc store
100 .mkshell store
100 .strpoison store
stop
cond
*.robage 1 =
start
1 .deltie store
314 .aimsx store
stop
'********
'* Body *
'********
cond
*.body 20 >
*.nrg 500 <
start
100 .fdbody store
stop
cond
*.nrg 1000 >
*.robage 2 >
start
100 .strbody store
stop
'****************
'* Adaptive Armour *
'****************
'1 poison
'2 shell
'3 Poison + Shell
cond
*.in1 *.out1 !=
*.in1 0 !=
*.out1 3 <
*.memval 1904 =
start
*.in1 .out1 store
stop
cond
*.shflav -1 =
*.shflav 0 > or
*.out1 2 <
start
1 .out1 store
stop
cond
*.shflav -1 =
*.shflav 0 > or
*.out1 2 =
start
3 .out1 store
stop
cond
*.shflav -6 =
*.shflav -3 = or
*.out1 0 <
start
2 .out1 store
stop
cond
*.shflav -6 =
*.shflav -3 = or
*.out1 1 =
start
3 .out1 store
stop
cond
*.nrg 500 >
*.poison 500 <
*.out1 1 =
*.out1 3 = or
start
100 .strpoison store
stop
cond
*.nrg 500 >
*.shell 450 <
*.out1 1 >
start
500 *.shell sub .mkshell store
stop
cond
*.numties 0 >
*.robage 10 >
start
*.tiepres .tienum store
.tieval .tieloc store
3000 .tieval store
*.tiepres .deltie store
*.tieval 3000 div .tieloc store
.sharewaste inc
stop
'************
'* Shooting *
'************
cond
*.waste 100 >
start
*.waste .shootval store
-4 .shoot store
stop
cond
*.memval 1904 !=
*.eye5 5 >
*.refnrg 1500 <
*.refshell 50 > or
*.refpoison 0 = or
start
*.refxpos *.refypos dist 100 div -1 mult .shootval store
-1 .shoot store
stop
cond
*.memval 1904 !=
*.eye5 5 >
*.robage 1 >
start
' *.refxpos *.refypos dist 100 div -1 mult *.refxpos *.refypos dist 500 div sub .shootval store
*.refxpos *.refypos dist 100 div -1 mult .shootval store
-6 .shoot store
stop
cond
*.venom 100 <
start
100 *.venom sub 0 floor 100 ceil .strvenom store
stop
cond
*.count 0 >
start
.count dec
stop
cond
*.memval 1904 !=
*.eye5 20 >
' *.refpoison 0 =
*.count 0 =
*.refeye 0 >
start
.shoot .vloc store
-3 .shoot store
-2 .venval store
50 .shootval store
5 .count store
stop
cond
*.memval 1904 !=
*.eye5 20 >
*.count 0 =
*.refeye 0 >
*.refshell 5 >
start
.mkshell .vloc store
-3 .shoot store
-200 .venval store
50 .shootval store
0 .count store
stop
cond
*.genes 33 !=
*.sexrepro 0 != or
*.mrepro 0 != or
start
0 .repro store
0 .sexrepro store
0 .mrepro store
stop
cond
*.delgene 0 !=
*.shoot -2 = or
start
0 .delgene store
0 .shoot store
stop
'venom reloading
cond
*.venom 200 <
*.nrg 1200 >
start
100 .strvenom store
stop
'poison reloading
cond
*.poison 400 <
*.nrg 1100 >
start
100 .strpoison store
stop
'increasing shell
cond
*.shell 250 <
*.nrg 1500 >
start
100 .mkshell store
stop
'restoring venval if wrong
'restoring vloc if wrong
cond
*.venval -2 !=
*.vloc .shoot !=
start
-2 .venval store
.shoot .vloc store
stop
'countershooting venom
cond
*.shflav 0 !=
*.shflav -2 !=
start
*.shang .aimshoot store
100 .shootval store
-3 .shoot store
0 .shflav store
stop
'setting up venval vloc and ploc at birth
cond
*.robage 0 =
start
100 .strvenom store
.tie inc
-2 .venval store
.shoot .vloc store
.shoot .ploc store
stop
'deleting birthtie
cond
*.robage 1 =
start
.deltie inc
stop
'setting venval back if it is zero, yes I know it is double,
'but if I change this I have to change the last gene too smile.gif.
'that is so much work.
cond
*.venval 0 =
start
-2 .venval store
stop
'secret, well no, if someone if funny enough to set ploc to zero, this sets vloc to zero.
cond
*.ploc 0 =
start
.vloc .ploc store
stop
'shoots poison
cond
*.eye5 25 >
*.refeye *.myeye !=
*.memval -2 !=
*.refeye 0 !=
start
50 .shootval store
-3 .shoot store
stop
'setting outer eyes
start
460 .eye9width store
520 .eye9dir store
460 .eye1width store
-520 .eye1dir store
stop
'if opponent go closer
cond
*.eye5 0 >
*.refeye *.myeye !=
*.refshoot *.myshoot !=
or
*.eye5 45 <
start
*.refxpos *.refypos angle .setaim store
*.refveldx .dx store
*.refvelup 50 add .up store
stop
'turn if shooting nrg or if another multuply in front.
cond
-2 *.shoot =
*.refeye *.myeye =
*.eye5 0 !=
and
or
start
0 .shoot store
0 .shootval store
100 .aimdx store
stop
'turning
cond
*.eye5 0 =
start
10 .up store
*.eye9 *.eye1 sub 4 mult .aimdx store
*.eye8 *.eye2 sub 3 mult .aimdx store
*.eye7 *.eye3 sub 2 mult .aimdx store
*.eye4 *.eye6 sub .aimsx store
stop
'selecting favor for -6
cond
*.refeye *.myeye !=
*.refshoot *.myshoot !=
or
*.refpoison *.refshell =>
*.eye5 0 >
start
16 .shootval store
-6 .shoot store
stop
'selecting favor for -1
cond
*.refeye *.myeye !=
*.refshoot *.myshoot !=
or
*.refpoison *.refshell <
*.eye5 0 >
start
16 .shootval store
-1 .shoot store
stop
'if nothing speed up
cond
*.eye3 0 =
*.eye4 0 =
*.eye6 0 =
*.eye7 0 =
start
100 .up store
stop
'get rid of waste
cond
*.waste 100 >
start
*.waste .shootval store
-4 .shoot store
stop
'reproduce
cond
*.nrg 4000 >
*.eye5 0 =
start
50 .repro store
628 .aimleft store
100 .strbody store
stop
'if something wrong duplicate and give all nrg to offspring
cond
*.paralyzed 25 >
*.poisoned 25 > or
*.pwaste 25 > or
start
99 .repro store
stop
'more body become bigger
cond
*.nrg 1000 >
*.body 500 <
start
100 .strbody store
stop
'leaching
cond
*.tiepres 0 >
start
*.tiepres .tienum store
.tieval .tieloc store
1000 .tieval store
stop
'if low on nrg pump body back.
cond
*.nrg 250 <
start
100 .fdbody store
stop
'if it has pain run
cond
*.nrg 250 <
*.pain 50 >
start
250 .sx store
stop
'stop fixing
cond
*.fixed 0 !=
start
0 .fixpos store
stop
'this gene checks if anything that can be made is negative, if so unnegative it.
cond
*.mkshell 0 <
*.mkshell 0 < or
*.strvenom 0 < or
*.strpoison 0 < or
start
0 .mkshell store
0 .mkshell store
0 .strvenom store
0 .strpoison store
stop
'viruschecker
cond
*.genes 27 !=
*.sexrepro 0 != or
*.mrepro 0 != or
start
0 .repro store
0 .sexrepro store
0 .mrepro store
0 .mkvirus store
0 .vshoot store
0 .delgene store
stop
cond
*.realgenes *.genes !=
start
*.genes .realgenes store
stop
cond
*.rightgenes 0 =
start
*.genes .rightgenes store
stop
cond
*.robage 0 =
start
*.tiepres .deltie store
100 .eye1width store
100 .eye9width store
.key 971 store
.key 972 store
1 rnd .random store
971 *.random add .memloc store
971 *.random add .tmemloc store
.shoot .vloc store
-2 .venval store
.setaim .ploc store
stop
cond
*.robage 0 =
*.spread 1 =
start
682 .aimsx store
stop
cond
*.numties 0 >
*.eye5 50 >
*.memval .key !=
start
.tieloc .shoot store
stop
cond
*.numties 0 >
*.trefnrg 2000 >=
*.trefbody 300 < or
*.totalmyspecies 100 < or
start
-1 .shootval store
stop
cond
*.numties 0 >
*.trefnrg 2000 <
*.trefbody 300 >=
*.totalmyspecies 100 >=
start
-6 .shootval store
stop
cond
*.numties 0 >
*.tmemval .key =
start
*.tiepres .deltie store
stop
cond
*.eyef 0 >
*.memval .key !=
*.refshell 0 !=
*.refeye 0 != or
*.refshoot 0 != or
*.memval 0 != or
start
0 .hunt store
*.refxpos .out3 store
*.refypos .out4 store
1 .out5 store
stop
cond
*.eyef 0 =
*.memval .key = or
start
0 .out3 store
0 .out4 store
stop
cond
*.in3 0 !=
*.in4 0 !=
*.eyef 0 >
*.memval .key =
*.totalmyspecies 150 >
*.in5 *.huntnr <=
*.huntnr 0 = or
start
*.robage .hunt store
*.in3 .huntx store
*.in4 .hunty store
*.in5 .huntnr store
stop
cond
*.hunt 3 add *.robage <
start
0 .huntnr store
stop
cond
*.in3 0 !=
*.in4 0 !=
*.eyef 0 >
*.memval .key =
*.totalmyspecies 150 >
'*.robage 5 mod 0 =
*.in5 3 <
start
*.in3 .out3 store
*.in4 .out4 store
*.in5 1 add .out5 store
stop
cond
*.hunt .hunttime add *.robage >=
*.nrg 100 >
*.robage 20 >
start
0 .focuseye store
*.huntx *.hunty angle .setaim store
*.huntx *.xpos sub abs *.hunty *.ypos sub abs pyth 10 div 10 sub 10 *.huntnr mult sub 50 ceil .up store
*.velsx .dx store
stop
cond
*.eyef 0 =
*.memval .key = or
*.robage .cycle mod .switch <=
*.pain .ouch <
*.robage 10 >
*.hunt .hunttime add *.robage <
start
120 .aimsx store
0 .focuseye store
stop
cond
*.eyef 0 =
*.robage .cycle mod .switch >
*.hunt .hunttime add *.robage <
start
*.body 10 div 50 add .up store
stop
cond
*.eyef 0 !=
*.memval .key =
*.robage .cycle mod .switch >
*.pain .ouch <
*.hunt .hunttime add *.robage <
start
*.refvelup 10 add .up store
*.refveldx .dx store
stop
cond
*.eyef 0 =
*.memval .key = or
*.robage 3 mod 0 =
*.pain .ouch <
*.hunt .hunttime add *.robage <
start
0 .focuseye store
stop
cond
*.eyef 0 =
*.memval .key = or
*.robage 3 mod 1 =
*.pain .ouch <
*.hunt .hunttime add *.robage <
start
-4 .focuseye store
stop
cond
*.eyef 0 =
*.memval .key = or
*.robage 3 mod 0 =
*.pain .ouch <
*.hunt .hunttime add *.robage <
start
4 .focuseye store
stop
cond
*.eyef 0 >
*.memval .key !=
*.pain .ouch >= or
start
*.refveldx .dx store
stop
cond
*.eyef 0 >
*.memval .key !=
*.numties 0 =
*.pain .ouch <
start
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop
cond
*.eyef 0 >
*.memval .key =
*.numties 0 =
*.spread 0 =
*.robage 20 >= or
*.pain .ouch >=
*.robage .cycle mod .switch >
*.totalmyspecies 150 > and or
*.hunt .hunttime add *.robage <
start
*.refxpos *.refypos angle .setaim store
0 .focuseye store
stop
cond
*.eyef 0 >
*.memval .key !=
*.pain .ouch >= or
*.refxpos *.xpos sub abs *.refypos *.ypos sub abs pyth 150 >
start
*.refvelup *.refxpos *.xpos sub abs *.refypos *.ypos sub abs pyth 10 div add .up store
stop
cond
*.eyef 0 >
*.memval .key !=
*.pain .ouch >= or
*.refxpos *.xpos sub abs *.refypos *.ypos sub abs pyth 150 <=
start
*.refvelup .up store
stop
cond
*.eye5 0 >
*.focuseye 0 =
*.memval .key !=
*.totalmyspecies 70 <
*.numties 0 =
*.refshell 0 !=
*.refeye 0 != or
*.refshoot 0 != or
*.memval 0 != or
start
0 .up store
*.refveldx 20 add .dx store
*.refvelup 20 add .dn store
stop
cond
*.eye5 0 >
*.focuseye 0 =
*.memval .key !=
*.numties 0 =
*.refshell 0 =
*.refeye 0 =
*.refshoot 0 =
*.memval 0 =
start
1 .tie store
-6 .shoot store
stop
cond
*.eyef 0 >
*.memval .key !=
*.focuseye 0 =
*.numties 0 =
*.body 50 >
start
-6 .shoot store
stop
cond
*.nrg 100 >
*.body 100 >
*.nrg *.body 2 mult <
start
100 .fdbody store
stop
cond
*.body 400 >
*.nrg *.body 3 mult >
start
100 .strbody store
stop
cond
*.nrg 11000 >
*.nrg *.body >
start
1000 .strbody store
stop
cond
*.robage 5 mod 0 =
*.eye5 20 >
*.focuseye 0 =
*.memval .key !=
*.venom 5 >
start
-3 .shoot store
stop
cond
*.numties 0 >
*.robage 5 mod 0 =
start
.tieloc .vloc store
-1 .venval store
stop
cond
*.numties 0 >
*.robage 5 mod 0 =
*.totalmyspecies 100 >
start
-6 .venval store
stop
cond
*.numties 0 =
*.robage 5 mod 0 =
start
.shoot .vloc store
-2 .venval store
stop
cond
*.robage 0 =
*.spread 0 !=
start
682 .aimsx store
stop
cond
*.nrg 3000 %=
*.body 1000 %=
*.totalmyspecies 70 <
start
1 .spread store
stop
cond
*.spread 0 !=
*.nrone 0 =
*.robage 20 <
*.eye5 0 >
*.memval .key =
start
200 .aimsx store
*.velsx .dx store
50 .up store
stop
cond
*.spread 0 !=
*.robage 20 >
*.totalmyspecies 70 >
start
0 .spread store
stop
cond
*.shell 100 <
*.nrg 100 >
*.totalmyspecies 70 >
start
20 .mkshell store
stop
cond
*.venom 100 <
*.nrg 80 >
*.totalmyspecies 60 >
start
20 .strvenom store
stop
cond
*.poison 50 <
*.nrg 100 >
*.totalmyspecies 70 >
start
10 .strpoison store
stop
cond
*.nrg 100 <
*.body 10 >
start
50 .fdbody store
stop
cond
*.nrg 100 >
*.robage 10 <
*.eyef 0 =
*.memval .key = or
start
50 .up store
stop
cond
*.numties 0 >
*.robage 5 mod 0 =
start
*.tiepres .delties store
stop
cond
*.fixpos 0 !=
start
0 .fixpos store
stop
cond
*.numties 0 >
start
*.tiepres .tienum store
40 .stifftie store
1 .tielen store
99 .sharenrg store
.tieval .tieloc store
1000 .tieval store
*.trefxpos *.trefypos angle .setaim store
0 .focuseye store
stop
cond
*.numties 0 >
*.robage 9 mod 0 =
*.robage 10 >
start
.fixpos .tieloc store
1 .tieval store
stop
cond
*.nrg 300 >
*.body 100 > and
*.totalmyspecies 100 < and
*.nrg 1000 >
*.body 300 > and
*.totalmyspecies 100 >= and or
start
52 .repro store
stop
cond
*.shoot 0 !=
*.shoot -1 !=
*.shoot -3 !=
*.shoot -4 !=
*.shoot -6 !=
*.shoot .tieloc !=
start
0 .shoot store
0 .shootval store
stop
cond
*.strbody 0 <
start
0 .strbody store
stop
cond
'*.repro 22 !=
*.repro 52 !=
*.repro 0 !=
start
0 .repro store
stop
cond
*.realgenes *.rightgenes !=
start
0 .vshoot store
0 .sexrepro store
0 .mrepro store
0 .mkvirus store
1 .mkshell store
1 .strvenom store
0 .strpoison store
0 .mkslime store
0 .aimsx store
0 .aimdx store
0 .dn store
0 .sx store
0 .fdbody store
0 .fixpos store
0 .delgene store
stop
start
true
0 .shoot store
0 .tie store
0 .tieloc store
0 .ploc store
0 .vloc store
0 .delgene store
*.shell - .mkshell store
*.poison - .strpoison store
stop
start
*.vtimer 0 =
*.genes rnd .mkvirus store
*.timer 3 mod 0 = and
*.thisgene .mkvirus store
*.vtimer 1 =
*.robage 500 mod 0 = and
10 .vshoot store
*971 0 =
*.genes 971 store
*.robage 0 =
*971 *.genes = and
100 rnd 20 < and
971 inc
*971 *.genes <
*.genes rnd .delgene store
stop
As for the codebox I just select it from the menu to the left, not sure why it comes up that way.
-
I can't get the virus to spread when the vegs are virus immune but if they aren't virus immune the virus kills everything . Maybe if I make the vegs virus immune and make the mutation rates rediculously high. That way bots that share genes with each other would have an advantage against degrading dna. Also you could disable mutations entirely so theres no chance of the virus becoming mutated, it would just be sharing genes.
To get the different species to survive long enough to mix genomes you could try turning the cost multiplier to a negative number and under "shot energy exchange method" I think you can change how powerful shots are. If you make them almost no effect then the bots can't eat each other altough it may give in advantage to tie bots.
Im going to try all these tomorrow and tell you how it goes.
-
Did you try the "mice in a haystack" thing nums sugested ?
Just place an obstacle across the screen splitting it in two, and move it aside now and then to mix the bots, or if one side got whiped out.
Also you should consider what kind of bots you're using, it may just be a virus from one of the other bots.
Also using .vshoot inc will send out a very weak shot, so the most likely mutation I can thing of would be breaking the condition, so .vshoot inc is called while the virus is loading, so if you're channeling a big gene by the time you're ready to fire vshoot will be rather big. Not sure if this is how it works, but last I tryed evolvig the wiki bot it evolved into moving fast forward while reproducing so the first offspring would get in the way and alow the line .repro inc to accumulate a big enough sum to make a sizeable offspring.
I guess my point in that would be that 10 (Or more) .vshoot store would be more stable.
The last virus alge I posted worked a lot better, but deleting random genes when infected doesn't seem to be the best solution for evolution to work. Gonna try spreading viruses a lot slower this time, and maybe use slime as the genome is getting too long.
-
Did you try the "mice in a haystack" thing nums sugested ?
Yes I split the screen into three or four parts and made tiny opennings so that a small bot or stray virus could get through but it would have to be far superior to anything already in that section to take root and multiply.
Also you should consider what kind of bots you're using, it may just be a virus from one of the other bots.
I haven't downloaded that many bots from the bestiary or wiki yet so I didn't have to worry about that.
I guess my point in that would be that 10 (Or more) .vshoot store would be more stable.
In one sim I tried I had the .vshoot inc, along with a 10 .vshoot store, 100 .vshoot store, and 1,000 .vshoot store. The 1,000 .vshoot store was more succesful in spreading itself but it did eventualy die off without the vegies spreading the virus.
The last virus alge I posted worked a lot better, but deleting random genes when infected doesn't seem to be the best solution for evolution to work. Gonna try spreading viruses a lot slower this time, and maybe use slime as the genome is getting too long.
I haven't tried it yet but I immagine in time the virus will become hostile or die out. Also I was wrong higher mutations just makes the virus degrade faster instead of encourging gene sharing.
-
The best balance is usually *.nrg 10 div .vshoot store.
-
I made a new version of the virus:
start
*.vtimer 0 =
3 rnd 1 =
*.thisgene .mkvirus store
not
*.genes rnd .mkvirus store
*.vtimer 1 =
*.eye5 0 > and
*.nrg 15 div .vshoot store
*870 0 =
*.genes 870 store
*.genes *870 >
*.genes rnd .delgene
*.robage 0 =
100 rnd 871 store
*871 66 >=
870 dec
*.robage 1 =
*871 33 <=
870 inc
*.robage 1 =
0 871 store
*872 *.thisgene !=
*872 .delgene store
*.thisgene 872 store
stop
I made it more compact in some places. I also made it more likely (one in 3 chance if the rnd function works like I think it does) to make itself into a virus rather than some random gene. It now only shoots the virus when theres something in eye5 and it uses 1/15 of the bots energy (10% sounded a bit excesive). I got the virus to stabilize in a sim by makeing the vegs the virus and making them virus immune and mutation disabled. Its still hard for bots to spread genes cause most of the shots miss and just waste energy but at least they are shooting them. I have only tried one species at a time and I don't think it will be an easy task at all to make all the different bots share their genes like I origanly intended. I hope db3 makes viruses/sex easier.
-
I think sexual reproduction is going to need some work. It was too powerful in the leagues if used properly (or not ), and is a bit chunky and strange in its workings.