Created
October 15, 2010 19:52
-
-
Save eschulte/628831 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(dorun | |
(take (to-int out-num) | |
(filter | |
#(= (:fitness %) (to-int test-num)) | |
(map | |
#(do (println (pr-str %)) %) | |
(let [cross (to-int cross) | |
cross (if (< cross 1) cross (/ cross 100))] | |
(pmap | |
#(evaluate-asm % script (to-int timeout)) | |
(filter | |
#(if max-len | |
(< (count (% :representation)) (to-int max-len)) | |
%) | |
(repeatedly | |
(fn [] | |
(if (< (rand) cross) | |
;; crossover | |
(crossover-asm (pick pop) (pick pop) (to-int cross-pt)) | |
;; mutation | |
(mutate-asm (pick pop) mut-ops))))))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment