BasisResearch / collab-creatures

Analyzing animal collaboration with Bayesian and causal inference.
4 stars 1 forks source link

[COL-275] "calories" definitions are misleading in communicators code #19

Open emackev opened 9 months ago

emackev commented 9 months ago

The way the "calories" are defined in the code is very confusing and opens up potential bugs.

The relevant line for determining how quickly food depletes when an agent eats it is line 34 of collab/communicators/simulation.py: self.calories_acquired_per_unit_time = 5 # TO DO: make this a property of the agent, putting it here for now

This is quite hidden, and also misleading -- it appears like it could be set separately for each agent, but currently it can't. See how "delta_food_cal" is defined in the same simulation.py. I'll make an issue about this.

COL-275

emackev commented 9 months ago

"Calories" should be replaced by "units".

Also, irrelevant params should be eliminated, and the relevant params should be made clear, as function inputs. There are a lot of redundant params (phi_food, food_calories_by_loc, etc)

Specifically, the rate at which birds eat food items.