Vixen
c7401864
csharp
public record class ResponseCurve

One input, one shape, four parameters.

Read the guide page for this →

Remarks

The Infinite Axis shape, and it is small enough to state completely: m is slope, k is exponent or width, b is vertical shift and c is horizontal shift. Every curve in doc 37 § D8's table is those four at different values.

⚠ The result is clamped to [0,1], and that is what makes the zero rule mean something. A curve that returned 1.4 would let one consideration outvote a veto, and a negative one would flip the sign of a geometric mean — so the clamp is part of the contract rather than defensive arithmetic.

⚠ A record class rather than a record struct. A record struct's new() is its zero value, so a curve built with an object initialiser would get a slope of zero — a consideration that always scores b. The same trap cost P2 a working layout and P3 very nearly cost a sight radius.

Fields and properties (7)

  • public ResponseCurveKind Kind

    Which shape.

  • public float Slope

    Slope, or height for the bell.

  • public float Exponent

    Exponent, steepness, or width — whichever the shape has.

  • public float Shift

    Vertical shift.

  • public float Centre

    Horizontal shift.

  • public CurveSample[]? Keys

    The keys, for Sampled. Assumed to be in time order.

  • public static ResponseCurve Identity

    Straight through: the input is already the score.

Methods (4)

  • public static ResponseCurve Constant(float value)

    A constant. What a consideration that is only there for its weight uses.

  • public static ResponseCurve Threshold(float centre, float steepness = 12)

    A threshold at a point, rising or falling.

  • public static ResponseCurve Bell(float centre, float width = 0.15)

    A bell around a point.

  • public float Evaluate(float x)

    Puts an input through the shape.

Used by (21)

  • AiDebugChannelTestsVixen.Ai.Tests
  • AiDiagnosisExitCriteriaTestsVixen.Ai.Tests
  • AiSnapshotTestsVixen.Ai.Tests
  • AuthorableNodeTestsVixen.Ai.Tests
  • OverlayFixtureVixen.Ai.Diagnostics.Tests
  • QueryScorerExitCriteriaTestsVixen.Ai.Tests
  • QueryTestVixen.Ai
  • QueryTestContentVixen.Ai
  • ResponseCurveTestsVixen.Ai.Tests
  • RunQueryNodeTestsVixen.Ai.Nodes.Tests
  • UtilityAgentTestsVixen.Ai.Tests
  • UtilityCompensationTestsVixen.Ai.Tests
  • UtilityConsiderationContentVixen.Ai
  • UtilityInertiaTestsVixen.Ai.Tests
  • UtilityOscillationTestsVixen.Ai.Tests
  • VillageVixen.Ai.Nodes.Tests
  • AgentFixtureVixen.Editor.AssetEditors.Tests
  • LiveAgentVixen.Editor.AssetEditors.Tests
  • QueryViewVixen.Editor.AssetEditors
  • UtilitySetModelVixen.Editor.Ai
  • UtilitySetViewVixen.Editor.AssetEditors