For instance, after starting zidovudine monotherapy against HIV, resistance develops against the drug because of a point mutation in the RNA transcriptase enzyme to which the drug binds.

So how does the virus ‘know’ to mutate this particular enzyme?

  • 4
    $\begingroup$ @David After your edits, the answers no longer make sense. Yes, the question was based on a misunderstanding, but the answers explain why that understanding was wrong. $\endgroup$
    – Barmar
    Dec 10, 2019 at 2:21
  • 1
    $\begingroup$ @Barmar, I've restored the original title question. I agree the changed title had reduced the value of the answers for little benefit. $\endgroup$
    – mgkrebbs
    Dec 10, 2019 at 4:01
  • 1
    $\begingroup$ @mgkrebbs — I think we can improve the question by improving rather than restoring a bad title. I have had another go. The essence of the misapprehension remains, but it is no longer expresses it as an assertion, which I have reintroduced in the body of the question. $\endgroup$
    – David
    Dec 10, 2019 at 9:51
  • 4
    $\begingroup$ Coming in from outside, after having visited this question once before, the new title makes the answers make no sense. $\endgroup$ Dec 10, 2019 at 15:14
  • 1
    $\begingroup$ @James I regard that as unnecessary (the last sentence in the question includes "know") and retrograde. By retaining the original title you are propagating the non-scientific thinking of a question which should have been closed for the lack of research. $\endgroup$
    – David
    Dec 16, 2019 at 12:10

4 Answers 4


It doesn't. Viruses don't "know" anything. Mutations occur at random. Most of them don't do anything, or have a slight negative effect on the ability of the virus to infect and reproduce. However, there are billions and billions of viruses. Once in a while a random mutation will offer a significant advantage like immunity to an anti-viral drug. The viruses that have that beneficial mutation will then massively out-reproduce the viruses that don't have it. Eventually the population of viruses will consist mostly of individual viruses that have that mutation.

  • 21
    $\begingroup$ Yes, exactly. It's just that there are billions and billions of them, so sometimes something useful crops up. $\endgroup$ Dec 7, 2019 at 20:20
  • 16
    $\begingroup$ @user73023 The same is true for all the mutations in every species of bacteria, plant, animal, etc. $\endgroup$
    – Bryan Krause
    Dec 7, 2019 at 20:31
  • 3
    $\begingroup$ @BryanKrause Well, not all mutations are accidents. GMOs were created by humans. $\endgroup$
    – user38945
    Dec 8, 2019 at 16:48
  • 9
    $\begingroup$ @Jagoe: Well, humans are an accident :-) And from a strictly linguistic point of view, the changes made to GMOs are not mutations. $\endgroup$
    – jamesqf
    Dec 8, 2019 at 17:06
  • 7
    $\begingroup$ @Jagoe Even mutations involved in creating GMOs are random. You try to target a specific piece of DNA, but what will you actually modify is based on chance. Same like throwing the ball on target. You are trying to hit the centre, but you might go off. Most GM process involve stage where you try to look at the thing you created and verify that the change occured at the place you wanted and that there are no side effects. $\endgroup$
    – Colombo
    Dec 8, 2019 at 20:41

This is molecular evolution and is completely undirected. Mutations happen all the time, most of them disappear without anyone noticing, since they have no evolutionary advantage to permeate.

This is different when you treat the cells and put them under an evolutionary pressure. Under this conditions, mutations which affect the mechanism of the drug (as here with a single point of binding) pose a great advantage for survival and with subsequent generations all carrying this mutation. This mechanism is simply a statistical one as the numbers of viruses produced in the infection is really large. It is not a matter if such a mutation occurs, only when.

Such a selection of specific clones is seen in other diseases too, leaving to the deactivation of the drug or the activation of different signal pathways, avoiding the one which has been targeted.

If you want to read further on viruses and mutation rates/mutations, take one of the following articles.


  1. Mutation—The Engine of Evolution: Studying Mutation and Its Role in the Evolution of Bacteria
  2. Antiviral drug resistance as an adaptive process
  3. Mechanisms of viral mutation
  4. Why are RNA virus mutation rates so damn high?

Summary: They Don't.

Long explanation:

Mutations happen at random. A series of factors can lead to the perceived notion that the mutation was intentional.

  1. The mutation can be harmful, beneficial, or neutral.

    1. Harmful: We don't see the harmful mutations as these individuals don't proliferate. The mutant individual just dies off without passing their genetic material forward, or they die out after just a few generations.
    2. Beneficial: To the virus' viewpoint, of course. The mutants gain a competitive advantage over the other strains, and proliferate. This advantage may be noticed (e.g., as in the case of developing drug resistance).
    3. Neutral: Most of the time, the mutation won't affect the individual's performance. Due to the mechanism of codon degeneracy, changes in one base in the DNA code may not even cause a structural change to the codon's amino acid equivalent.
  2. Most viruses are not successful in reproducing. Those that are make millions of copies of themselves. One successful mutant has the potential of creating a whole new strain.
  3. Viruses too are subject to selective forces. In the case of drug resistance, the successful resistant mutant won't have to compete with the other strains as the drug already eliminated them.
  4. Drug resistance is not immunity. However, a resistant strain can very well mutate again to develop a stronger resistance.

We only observe the final effect (a new virus strain that seems to be engineered) but not the intermediate steps. There was a lot of (random) intermediate and unsuccessful mutations in between.


Let me know if this is off topic, but as a developer, my eyes were opened when I learned genetic algorithms. While the mathematics are tangential to actual biology, I think it illustrates the mechanism of an environmentally directed evolution of random mutations. An example I have is here: https://github.com/Jarrod1937/genetic-algo-example/blob/master/ga/Form1.cs

The mutations are random, but the fitness function defines when the mutation is beneficial. In the case of a virus, the virus successfully propagating is the fitness function, and thus those of a higher fitness are more likely to propagate more, thus you see the increasing adaption against things that prevent propagation. However, this isn't the virus knowing where or how to adapt, rather, it is a case of sample bias. Your sample of viruses are the ones that survived and propagated, you don't see all of the failures that came before.

  • 1
    $\begingroup$ Hi Jarrod - this is the same way biology works, as described in the existing answers by Charles, Chris, and Mindwin. The mutations are random; what makes certain mutations increase their prevalence in the population is selection (effectively, this is the fitness function), plus other random components like genetic drift (which has most effect for mutations that have no or a small survival cost or benefit). Genetic algorithms sometimes cheat a bit, though, and have non-random mutations or other algorithmic tricks in selection and 'mating' that are not accessible to biology. $\endgroup$
    – Bryan Krause
    Dec 10, 2019 at 16:20

You must log in to answer this question.

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