Update README.md
Add instructions for using CLI tools. Remove instructions for working at REPL, which are superseded by the instructions for using `session.cljc`.
This commit is contained in:
parent
4eb5e93112
commit
a68f1bdfbc
34
README.md
34
README.md
@ -12,15 +12,17 @@ evaluate the namespace declaration and the commented-out expressions
|
|||||||
therein. These demonstrate core components of Propeller including
|
therein. These demonstrate core components of Propeller including
|
||||||
complete genetic programming runs.
|
complete genetic programming runs.
|
||||||
|
|
||||||
[TODO: Add instructions for running Propeller from the command line
|
To run Propeller on a genetic programming that is defined within this
|
||||||
using the Clojure [CLI](https://clojure.org/guides/deps_and_cli)
|
project from the command line, you will probably want to use either
|
||||||
command-line tools. This is supported (we included a `deps.edn`
|
the Clojure [CLI tools](https://clojure.org/guides/deps_and_cli) or
|
||||||
configuration file), but not yet documented here.]
|
[leiningen](https://leiningen.org).
|
||||||
|
|
||||||
If you have installed [leiningen](https://leiningen.org), which is a tool
|
The instructions below are written for leiningen. If you are using
|
||||||
for running Clojure programs, then you can run Propeller on a genetic
|
the CLI tools instead, then replace `lein run -m` in each command
|
||||||
programming problem that is defined within this project from the command
|
with `clj -M -m`.
|
||||||
line with the command `lein run -m <namespace>`, replacing `<namespace>`
|
|
||||||
|
If you are using leiningen, then you can start a ruh with the command
|
||||||
|
`lein run -m <namespace>`, replacing `<namespace>`
|
||||||
with the actual namespace that you will find at the top of the problem file.
|
with the actual namespace that you will find at the top of the problem file.
|
||||||
|
|
||||||
For example, you can run the simple-regression genetic programming problem with:
|
For example, you can run the simple-regression genetic programming problem with:
|
||||||
@ -57,22 +59,6 @@ containing curly brackets that may confuse your shell:
|
|||||||
lein run -m propeller.problems.simple-regression :variation "{:umad 1.0}"
|
lein run -m propeller.problems.simple-regression :variation "{:umad 1.0}"
|
||||||
```
|
```
|
||||||
|
|
||||||
To run a genetic programming problem from a REPL, start
|
|
||||||
your REPL for the project (e.g. with `lein repl` at the
|
|
||||||
command line when in the project directory, or through your
|
|
||||||
IDE) and then do something like the following (which in
|
|
||||||
this case runs the simple-regression problem with
|
|
||||||
`:population-size` 100):
|
|
||||||
|
|
||||||
```
|
|
||||||
(require 'propeller.problems.simple-regression)
|
|
||||||
(in-ns 'propeller.problems.simple-regression)
|
|
||||||
(-main :population-size 100 :variation {:umad 1.0})
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want to run the problem with the default parameters,
|
|
||||||
then you should call `-main` without arguments, as `(-main)`.
|
|
||||||
|
|
||||||
|
|
||||||
## CLJS Usage
|
## CLJS Usage
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user