Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

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.

Registrymanifold-ai:curve
Filesdata/curves/*.ron, *.update.ron, *.final.ron
Sidesserver: only the server loads it
Readsnothing
ContractBrains, data stage

Entry

A record, written Curve(..); the name before the parentheses is optional.

FieldTypeRequiredDefaultDescription
idstringyesThe curve’s key, <mod-id>:<name>.
curveCurveSpecyesThe 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.

VariantWrittenDescription
LinearLinear(m: .., k: .., b: .., c: ..)y = m · (x − c)^k + b.
PolynomialPolynomial(m: .., k: .., b: .., c: ..)y = m · (x − c)^k + b, with a fractional k allowed.
LogisticLogistic(m: .., k: .., b: .., c: ..)y = k / (1 + e^(−m · (x − c))) + b.
LogitLogit(m: .., k: .., b: .., c: ..)y = ln(v / (1 − v)) / m + b with v = x − c, rescaled to 0..1.
NormalNormal(m: .., k: .., b: .., c: ..)y = m · e^(−k · (x − c)²) + b: a bell.
SineSine(m: .., k: .., b: .., c: ..)y = m · sin(k · π · (x − c)) + b.
StepStep(at: ..)0 below at, 1 at or above it.
PiecewisePiecewise([(f32, f32)])Straight lines between (x, y) points, flat outside them; x ascending.
InverseInverse(CurveSpec)1 − curve(x).
PresetPreset(string)A manifold-ai:curve entry by key.

Linear fields:

FieldTypeRequiredDefaultDescription
mf32yesSlope.
kf32yesExponent.
bf32yesVertical shift.
cf32yesHorizontal shift.

Polynomial fields:

FieldTypeRequiredDefaultDescription
mf32yesSlope.
kf32yesExponent.
bf32yesVertical shift.
cf32yesHorizontal shift.

Logistic fields:

FieldTypeRequiredDefaultDescription
mf32yesSteepness.
kf32yesHeight.
bf32yesVertical shift.
cf32yesMidpoint.

Logit fields:

FieldTypeRequiredDefaultDescription
mf32yesSteepness.
kf32yesUnused; write 1.0.
bf32yesVertical shift.
cf32yesHorizontal shift.

Normal fields:

FieldTypeRequiredDefaultDescription
mf32yesHeight.
kf32yesNarrowness.
bf32yesVertical shift.
cf32yesCentre.

Sine fields:

FieldTypeRequiredDefaultDescription
mf32yesAmplitude.
kf32yesFrequency.
bf32yesVertical shift.
cf32yesPhase.

Step fields:

FieldTypeRequiredDefaultDescription
atf32yesThe threshold.