Skip to content

Instantly share code, notes, and snippets.

@kristacc
kristacc / Weasel.py
Created April 28, 2012 10:48
Genetic algorithms example
#!/usr/bin/env python
# this is a genetic algorithms tutorial by krista <3
# <[email protected]>
# Richard Dawkins is the inventor of this example ("METHINKS IT IS LIKE A WEASEL.")
# example is done with Python (works with versions 2.6 and 2.7)
# and to be more specific, we'll use elitistic evolution
# (== only fittest 10% will survive to the next population and rest will die.
# 50% of the best creatures will mate and make pretty babies to the next population <3 )
# 26.11.2011