Average population fitness 〈f〉 as a function of the A → B switching rate kA, for several values of parameter λ. For large values of λ the average fitness peaks for zero switching, kA = 0. However, as λ decreases, a second peak arises at nonzero kA, indicating that random switching can be a favorable strategy when the environment is responsive. Parameters values are: kB = 0.1, Δγ = 1, α = −0.99, ξ = 1 and f∗ = 0.5.