data/curves/
A response curve: a named shape that maps an input in 0..1 to a score in 0..1, which utility considerations and sensor falloff use. A consideration names one with Preset("<key>") or writes its own inline. Curves are baked into tables at load and must stay within 0..1. The engine declares manifold:linear, manifold:inverse_linear, manifold:ease_in, manifold:ease_out, manifold:logistic, manifold:threshold_high and manifold:sight_falloff. Loaded by the server only.
| Registry | manifold-ai:curve |
| Files | data/curves/*.ron, *.update.ron, *.final.ron |
| Sides | server: only the server loads it |
| Reads | nothing |
| Contract | Brains, data stage |
Entry
A record, written Curve(..); the name before the parentheses is optional.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | The curve’s key, <mod-id>:<name>. | |
curve | CurveSpec | yes | The shape. Not a Preset. |
Example
No bundled file declares one yet. An entry the engine declares, which mods may patch:
Curve(id: "manifold:threshold_high", curve: Step(at: 0.75))
Types
CurveSpec
A curve’s shape, over x in 0..1.
| Variant | Written | Description |
|---|---|---|
Linear | Linear(m: .., k: .., b: .., c: ..) | y = m · (x − c)^k + b. |
Polynomial | Polynomial(m: .., k: .., b: .., c: ..) | y = m · (x − c)^k + b, with a fractional k allowed. |
Logistic | Logistic(m: .., k: .., b: .., c: ..) | y = k / (1 + e^(−m · (x − c))) + b. |
Logit | Logit(m: .., k: .., b: .., c: ..) | y = ln(v / (1 − v)) / m + b with v = x − c, rescaled to 0..1. |
Normal | Normal(m: .., k: .., b: .., c: ..) | y = m · e^(−k · (x − c)²) + b: a bell. |
Sine | Sine(m: .., k: .., b: .., c: ..) | y = m · sin(k · π · (x − c)) + b. |
Step | Step(at: ..) | 0 below at, 1 at or above it. |
Piecewise | Piecewise([(f32, f32)]) | Straight lines between (x, y) points, flat outside them; x ascending. |
Inverse | Inverse(CurveSpec) | 1 − curve(x). |
Preset | Preset(string) | A manifold-ai:curve entry by key. |
Linear fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
m | f32 | yes | Slope. | |
k | f32 | yes | Exponent. | |
b | f32 | yes | Vertical shift. | |
c | f32 | yes | Horizontal shift. |
Polynomial fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
m | f32 | yes | Slope. | |
k | f32 | yes | Exponent. | |
b | f32 | yes | Vertical shift. | |
c | f32 | yes | Horizontal shift. |
Logistic fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
m | f32 | yes | Steepness. | |
k | f32 | yes | Height. | |
b | f32 | yes | Vertical shift. | |
c | f32 | yes | Midpoint. |
Logit fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
m | f32 | yes | Steepness. | |
k | f32 | yes | Unused; write 1.0. | |
b | f32 | yes | Vertical shift. | |
c | f32 | yes | Horizontal shift. |
Normal fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
m | f32 | yes | Height. | |
k | f32 | yes | Narrowness. | |
b | f32 | yes | Vertical shift. | |
c | f32 | yes | Centre. |
Sine fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
m | f32 | yes | Amplitude. | |
k | f32 | yes | Frequency. | |
b | f32 | yes | Vertical shift. | |
c | f32 | yes | Phase. |
Step fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
at | f32 | yes | The threshold. |