Natural Selection Simulator like Conways' Game of Life

  • #1
DaveC426913
Gold Member
21,358
4,816
TL;DR Summary
Natural Selection Simulator like Conways' Game of Life - but much more complex.
I'm considering making a Natural Selection Simulator (possibly in Java).

I've always been fascinated with the idea that so many traits can evolve independently of each other in the same population (even little things like tufted ears and loss of tail, etc.) and I want to see it in action.

Like Conway's Game of Life, writ large.

I know there are sims for selection of just a few given traits (like the AI that evolved blocks to "walk") - I'd like to see a sim where the environment is a determining factor.

Not sure if there are such sims.

Mine would be as abstracted as possible.

Here is what I'm thinking:

  • a landscape of, say, 10^3 or 10^4 cells (or undefined would be even better, just grow the landscape as-needs)
  • each cell would be seeded with, say 100 landscape properties, simply labeled 0-99. A property simply has a value that varies within a range. The values in nearby cells would be similar, to represent gradual shifts across the scape.
  • critters (say, 10^3) are likewise just an array of objects, each with, say, 10^2 critter properties, these would vary only a little, representing a single species with variations
  • the critter properties are interdependent so, using some algorithm, property 1 and 16 might be closely linked - one changes, so does the other, and they change based on the landscape's properties.
  • Both landscape and critter will have algorithms that control them:
    • Critter 207 moves to landscape 403, and landscape 403's property 123 drops by one for each time iteration 207 is there ("food"ish).
    • If 403's property 123 drops to near zero, then 207 moves on ("depleted"ish).
    • If 207's property 00 drops to near zero it dies ("starvation"ish).
    • But if it reaches, say 80/100 then it spawns copies of itself ("food a-plenty"-ish).
  • Critter properties and landscape properties can vaguely represent real-world conditions, but not intended to mimic them accurately. Essentially just abstract drivers. eg. :
    • a widespread landscape property set to 90 might be akin to a mountain range or body of water that the critters won't occupy - giving rise to geographical isolation of populations
    • another one might represent food-like resources, the critter's "health"ish and "breeding comfort"ish properties might rise.)
  • I could add algorithms at-whim. If a "hunger" property gets too low, it might boost the "adventurous" property, causing it to encroach more on "mountain"ish cells and "water"ish cells. The permutations are limitless.

I'd like to watch the time pass and see if the population's traits change over time and eventually stabilize at a new equilibrium.

I think this is doable by starting small, with limited landscape and critter properties, and increasing them as I test the limit of my processor.

To be clear, I'm not interested in a "nature simulator" - I have no need for it to be anything except completely abstract.

Has anyone ever heard of such a sim? If not, I may start developing this further and bugging you guys for ideas on how to refine the algorithms.
 

Answers and Replies

  • #2
DaveC426913
Gold Member
21,358
4,816
I see you there, Mathman...
 
  • #3
Vanadium 50
Staff Emeritus
Science Advisor
Education Advisor
29,524
14,954
Have you seen this? https://rednuht.org/genetic_cars_2/ It's natural selection with cars.

The problem with your description is there are no competing traits. That means the optimum is trivial.
 
  • #4
DaveC426913
Gold Member
21,358
4,816
Have you seen this? https://rednuht.org/genetic_cars_2/ It's natural selection with cars.
Not specifically, but others like it.

The problem with your description is there are no competing traits. That means the optimum is trivial.
Maybe. In a sufficiently sparse landscape, competition with another critter species might not be essential for evolution, but you make a good point.
 
  • #5
anorlunda
Staff Emeritus
Insights Author
11,184
8,576
I never forgot one article (sorry no link). It said that a genetic mutation can trigger multiple changes in the body that appear to be unrelated. Here's a made-up example, a single mutation might:
  • Give immunity to an ancient deadly disease that no longer exists. (advantage)
  • Change hair color. (neutral)
  • Increase vulnerability to a second non-deadly extinct disease from another era.(disadvantage)
  • Change the ratio of waist to hip size. (neutral)
Now, modern people look at that hair color or waist size and scratch their heads trying to figure out their natural selection advantage. Enthusiasts and model makers might make-up a false narrative hypothesizing the survival advantage of that hair color.

Chance or luck can also be significant. Suppose we have two populations geographically separated. They evolve trait A differently. Then one population dies out for reasons unrelated to A. It would be wrong to presume that the second population had an selection advantage because of A. It is a case of correlation does not mean causation.

The point of the article was that the relationship between mutations, observable traits, and survival of the fittest is not simple, nor linear, nor obvious, nor deterministic, nor time invariant, nor one-to-one.
 
  • Like
Likes fluidistic and DaveC426913
  • #6
pbuk
Science Advisor
Homework Helper
Gold Member
4,026
2,360
  • #7
DaveC426913
Gold Member
21,358
4,816
Now, modern people look at that hair color or waist size and scratch their heads trying to figure out their natural selection advantage. Enthusiasts and model makers might make-up a false narrative hypothesizing the survival advantage of that hair color.
Exactly. I intend to account for this, by having properties heavily interlinked sort of randomly. An increase in property 87 happens to trigger an increase in property 33 for no particular reason, or somesuch. That's the kind of thing I want to explore. ('Hey look, the speci, but interestingly, es seems to have sprouted a large X, and now it's consuming Y at twice the rate, but interestingly, now it is moving into cape territories previously denied", etc.)

Maybe the algorithm will be such that some increase in property X triggers a cascade of increases in properties X+1,X=2, X-1 and X-2, etc. sort of like genes found adjacent on DNA.
 
  • #8
jack action
Science Advisor
Insights Author
Gold Member
2,638
5,481
I know you said you don't want to mimic real-world conditions, but the reality is that there are only critters and no landscapes. Critters will have more or less properties according to their complexity (ex.: dirt vs bacteria vs plant vs mammal). The survival of one depends on the characteristics of its neighbors. Critters don't die, they transform themselves into other critters. Critters don't give birth, they transform other critters into new critters that are either identical to them or closely related to them.

That would be interesting to see if they all stabilize to the simplest form (many critters with only one property, the same one).
 
  • #9
Jarvis323
1,035
906
There is a branch of algorithms called evolutionary algorithms, and then further, genetic algorithms, that are inspired by mutation and selection.

https://en.m.wikipedia.org/wiki/Evolutionary_algorithm

They're usually applied to practical problems I guess.

Optimization problemsEdit
In a genetic algorithm, a population of candidate solutions (called individuals, creatures, or phenotypes) to an optimization problem is evolved toward better solutions. Each candidate solution has a set of properties (its chromosomes or genotype) which can be mutated and altered; traditionally, solutions are represented in binary as strings of 0s and 1s, but other encodings are also possible.[3]

The evolution usually starts from a population of randomly generated individuals, and is an iterative process, with the population in each iteration called a generation. In each generation, the fitness of every individual in the population is evaluated; the fitness is usually the value of the objective function in the optimization problem being solved. The more fit individuals are stochastically selected from the current population, and each individual's genome is modified (recombined and possibly randomly mutated) to form a new generation. The new generation of candidate solutions is then used in the next iteration of the algorithm. Commonly, the algorithm terminates when either a maximum number of generations has been produced, or a satisfactory fitness level has been reached for the population.

https://en.m.wikipedia.org/wiki/Genetic_algorithm
 

Suggested for: Natural Selection Simulator like Conways' Game of Life

  • Last Post
Replies
2
Views
668
  • Last Post
Replies
14
Views
754
Replies
14
Views
683
  • Last Post
Replies
1
Views
916
  • Last Post
Replies
16
Views
4K
  • Last Post
Replies
2
Views
835
Replies
18
Views
1K
Replies
17
Views
1K
  • Last Post
Replies
2
Views
669
Top