Here's some pseudocode I wrote.
- Code: Select all
def bee(): #Bees! runs on global variables
if nearby(Predator): #uses weighted random numbers to determine if a predator is near enough to warrant removal and returns bool
elif low_food(): #uses method described above to determine if food is low and returns bool
elif too_hot(): #reads temperature and returns bool based on rands
else: #Nothing to do
dawdle() #basically wander around doing nothing
for bee in bees: #basically a list of dictionaries with each bee's position and state
There would also be a map and predators and whatnot. Unfortunately, I'm a complete n00b and can't do this. I don't know what modules to use, but would prefer the builtins (I don't have admin privileges, so I can't install any extra modules ).
Consider it a challenge.