Intelligence · class
ReplaySession
Replay accepted commands at their original boundaries. Calls no provider, ever.
Explained in Agents and behaviour.
class ReplaySessionimport { ReplaySession } from '@driftengine/ai';In depth
A buffered agent replays exactly, and the floor is why. Model decisions are replayed from the log; floor decisions are recomputed, because the floor is deterministic and runs inside the simulation. So the log carries only what could not be derived, and a thousand-tick recording is a handful of entries rather than a thousand.
The design that waited could not promise this. There, the timing of a response was itself part of the behaviour — an agent stood still for however long the provider took — and timing is the one thing a live provider will not reproduce.
Constructor
new
constructor(source: ReplaySource, policy: AgentPolicy, agentId: string)| Parameter | Type | Description |
|---|---|---|
source | ReplaySource | |
policy | AgentPolicy | |
agentId | string |
Accessors
| Name | Type | Description |
|---|---|---|
currentget | Intent | null | |
replayedIntentsget | number | Model intents taken from the log rather than recomputed. |
Methods
tick
tick(tickNumber: number, nowMs: number): Intent| Parameter | Type | Description |
|---|---|---|
tickNumber | number | |
nowMs | number |