keiwando / evolution

A sandbox game/simulator that demonstrates machine learning with evolutionary algorithms.
https://keiwan.itch.io/evolution
361 stars 56 forks source link

Support faster than realtime / skip frame evolution #5

Closed kamathln closed 4 years ago

kamathln commented 4 years ago

Multiple ways for battery optimizations/ convinence for impatient users: 1) allow evolution faster than realtime 1) allow to skip frames (consumes less CPU too) 1) allow to run evolution in a low priority cpu limited background task. - Users coukd go about checking social network, take calls, etc, whike evolution creeps forward in the background

keiwando commented 4 years ago

Unfortunately, none of these options will work. Any changes to the amount of physics computations that are performed per frame will lead to different creature behaviour.

If this was running on a custom engine in which I had written every piece of the physics engine, then I could guarantee determinism and could push the physics calculations to the limit of the CPU (any more would also lead to different creature behaviour).

Unity's physics system is non-deterministic, which shows especially when you start changing time scales and solver time steps.

Either way, speeding up the simulation requires performing proportionally more computations in the same time, which would consume more battery life as well.