Author Topic: developing self tuning bot based on evolution / dna  (Read 3391 times)

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
developing self tuning bot based on evolution / dna
« on: March 29, 2010, 10:05:27 AM »
I am not sure if this already has been done, i'm working on the following :

A simulation that competes for the best bot parameters.
For example a big impact of A and B in the following :

Cond
*.nrg > A
start
B .repro Store
stop


In my sim each plant has a random out1 for A and out2 for B
Robots startup and take the first valeus from the plant they see first (kinda random).
Also the robot will then put A for out1 and B for Out2 as a result their ofspring will also use those.
Since robots also determine A and B for checking if they are relatives, you get different species inside a single bot gene, with different behavior.
Both check with !=% (10% range) if other bot's are family on both A and B valeus and if not eat them.
Ciblings might change A and B values maybe later with 5%


.. i notice however that to much energy gets into the sim
so i need to make moves of bots cost more energy and also i think i should somehow limit plants not to become too big.
as with to much energy the sims then to get crowded by tiny bots.


What i wonder have more bots been made to try something like this ?.
For example to balance and find optimum eye distances or something else ?


included as zip file the work so far, note some parts have been marked out, as it seams it has some kind of move aiming problem  (Gene 7) of the 8 genes.
I often see it circle around a target and doing nothing, sometimes 9 a bit to often it doesnt attack, still trying to figure out why not, so there i placed some marks  to disable "not killing family"
The included vegies are part of this kind of sim, its default sim and the vegies dont need to be fixed.
« Last Edit: March 29, 2010, 02:13:15 PM by peterb »

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
developing self tuning bot based on evolution / dna
« Reply #1 on: March 29, 2010, 01:50:11 PM »
I think lionfish did something like that. But generaly it's a good way to tweek a bot, I think you'll get interesting results rather fast. I think lionfish did very well on IM.
Also fruitflies inherits an attack type and has a small chance of switching to a new type... it's a far more narrow form of evolution but it allows it to adapt to it's oponent in league fights. (A league fight doesn't last long enough for more random evolution to be effective)
So the overall concept is definately a very powerfull one both for leagues and IM. But I think if you set it up right you could also get some interesting evo sims.
I should also mention you can use the epigenetic memmory locations to inherit tweek values. If you don't break the birth ties you can transfer a fair amount of values.
The first 5 epigenetic memory locations (971-975) are copied instantly upon reproduction. The next 15 (976-990) are copied one per cycle for the next 15 cycles, through the birth tie.

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
developing self tuning bot based on evolution / dna
« Reply #2 on: March 29, 2010, 05:29:45 PM »
Wouldn't there be some problems with that if the bots use these values for conspec recognition? For example, bots that change their values to much won't have a chance because their own kind will eat them. You could also end up with copy cat bots. A single mutation in the part of that bot that tells it when to store those values, and it automatically changes every time it sees another bot. There could be other problems to. I think it would be best if you used racial memory and kept them secret.

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
developing self tuning bot based on evolution / dna
« Reply #3 on: March 29, 2010, 06:33:13 PM »
Quote from: Houshalter
Wouldn't there be some problems with that if the bots use these values for conspec recognition? For example, bots that change their values to much won't have a chance because their own kind will eat them. You could also end up with copy cat bots. A single mutation in the part of that bot that tells it when to store those values, and it automatically changes every time it sees another bot. There could be other problems to. I think it would be best if you used racial memory and kept them secret.

I was more thinking of it as eco sim, so i'm less woried of conspec recognition.
Future siblings can change small amounts of the valeus, so in the end you endup with a sim of competing values, and find for those bots ideal values.
A kind of evolution of tuning, like how birds change wing sizes.

The reason a bit is that DarwinBots is a good enviroment for testing environmental cases
But since the language is quite advanced, some people say its too good for evolutionary processes since there is no outside pressure (rewarding) ==> see the wikipedia review.
I was wondering if it was possible using the language to write something that could do it in a limited way.

Thats also why i would like the plants not to grow to big, and why they having a seeding mechanism.


Hmm racial memory is also an option for this, might be better.
But still i'm wondering whats wrong with the aiming i use in these bots, there must be better aiming math, then what i'm using here, but it has been a while for me that i coded bots.


I will also check LionFish thanks Moonfisher