From c1a73908cb0edda353fecece99058e933a30acc9 Mon Sep 17 00:00:00 2001 From: Tom Helmuth Date: Fri, 22 Apr 2016 19:17:57 -0400 Subject: [PATCH] Added printing of command line args. Also fixed -main docstring --- src/clojush/core.clj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/clojush/core.clj b/src/clojush/core.clj index 6742f015d..930863e53 100644 --- a/src/clojush/core.clj +++ b/src/clojush/core.clj @@ -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 %))