Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added printing of command line args. Also fixed -main docstring #193

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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