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
|
## Usage
|
||||||
|
|
||||||
To run PushGP on the default genetic programming problem
|
To run PushGP from a REPL, load propel.core into your REPL (i.e. `lein repl`),
|
||||||
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:
|
||||||
and run `(-main)`.
|
`(-main 'simple-regression)` or `(-main 'simple-regression :population-size 100)`.
|
||||||
|
|
||||||
To run PushGP on the default genetic programming problem from
|
To run PushGP on the genetic programming problem p from the
|
||||||
command line, execute `lein run`. Command-line arguments may
|
command line, execute `lein run p`. For example `lein run simple-regression`. Additional command-line arguments may
|
||||||
be provided to override the defaults specified in `-main`, for
|
be provided to override the default key/value pairs specified in `-main`, for
|
||||||
example, `lein run :population-size 100`. You can use something
|
example, `lein run simple-regression :population-size 100`. You can use something
|
||||||
like `lein run | tee outfile` to send output both to the terminal
|
like `lein run simple-regression | tee outfile` to send output both to the terminal
|
||||||
and to `outfile`.
|
and to `outfile`.
|
||||||
|
|
||||||
## CLJS Usage
|
## CLJS Usage
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
:variation {:umad 0.5 :crossover 0.5}
|
:variation {:umad 0.5 :crossover 0.5}
|
||||||
:elitism false}
|
:elitism false}
|
||||||
(apply hash-map
|
(apply hash-map
|
||||||
(map read-string (rest args))))
|
(map #(if (string? %) (read-string %) %)
|
||||||
|
(rest args))))
|
||||||
[:error-function]
|
[:error-function]
|
||||||
identity)))
|
identity)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user