Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Created November 9, 2012 18:39
Show Gist options
  • Select an option

  • Save jbrechtel/4047423 to your computer and use it in GitHub Desktop.

Select an option

Save jbrechtel/4047423 to your computer and use it in GitHub Desktop.
Ugh
(defn breed [parent-a parent-b]
(let [breed-index (rand (count parent-a))
transmission-a (take breed-index parent-a)
transmission-b (drop breed-index parent-b)
pure-child (concat transmission-a transmission-b)]
mutate-agent pure-child))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment