logoalt Hacker News

sdenton4last Tuesday at 6:51 PM1 replyview on HN

this should do the trick...

  while creatures:
    c = get_random_creature()
    if c.is_dead():
      creatures.pop(c)
    else:
      creatures.add(c.mutate())

Replies

RogerLlast Tuesday at 7:05 PM

You also need selection, not just mutation (I know you are being silly, so am I)

show 1 reply