Bots and Simulations > Interesting behaviour bots

animal_minimal_gender(Shadowgod2)(interesting)(10-8-2014)

(1/2) > >>

Shadowgod2:

--- Code: ---'animal_minamal_gender
'by Shadowgod2
'12/6/2014
'gender based bot
'you will need female version
'males fight eachother because they will take over otherwise

def male 50
def female 51

cond
*.refeye *.myeye =
*.refbody *.male mult 1000 < and
*.eye5 0 = or
start
100 rnd *.female 2 mult 1 sub mult .aimdx store
stop

cond
*.refeye *.myeye =
*.refbody *.male mult 1000 > and
*.refeye *.myeye != or
*.eye5 0 >
start
*.refveldx .dx store
*.refvelup 30 add .up store
stop

cond
*.eye5 50 >
*.refeye *.myeye !=
*.refeye *.myeye =
*.in1 1 sub *.male mult -1 = and or
start
-1 .shoot store
*.refveldx .dx store
*.refvelup 30 add .up store
stop

cond
start
1 .male store
-8 .shoot *.in1 mult *.refbody 1000 sub sgn 0 floor mult store
stop

start
1 rnd 2 mult 1 sub *.thisgene add .delgene *.robage sgn -1 mult 1 add mult store
*.thisgene .delgene *.robage sgn mult store
stop

cond
start
1 .female store
1 .out1 store
50 .sexrepro *.fertilized sgn mult *.body 1000 sub sgn 0 floor mult store
stop

end

--- End code ---

spike43884:
Possibly a system to identify genders apart...Maybe behind the female is a tiny bot which performs nothing...and is just marked as 'femaletail' by mem location 52?

Shadowgod2:
the female memloc doesn't actually do anything but to keep the dna as similar to each other as possible and to prevent devolving the male female part.

spike43884:

--- Quote from: Shadowgod2 on December 07, 2014, 03:53:56 PM ---the female memloc doesn't actually do anything but to keep the dna as similar to each other as possible and to prevent devolving the male female part.

--- End quote ---
I don't mean for like the extra bit to function, just to be...there, so that when were looking at face value the simulation we can see the balance.

Shadowgod2:
an extra bot will make it too difficult for hunting and it's just a leach. i did modify the code to turn one way for male the other for female.

Navigation

[0] Message Index

[#] Next page

Go to full version