davidrmiller / biosim4

Biological evolution simulator
Other
3.1k stars 435 forks source link

Energy cost system #35

Closed apatho closed 2 years ago

apatho commented 2 years ago

Added a system that enables assigning an energy cost to performed actions, neural net nodes, and connections, which are then deducted from a starting energy pool. This enables adding various interesting evolutionary pressures, such as tradeoff between "brain size" and movement, or between "violent" and "pacifist" approaches.

Cost of actions is divided into three categories: movement actions, kill action, and others. Could be extended to more categories, or even separate setting for each action, but that seemed excessive.

I was unsure if individuals that run out of energy should die, or just be paralyzed because they are unable to perform any actions or run their neural net. Right now it's the latter, since it makes observing the energy consumption easier in the videos. Maybe it could be a separate parameter - feedback welcome.

I also included some reporting around neural net size and energy consumption, to enable graphing changes in "brain size". These parts could be easily left out of the PR if they are not a good fit for upstream.

Further ideas that can be built on top of this:

davidrmiller commented 2 years ago

Very interesting and well thought out. I'll take a look. Thanks!

venzen commented 2 years ago

Interesting. Don't have time to review the code additions, now. Will wait for @davidrmiller to speak on the implications first.