Handle -main args correctly in REPL or from command line; update README for specifying problem
This commit is contained in:
parent
6dac92f15f
commit
209e256913
16
README.md
16
README.md
@ -4,15 +4,15 @@ Yet another Push-based genetic programming system in Clojure.
|
||||
|
||||
## Usage
|
||||
|
||||
To run PushGP on the default genetic programming problem
|
||||
from a REPL, load propel.core into your REPL (i.e. `lein repl`),
|
||||
and run `(-main)`.
|
||||
To run PushGP from a REPL, load propel.core into your REPL (i.e. `lein repl`),
|
||||
and run `-main` with arguments including, first, the problem name, for example:
|
||||
`(-main 'simple-regression)` or `(-main 'simple-regression :population-size 100)`.
|
||||
|
||||
To run PushGP on the default genetic programming problem from
|
||||
command line, execute `lein run`. Command-line arguments may
|
||||
be provided to override the defaults specified in `-main`, for
|
||||
example, `lein run :population-size 100`. You can use something
|
||||
like `lein run | tee outfile` to send output both to the terminal
|
||||
To run PushGP on the genetic programming problem p from the
|
||||
command line, execute `lein run p`. For example `lein run simple-regression`. Additional command-line arguments may
|
||||
be provided to override the default key/value pairs specified in `-main`, for
|
||||
example, `lein run simple-regression :population-size 100`. You can use something
|
||||
like `lein run simple-regression | tee outfile` to send output both to the terminal
|
||||
and to `outfile`.
|
||||
|
||||
## CLJS Usage
|
||||
|
@ -33,6 +33,7 @@
|
||||
:variation {:umad 0.5 :crossover 0.5}
|
||||
:elitism false}
|
||||
(apply hash-map
|
||||
(map read-string (rest args))))
|
||||
(map #(if (string? %) (read-string %) %)
|
||||
(rest args))))
|
||||
[:error-function]
|
||||
identity)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user