# `Tune.Optimizers.Playbook`
[🔗](https://github.com/mikehostetler/tune/blob/v0.5.0/lib/tune/optimizers/playbook.ex#L1)

Learns a bounded list of lessons stored in a declared JSON parameter.

The parameter must hold a list of strings that application code reads with
`Tune.Execution.value/2` during its normal calls. The unchanged
program is evaluated on validation first. Each round runs the incumbent on
the training set, sends the current lessons and the trajectories with
scores and feedback to the proposal role, and receives a new lesson list.
A proposal is rejected unless it satisfies the parameter schema and the
growth limits: at most `max_lessons` lessons, at most `max_new` lessons not
already present, each at most `max_lesson_bytes`, and at most
`max_total_bytes` in total. An accepted challenger is evaluated on
validation against the incumbent, and the better complete eligible program
is kept; a rejected or worse challenger leaves the incumbent unchanged.

Options: `:parameter` (required name), `:rounds` (default 2),
`:max_lessons` (default 8), `:max_new` (default 3), `:max_lesson_bytes`
(default 400), `:max_total_bytes` (default 4 000).

Differences from Imp: lessons are an ordinary parameter, not serving
memory; there is no separate promotion or audit workflow and no
checkpoints; serving state changes only when the caller installs the
returned program or artifact.

# `check_growth`

```elixir
@spec check_growth(map(), [String.t()], [String.t()]) :: :ok | {:error, String.t()}
```

Checks a proposed lesson list against the growth limits.

---

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