Transformation-inhibiting AbaRs gain a competitive advantage in a fluctuating environment. (A and B) Simulated temporal dynamics of bacterial genotypes carrying hypothetically costless AbaR in the absence of antibiotic stress (A) or in presence of a stochastic stress (mean peak duration = 320, mean peak frequency = 1E-3) and AbaR imposing a fitness cost (0.01) (B). Simulations were initiated with equal number of cells of each genotype (2.5E5, which is 1/40 of the population carrying capacity) and with initial number of each eDNA type (1E7). (C) Mean frequency of cells carrying AbaR between times 30,000 and 50,000 as a function of stress duration and stress frequency (averaged from 50 simulations each). (D) Mean frequencies of each AbaR (among all AbaR genotypes) as a function of stress duration (d) and stress frequency (f). For each simulation (initialized with AbaR-free cells only = 1E6, initial number of each eDNA type = 1E7), we calculate the mean frequency of genotypes between times 30,000 and 50,000, and then calculate the mean of these frequencies from 50 independent simulations. The number of actual generations per simulation depends on the stress regime which reduces the population density, but also depends on the genotype of bacteria. In 50,000 simulated time units, the number of generations can thus vary from ~5,000 [when, under low stress, the population at its carrying capacity (K) at each time] to up to ~50,000 (if there were theoretically no density dependency). Model parameters are listed in SI Appendix, Table S2.