Tracking extrema in dynamic environments using a coevolutionary agent-based model of genotype edition