Skip to content

Commit

Permalink
Merge pull request #205 from lverns/run-uuid
Browse files Browse the repository at this point in the history
Add a run UUID to the push-argmap
  • Loading branch information
lspector committed Jul 12, 2016
2 parents 6f69d03 + a48ce0b commit f08d5b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/clojush/pushgp/pushgp.clj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
:use-single-thread false ;; When true, Clojush will only use a single thread
:random-seed (random/generate-mersennetwister-seed) ;; The seed for the random number generator
:save-initial-population false ;; When true, saves the initial population
:run-uuid nil ;; This will be set to a new type 4 pseudorandom UUID on every run
;;
;;----------------------------------------
;; Standard GP arguments
Expand Down Expand Up @@ -144,6 +145,7 @@
(doseq [[argkey argval] argmap]
(assert (contains? @push-argmap argkey) (str "Argument key " argkey " is not a recognized argument to pushgp."))
(swap! push-argmap assoc argkey argval))
(swap! push-argmap assoc :run-uuid (java.util.UUID/randomUUID))
(when (:autoconstructive @push-argmap)
(swap! push-argmap assoc :genetic-operator-probabilities {:autoconstruction 1.0})
(swap! push-argmap assoc :epigenetic-markers [:close :silent])
Expand Down

0 comments on commit f08d5b8

Please sign in to comment.