# `mix monty_cad.train`
[🔗](https://github.com/d-led/ex.monty.cad/blob/main/lib/mix/tasks/monty_cad.train.ex#L1)

Samples a part's surface, takes Monty's percept at each visit, and writes the
library.

    mix monty_cad.train bracket.step --object bracket --out bracket.jsonl.gz

Options:

  * `--object` — the name the graph is matched as. Required; the file is not
    allowed to guess it, because a memory matched under the wrong name is a
    memory that never wins.
  * `--out` — where to write. Defaults to `<object>.jsonl.gz`.
  * `--spacing` — millimetres between visits (default 2.0). Smaller is denser
    and slower; a 40 mm spacing on a small plate is a dozen nodes.
  * `--limit` — the most visits to make (default 2000).

The answer names the file, the node count, the features held per node and how
many nodes each feature family contributed. Nodes whose patch saw no surface
are counted, not stored: an empty percept is not a node.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
