# Function updateAdaptiveWeights

- updateAdaptiveWeights(
  reward: number,
  breakdown: Record<string, ScorerBreakdown>,
  optionsOrLearningRate?: number | AdaptiveWeightUpdateOptions,
  ): void

  Applies one online gradient step to the globally learned weights.

      Δweight = learningRate × reward × contribution

  Scorers with high contribution to a good outcome get heavier; scorers that pushed a bad decision get lighter. The update is idempotent with respect to sign: a series of failures will keep driving a weight toward `WEIGHT_MIN` but can never push it below that floor.

  NaN and zero rewards are ignored (no-ops).

  #### Parameters

  - reward: number

    Continuous reward signal in [−1, 1]; from correlateOutcome.

  - breakdown: Record<string, ScorerBreakdown>

    Per-scorer contributions from the decision being evaluated.

  - optionsOrLearningRate: number | AdaptiveWeightUpdateOptions = LEARNING_RATE

    Either a legacy numeric learning rate, or an options object with `namespace` and/or `learningRate`.

  #### Returns void

  - Defined in kernel/adaptiveWeights.ts:366