I'm currently working on a neuro-evolution genetic algorithm where I create small organisms with simple neural networks which can move around a 2d space with randomly distributed food. I spawn a bunch of those organisms with a random initialized "brain". Some of those organisms will be by coincidence drawn to food more than others which will lead them to survive longer and be able to reproduce. The children will inherit the same brain-values as the parents which slight modifications/mutations. Of those children again some will be drawn to food more than others, will survive longer and reproduce. With the generations the organisms will evolve and will understand tha they have to go towards food in order to live longer. This is all working fine.

But it needs two organisms to reproduce. Until now, if two organisms randomly walk into each other and have enough energy they create a child with a combination and variation of the parents brain. But I want the organisms to learn over generations by themselves that they have to reproduce and therefore to be drawn to each other. But unlike learning to eat to survive longer, I just can't find a evolutionary motivation for them to reproduce. All the "explanations" why we reproduce in the internet don't really answer that question. I only noticed that since I'm trying to simulate natural selection myself.

The first idea is to give the organisms a dompamine-value which they need to maximize. Reproducing/Sex will "feel good" by increasing that value. But why should they want to maximize that value?

Another idea, is that they will only want to reproduce if a add predators to the simulation. Because if there are predators which eat other organisms those organisms will probably want to have more of their kind around them so the chance of getting eaten will decrease. They could also learn to move in swarms to protect themselves like some animals do in real life. But this would mean that there only is an evolutionary motivation for reproduction if there are other species/predators. Can this be true in real life?

So I want to know what the motivation for a species to reproduce is in order that the organisms in my simulation will learn over generations that they should reproduce.

If you are interested in the topic of genetic algorithms and simulations of natural selection, here are some references: article, youtube channel 1, youtube channel 2

  • 1
    Welcome to PSE, Theodor. I doubt if Philosophy is the right or the best site for your question but I'll let it stand, and wait on the reaction of other members. Best - Geoffrey
    – Geoffrey Thomas
    Jul 10, 2022 at 11:05
  • 3
    You don't want the organisms to "learn" to reproduce, some organisms would (randomly) gain modifications that make them more fecund, and then over time, the descendants of those organisms would come to dominate because they reproduce more and pass on the tendency to reproduce more. You shouldn't have to do anything else except randomly introduce a fecundity trait that can be inherited. Jul 10, 2022 at 11:28
  • 2
    Do you have an analogue of dopamine, some kind of "reinforcement", in your simulated neural nets? If not I don't understand why the same problem wouldn't apply to any behavior you want to select for whatsoever, including those that are beneficial to individual survival like eating or avoiding predators. And if you do have reinforcement for survival traits, why is it a problem to have it for reproduction too? If the criteria for what gets reinforced are determined or strongly influenced by simulated genes, wouldn't that lead to reinforcement favoring whatever makes genes more likely to pass on?
    – Hypnosifl
    Jul 10, 2022 at 16:39
  • 1
    Or maybe you have the neural net weights of individual sim organisms entirely fixed by their sim genes, with no individual learning during life? In that case, again it seems that if you are selecting for genetic success, that should select for neural net weights that create behaviors conducive to passing on genes, which would include both individual survival and reproduction.
    – Hypnosifl
    Jul 10, 2022 at 16:44
  • 3
    Note that the earliest modes of reproduction was simply random chance (and still is for many aquatic species and plants): gametes are simply released in the water or air and a fraction of it meets another individual's, resulting in eggs all over the place. It requires no drive. If you implement such a mechanism, probably populations who are gregarious or gather regularly before releasing their gametes will be more efficient and become the dominant species. It looks like by setting your model with a ground walking species, you are already too late in the apparition of sexuated reproduction.
    – armand
    Jul 11, 2022 at 0:28

4 Answers 4


I voted to close because this is probably best categorized as a question about evolutionary algorithms. Springer has a book Computational Intelligence: A Methodological Introduction which I have and find thorough, but there's a sea of information out there.

From a philosophical perspective we can quickly address:

So I want to know what the motivation for a species to reproduce is in order that the organisms in my simulation will learn over generations that they should reproduce.

Species don't have motivations, strictly speaking. Higher-order organisms like people do if they have psychological states. From WP:

Motivation is what explains why people or animals initiate, continue or terminate a certain behavior at a particular time. Motivational states are commonly understood as forces acting within the agent that create a disposition to engage in goal-directed behavior. It is often held that different mental states compete with each other and that only the strongest state determines behavior.2 This means that we can be motivated to do something without actually doing it. The paradigmatic mental state providing motivation is desire. But various other states, such as beliefs about what one ought to do or intentions, may also provide motivation. Motivation is derived from the word 'motive,' which denotes a person's needs, desires, wants, or urges. It is the process of motivating individuals to take action in order to achieve a goal. The psychological elements fueling people's behavior in the context of job goals might include a desire for money.

That means, philosophically speaking, you're not anywhere near motivations if you're talking about a variable "dopamine" since, again philosophically speaking psychological motivation and dopamine levels are different domains of discourse in philosophy at best understood as related through some sort of NCC.

Obviously, since your project is an exercise in an optimization algorithm, you can use whatever label you want for goal-oriented metrics, since it's the math that's important more than the proposed correspondence between the virtual organism and some abstraction of a real one. In philosophy, in fact, even your attempts to model a particular species would bump up about questions of universals and particular.

That being said, among primates, the motivation to reproduce is largely driven by psychological features surrounding mating behaviors. That is to say, the primate mind, like many high-order minds documented by ethologists, is often tied up in terms of signals of reproductive fitness. Human beings, of course, take that evolutionary inheritance and add a cognitive layer to it that involves rites and rituals. But for your typical primate, it's more likely to be several factors:

  1. The animal's sexuality including heterosexual, bisexual, and homosexual orientations.
  2. The mating cycle of the animals in question. Humans are somewhat exceptional in this regard.
  3. The politics of animal interactions. Chimps are notorious for keeping and defending females.
  4. The health of the individual male/female involved.

Ultimately, your simulation, your model can be as simple as a dopamine variable, or as complex as an entire simulation of an organism in determining how and when to reproduce. For additional inspiration, read this article on the animal sexual behavior for additional ideas. Ultimately, your reproduction mechanism to determine reproduction should be created in tandem with your fitness and selection functions, since the mechanism itself partially determines the overall fitness of the agent. You'll find that there are models that "run away" if the overall system isn't balanced, and so you'll have to adjust not only for excessively dominant individuals, but population crashes, and so on, when you're modeling life.


You should treat sexuality like any other adaptive mechanism: a variable spectrum of sexual drive (and perhaps a second variable of fertility, with some more likely to conceive children and some less). Your creatures will evolve to a sexual pattern that suits their environment. If you're not using predators then you'll have to introduce an average lifespan variable too; a shortened life-span is a common trade-off for high sex-drive and fertility.

As a rule, you shouldn't play deus ex machina. Don't try to determine what motivates your thingees; just give them an array of genetic options and simple rules for mixing, and their 'motivations' will develop out of the constraints of the system.


I smell you are asking the purpose of life but anyway irl situation there is always a competition between at least two distinctive species in an any environment so the general competition amongst the first generation is for food space and the other apt condition required as per situation it may include sunlight air etc. For the first few generations as the population is less and resources are ample there should be quite less competition between organisms of like or unlike nature in these condition desire to reproduce is much more energy based but as generation proceed increasing population with constant resources increases the competition starts getting fierce ultimately forcing each individual to modify themselves in such fashion to allow them live longer. If my guess is not wrong in earlier generation organisms would very narrow range of lifetime but in the further generation this range get diverse with some exceptional extremes. Organisms with at desirable extreme tend to live longer hence at least making them consciously aware that their path to survive is better than the rest almost forcing them believe their path should survive and be tested how long could it work ultimately creation situation called legacy in our case genetic legacy. So to sum in later generation desire to reproduce maybe linked with pride that their way to survive is best and is worthy enough to be accepted by other as ultimate or final way to survive.


The benefit of sexual reproduction seems to me the mixing of genes from different individuals. This mechanism increases the variety within the gene pool. The result is a bigger flexibility with respect to changing environmental conditions.

Therefore I would create two species with different mechanisms of reproduction:

  • Species 1 reproduces by cloning. The offspring has the same genes as the parent.
  • Species 2 reproduces by sexual reproduction which mixes the genes of the parents.

Both species live in the same environment. They are initalized by the same parameter values.

Does your simulation then show a payoff for sexual reproduction?

Not before the answer is affirmative I would implement into the individuals of species 2 a reward for sex which acts as incentive.

Note: Some years ago the German psychologist Dietrich Doerner simulated the artificial life of a species named PSI. But I do not know if someone continues his research, see Doerner. Doerner's approach also aims at simulating motivation and emotion of the members of a population.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .