Darwinbots Forum
Bots and Simulations => Simulation Emporium => Topic started by: bacillus on April 04, 2008, 05:52:37 PM
-
I started making this sim that simulates an environment where the main source of food is a sardine. This is the code for the basic veggie:
'Sardine
' travels eastwards
cond
*.out1 42 !=
start
42 .out1 store
stop
cond
start
*.maxvel .up store
*.body 100 sub dup .fdbody store - .strbody store
stop
cond
*.eye5 0 =
*.eye3 0 =
*.eye7 0 =
*.refshoot 0 != or
start
6 rnd 3 sub .dx store
.setaim store
stop
cond
*.eye3 *.eye5 >
start
30 .aimsx store
stop
cond
*.eye7 *.eye5 >
start
30 .aimdx store
stop
cond
*.nrg 1000 >
start
50 .repro store
stop
The settings for the fish tank are:
Left/Right wrap only
200 max veggies, 50 repop. threshold, 10/repop event
100 nrg per kilobody
Size of sim 19140x13920
No Costs, Thin fluid resistance
Ideal movement efficiency, Animal brownian movement, moon gravity
180 max velocity, Collision Elasticity marbles
No mutations
Restart sim when all bots are dead
This simulation simulates fish, not bacteria, so no tie-bots or virus-bots please.