Early in the week I was having issues balancing out my population . My sea otters were hitting the rock, stoping, but did not continue to move forward afterwards, they would stay stuck there. This week I was able to balance out my population better by creating a new code of behavior for the sea otters in which when they detect a killer whale and a rock within 15 steps they face towards the rock. For was long as the shark is within 20 feet, the otters will stay hidden under the rock. Since there is a code that makes the whales turn 180 degrees once they hit a rock, they are not able to kill the otters that are kidding under the rock.
To help my otter population balance out better I make it so that there is 1 out of 10 chances of a otter with >80 energy to reproduce.
The code is working fine.
April 2, 2017 at 3:31 pm
looks OK
you need to do some “energy conservation” – see Mabel about this
but, in short
if an otter has 80 energy, it can give birth to an otter with energy 50 but the mom otter keeps her 80 energy. So, the system starts with 80 energy and ends with 80 + 50 = 130 energy – energy is not conserved!!
you should reduce mom’s energy right below the create-do
that may also help balance things