Skip to main content

Function: applyLeaderPull()

applyLeaderPull(agent, model, ctx): TraitProfile

Defined in: apps/paracosm/src/engine/trait-models/drift.ts:97

Apply leader-pull drift: shift the agent's profile toward the leader's per-axis values by model.drift.leaderPull[axisId] * (leader[axis] - agent[axis]). Returns a new TraitProfile.

Skipped when the agent's modelId differs from the leader's (cross-model pull is undefined).

Parameters

agent

TraitProfile

model

TraitModel

ctx

DriftLeaderPullContext

Returns

TraitProfile