algorithm can now be restarted from generation 0