Bots and Simulations > Evolution and Internet Sharing Sims

Mutation engine in bot code?

<< < (2/3) > >>

Endy:
Could do something like this for one of the cycles.

971 7 rnd add 50 store
*50 *

2 rnd 1 sub
*50 975 sub *50 976 sub mult
sgn abs mult
add

4 rnd 2 sub
*50 975 sub sgn abs 1 sub - mult
add

100 rnd 50 sub
*50 976 sub sgn abs 1 sub - mult
add

*50 store

Might want to disable waste in the sim to keep the values from being changed by it.

P.S.

Would the ~ or compliment, bit flip work to switch a one to a zero and vice versa? Wikipedia says it would but I've never experimented with ours.

Numsgil:
It runs on twos-compilement.  I believe 0 ~ would be -1 actually.

MacadamiaNuts:
230000 cycles in each sim, 140 generations, sampled 12 bots out of 200:

Most bots developed a slight miopy. The value 971 ranges 1-10. Two bots had negative values (-5, -6).

They also increased the speed (972) from 30 to an average of 44.

The distance at were they start to shoot dropped from *.eye5 50 > to *.eye5 > 60.

The average distance to any friendly target before spinning to look around didn't change. The values were dispersed from -5 to 7.

The randomized amount of spin slowed a bit. In the sample appeared three genetic lines, one around 314, another around 308 (this line is more short sighted than the others, with values 9-10) and another around 297.

The amount of energy before reproduction didn't change in any meaningful way. The first line is split in two, one around 3250 and another around 2970, the second line is around 3150, the third line, 3050.

The reproduction rate was the less optimal. It went from 90 to 62! All but two ranged from 61 to 63. One was at 66, and another at 90, which means it cut its birth tie too soon.

The out1 value dropped to 90-98.

MacadamiaNuts:
Another option for this method would be to write down 20 genes and let evolution activate/deactivate them.

If racial memory 971 > 0, gene 1 activation condition would be true, and so on.

MacadamiaNuts:
1200000 cycles. Evolution isn't very fast paced, the changes happening aren't critical for survival, but long term advantages or disadvantages.

They are still between 1-10 for the first eye5 value.

Chasing speed increased again from 44 to 50. Sometimes if they don't run fast enough some other bots reach the veggie and block the sight.

The distance to start shooting kept decreasing, from 60 to 66. When they find a veggie they surround it, so being closer leaves less room for other bots, and blocks more vision angle.

The eye5 value to recognize and avoid friendly bots ranges from -1 to 1. I don't know why it's so narrow.

The max spinning speed is still 300 on average. In the sample there were two 317, from the same family branch, I guess. They don't like to stray away of that value, it seems.

The energy required for reproduction increased from 3200 to 4300. The energy for the offspring dropped a bit, to a well defined 50% average. It's a rigid DNA, this one, it doesn't modify its behaviour for age and size, so I think they can optimize it better with a tighter range of sizes.

Finally, the bot IDs decreased to 73-79. Any bot below 73 or over 79 would be killed.

Screenshot (I removed the second sim and placed an intrasim teleporter):

[attachment=597:attachment]

The background is from a photo of mine, I uploaded it to my site if you want to grab it:

http://www.franontanaya.com/descargas/imagenes/fishtank.jpg

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version