You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Definitely not a bad idea. We have an increment_age function which is actually responsible for increasing the age and all the stats. We can write a decrement_age function though to do the inverse!
Why do you want it though? Do you want a deliberate devolution of some particular species :)
Yeah! The decrement_age function should not be the problem. If we keep track of the traits with which one died, we can resurrect that organism and roll back time.
HOWEVER!!!! There is a lot of randomness involved when incrementing the age of an organism. By writing the decrement_age function we bring in the same randomness so by moving back in time we may not get the same organism. Sounds like sci-fi. Love it.
However, to maintain exact attributes of organisms after rollback, we can
Keep a god damn copy of the stats for every organism at every instance
Remove randomness and make most of the logic predictable - no fun.
The first approach of keeping a copy of the stats of every organism at every instant is the right way but it is absolutely impractical as it can quickly blow up in memory requirements with a small increase in the number of years and organisms.
Instead we can be smarter and generate a polynomial function to interpolate the data of the organism's lifetime stats. We can decide on the maximum degree and all we need to store is an array of coefficients corresponding to the degree of the polynomial for each organism. This can be easily implemented using some good old optimized linear algebra library (we just need matrix inversion, transpose and a matrix multiplication).
What if I want to go back in time and do a reverse evolution of a species ?
PS- reverse evolution = revolution 🤯
The text was updated successfully, but these errors were encountered: