Add function to advance a generation.