Skip to content

Commit

Permalink
Merge pull request #193 from thelmuth/feature/print-command-line-argu…
Browse files Browse the repository at this point in the history
…ments

Added printing of command line args. Also fixed -main docstring
  • Loading branch information
lspector committed Apr 23, 2016
2 parents 8b32350 + c1a7390 commit 7a2f70f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/clojush/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
;; main function

(defn -main
"A main function for clojush, which assumes that the first/only argument is the name
of a problem file that contains a top level call. Exits after completion of the call.
"A main function for Clojush, which assumes that the first argument is the name
of a problem file that contains an argmap of arguments to PushGP.
Exits after completion of the call.
Any arguments after the first are treated as arguments to PushGP as key-value pairs.
This allows one to run an example with a call from the OS shell prompt like:
lein run examples.simple-regression"
lein run examples.simple-regression :population-size 3000"
[& args]
(println "Command line args:" (apply str (interpose \space args)))
(let [param-list (map #(if (.endsWith % ".ser")
(str %)
(read-string %))
Expand Down

0 comments on commit 7a2f70f

Please sign in to comment.