Replicator equation modeling code.