Darwinbots Forum

Bots and Simulations => Bestiary => Interesting behaviour bots => Topic started by: Numsgil on April 08, 2005, 06:37:06 AM

Title: Fish School 1.0
Post by: Numsgil on April 08, 2005, 06:37:06 AM
'Fish School
'Numsgil
'2.35 and later
'Based on Animal Minimalis (also by me)
'Swims in schools.  Looks very cool, especially in larger sims.
'Almost like a lava lamp.
'This bot is a base.  Meaning you can add on to it to make it better, stronger, faster

''''''''''''''''''''''''''
'To get rid of birth ties
''''''''''''''''''''''''''
cond
*.robage 0 =
start
.tie inc
stop

cond
*.numties 0 >
start
*.tiepres .deltie store
stop
'''''''''''''''''''''''''

''''''''''''''''''''''''''
'Find Food
''''''''''''''''''''''''''
cond
*.eye5 0 >
*.refeye *.myeye !=
start
*.refveldx .dx store
*.refvelup 30 add .up store
stop

cond
*.eye5 50 >
*.refeye *.myeye !=
start
-1 .shoot store
*.refvelup .up store
stop
''''''''''''''''''''''''''

''''''''''''''''''''''''''
'Form Schools
''''''''''''''''''''''''''

'too far
cond
*.eye5 0 >
*.refeye *.myeye =
*.refveldx 0 !=
*.refvelup 0 !=
start
*.refveldx .dx store
*.refvelup 10 add .up store
stop

'just right
cond
*.eye5 20 >
*.refeye *.myeye =
*.refveldx 0 !=
*.refvelup 0 !=
start
*.refvelup .up store
stop

'too close
cond
*.eye5 35 >
*.refeye *.myeye =
*.refveldx 0 !=
*.refvelup 0 !=
start
*.refvel 10 sub .up store
stop
''''''''''''''''''''''''''

''''''''''''''''''''''''''
'Turn
''''''''''''''''''''''''''
cond
*.eye5 0 >
*.refeye *.myeye =
*.refveldx 0 =
*.refvelup 0 =
start
314 rnd .aimdx store
stop

cond
*.eye5 0 =
start
314 rnd .aimdx store
stop
''''''''''''''''''''''''''

''''''''''''''''''''''''''
'Reproduce
''''''''''''''''''''''''''
cond
*.nrg 10000 >
start
10 .repro store
stop
''''''''''''''''''''''''''
end
Title: Fish School 1.0
Post by: bacillus on March 07, 2008, 12:17:48 AM
Looks great, especially when used as vegs and nothing else on the map
Title: Fish School 1.0
Post by: Numsgil on March 07, 2008, 11:04:00 AM
Yeah, it's one of my favorite bots

Someone else made a schooling bot that functions much better.  I think it's called SWARM.  Would be good to check it out too.