Bots and Simulations > Evolution and Internet Sharing Sims
Mutation engine in bot code?
MacadamiaNuts:
With optisim or optimization sim I mean an evolution that doesn't change the DNA, but optimizes certain values, like % repro, nrg before repro, etc. Normal mutations are disabled, and all the changes are made within bot code.
Basically, at born, the new bot would inherit the values through racial memory (defaulting them if it missed), and modify them slightly.
At the end of the sim, DNA would look the same, but values would have reached an optimal value for that enviroment.
Animal Minimalis could be a good one to start. It has only 7 values to optimize.
MacadamiaNuts:
I modified Animal Minimalis so it uses .out1 and so, it allows cannibalism and speciation through evolution.
I'm running it now in two separated sims with teleporters set at once each 5000 cycles. (This is when a color sysvar would be quite handy...)
--- Code: ---cond
*.robage 21 =
*990 0 =
start
0 971 store
30 972 store
50 973 store
0 974 store
314 975 store
3000 976 store
90 977 store
100 978 store
100 .out1 store
1 990 store
stop
cond
*.robage 21 =
*990 1 =
start
*971 2 rnd 1 sub add 971 store
*972 2 rnd 1 sub add 972 store
*973 2 rnd 1 sub add 973 store
*974 2 rnd 1 sub add 974 store
*975 4 rnd 2 sub add 975 store
*976 100 rnd 50 sub add 976 store
*977 2 rnd 1 sub add 977 store
*978 2 rnd 1 sub add 978 store
*978 .out1 store
stop
cond
*.eye5 *971 >
*.out1 *.in1 !%=
start
*.refveldx .dx store
*.refvelup *972 add .up store
stop
cond
*.eye5 *973 >
*.out1 *.in1 !%=
*.refage 20 >
start
-1 .shoot store
*.refvelup .up store
stop
cond
*.eye5 *974 =
*.out1 *.in1 %= or
start
*975 rnd .aimdx store
stop
cond
*.nrg *976 >
start
*977 .repro store
stop
end
--- End code ---
Numsgil:
Neat idea, I'd like to know what happens with the bots. I did some experiments with dom invincibalis (PYs bot) when I first joined DB. Found that by playing with the reproduction nrg threshold, I could make the bot significantly stronger or weaker in a match.
You might want to make it so that there's a good chance of not changing any values. Generally this is like a mutations, and something like 1 mutations pe generation is about as high as you want to go. Otherwise you start dealing with a mutation meltdown and Muller's ratchet.
MacadamiaNuts:
I discovered that the %= operator is biased.
10% of 105 is 10, but 10% of 95 is 9.
Found that when I saw a bot happily feeding on another that just kept spinning.
So, bots that use lower out1 will have an advantage on those with higher out1, but then, they will be more aggresive against mutants.
If out1 goes below 10, they will attack all mutants. Yuck.
Numsgil:
The ~= and %= aren't great operators. I'd recommend instead something like this:
val threshold sub abs targetvalue <=
Navigation
[0] Message Index
[#] Next page
Go to full version