Optimal memory pool size without cost. Effect of memory pool size without a cost: A Relative fitness as a function of the memory pool size nmp compared to individuals with no ability to store memory, nmp = 0. The mean (solid line) as well as the 95% confidence intervals (shaded area) over 15 simulation runs are shown for each pathogen environment. The replacement size was fixed to nrep = 7. B Competition experiments between individuals with different memory pool sizes for the standard pathogen environment, replacement size nrep = 7 and age-dependent replacement type. The matrix shows the average fitness value w over 15 independent simulation runs. A red rectangle represents a fitness advantage for individuals of type 1, whereas a blue rectangle corresponds to a disadvantage.