Memory#
Losing you isn't the end. An APS AI knows why it lost you, what hid you and where you were heading, keeps a diary of every encounter, and learns how you play.
- On AI Lost hands you where it last saw you, where it thinks you went, and what you hid behind.
- Get Loss Reason says why: hidden behind something, out of range, a sound that stopped, a scent that faded.
- It keeps a diary of each encounter, a memory store your game writes to, and a model of how you play.
What it knows the moment it loses you#
On AI Lost (Target, Last Known, Predicted, Last Cover Actor) is the start of every good search. The guard's reaction is your Blueprint; the knowledge comes from APS:
| You get | From | Use it to |
|---|---|---|
| Where it last saw you | Last Known, Get Last Known Position | The first place to go |
| Where it thinks you went | Predicted, Get Predicted Position (with Enable Prediction) | Cut you off |
| What hid you | Last Cover Actor, Get Last Seen Cover Actor, Was Target in Cover | Look behind that crate |
| Why | Get Loss Reason | Choose how to search |
| Which way you ran | Get Loss Direction | Follow the trail |
| How far you could be | Get Uncertainty Radius | A search radius that grows while you hide |
Why it lost you#
| Loss reason | What happened | A good search |
|---|---|---|
| Occluded | You broke line of sight behind something | It knows where you hid: just past where you vanished |
| OutOfRange | Out of range, or out of the side of its view | Along the way you were going (Get Loss Direction) |
| SoundFaded | The noise stopped | Where it went quiet; don't chase |
| ScentLost | The scent faded | Follow the loss direction like a trail |
| SensorDropout | Too dark, cloaked, or blinded | A short look, then patrol |
| TargetDestroyed | The actor is gone | Drop it |

What hid you#
When it loses you from Detected or Tracked, APS traces from the guard's eyes to where you are before the event fires, and records the first thing in the way: Last Cover Actor on On AI Lost, or Get Last Seen Cover Actor. It is cleared on every loss, so it is always about this loss. Look behind it.

Where you were heading#
With Enable Prediction on (it's off by default: a slow patrolling guard that predicts feels psychic), Predicted is where your last run would have taken you, Prediction Horizon ahead. The guard measures your velocity from its own samples, so a fast run reads as fast. See Where it thinks you are for the details.

Short-term and long-term memory#
- Short term: after a loss, confidence fades (Lost → Remembered → Expired).
Min Time in Lostmakes it search at least that long before giving up;Decay Curve(orDefault Decay Exponent) shapes the fade. - Long term:
Long Term Memory Strengthis a second number on the belief, 0 to 1 (read it with Get Belief Data). It builds by 0.02 a second while the AI senses you, so it takes long contact to fill, and fades by about 1% a second after (or asLong Term Decay Curvesays). APS itself doesn't act on it: read it to keep a guard twitchy for a minute after an encounter. - Coming back: while you are Lost or Remembered, the first time a sense picks you up again adds
Memory Refresh Bonusto confidence, once per loss, so it locks on faster the second time. A faint glimpse stays faint: one bonus, however fast the senses run.
| Setting | Default | What it does |
|---|---|---|
Min Time in Lost | 0 | The least time in Lost before it may give up (8 makes it really search) |
Memory Refresh Bonus | 0.1 | Extra confidence, once per loss, when it senses a Lost or Remembered target again |
Memory Expire Threshold | 0.05 | Below this, a remembered target is forgotten (Expired) |
Default Decay Exponent | 0.3 | How fast confidence fades with no curve set |
A diary of every encounter#
APS keeps the last 5 encounters with each target. Read them with Get Recent Episodes or Get Last Episode; clear them with Clear Episodes.
An encounter is written when the AI loses you straight from Detected or Tracked. With the default Loss settings only Vision and Echolocation do that (they have direct cut). A loss that fades down through Suspected first, such as a sound or a scent going quiet, writes no encounter.
| Field | What it holds |
|---|---|
How Lost | The loss reason that time |
State when Lost | Tracked, or only Detected |
Location when Lost | Where |
AICamera Direction | Which way the AI was looking: its own blind spot |
Target Flee Direciton | Which way you ran (the source spells it this way) |
Engagement Duration | All the time this target has spent Tracked so far, not just this encounter: it only grows |
Peak Threat Level | The threat level at the moment it lost you (despite the name, not the highest of the encounter) |
World Time Stamp | When: for "was this recent?" |
The payoff: the last three times I lost this player, they were Occluded within 2 m of the same pillar, so search there first.
A memory store your game writes to#
APS gives each AI somewhere to put a thought. What goes in and what it means are yours: APS doesn't decide that clothing matters, or vehicles, or which hand you swung with.
A memory is a tag on a subject (an actor, or a place), plus optional data:
| Field | Holds |
|---|---|
Tag | What it is: WoreRed, AttackedMe, DroveTruck |
Number | A count, a strength, a damage total: whatever the tag means |
Place | A location it is about |
Related Actor | Another actor it is about: an accomplice, a vehicle |
Count | How many times this tag was written for this subject: kept for you |
Age | Seconds since it was last written: kept for you |
Count and Age are the ones that make behaviour interesting: he has done this four times and that was a long time ago are different beliefs from he did this.
| Node | What it does |
|---|---|
| Make Actor Subject (Actor), Make Place Subject (Location, Place Tag) | Who or where a memory is about |
| Remember (Subject, Tag, Number, Place, Related Actor) | Store it. Writing the same tag again updates it and counts up. |
| Recall (Subject) | Everything about a subject, newest first |
| Recall Tag (Subject, Tag) | One memory: "have I been attacked by this one?" |
| Has Memory Of (Subject) | Anything at all? The cheapest check |
| Forget (Subject, Tag), Forget Subject, Forget Everything | Drop one tag, one subject, or the lot |
| Get Remembered Subject Count | How many subjects it holds |
There is no "on recall" event, on purpose: deciding when to remember is the interesting part of your AI. Call Recall where your logic wants to know: on detect, in a decorator, when choosing a line of dialogue.

Go deeperA witness who builds a case
None of this is APS logic: it is what you write, with the store APS gives you.
On AI Detect (Target)
→ Make Actor Subject (Target) → S
→ Remember (S, "SeenAtScene", Place: Target's location)
→ Branch: holding a weapon? → Remember (S, "Armed")
On AI Damaged (Instigator, Amount)
→ Make Actor Subject (Instigator) → S
→ Remember (S, "AttackedMe", Number: Amount)Later, deciding how to react:
Recall Tag (S, "AttackedMe") → Memory
→ Count ≥ 3 → not a suspect any more: a threat
→ Age > 120 → a while ago: challenge rather than open fireThree strikes and a two-minute cool-off are yours; APS supplied Count, Age, and somewhere to put AttackedMe. Swap the tags and the same code is a shopkeeper who remembers shoplifters, or a detective who remembers what you wore.
| Setting | Default | What it does |
|---|---|---|
Memory Max Subjects | 32 | Subjects per AI; past this the least recently written goes |
Memory Max Tags Per Subject | 16 | Tags per subject; past this the oldest goes |
Memory Retention Seconds | 300 | A subject untouched this long is let go |
It learns how you play#
An AI that notices you always crouch, always break away behind it, always hide behind the same crate, and starts checking there first. This is the player model, and it is automatic (Enable Player Behavior Model, on by default).
It is fair by design: it only records what the AI could perceive. It never reads your input. It watches your speed and stance while it can see you, and records where it lost you. If it never saw you crouch, it doesn't know you crouch.
Read it with Get Player Behavior Model (Target):
| Field | What it measures |
|---|---|
Crouch Ratio | Share of observed time you were crouched or prone (from your posture: a Character's crouch, an APS Target Component's stance, or your stance adapter). Only with no posture to read does speed decide: slower than Player Crouch Speed Threshold (120) counts, standing still included. |
Sprint Ratio | Share faster than Player Sprint Speed Threshold (500) |
Walk Ratio | Everything else |
Stealth Ratio | Share of encounters that ended with you behind the AI (more than about 107° off its facing) |
Aggression Ratio | The rest: encounters that ended with you in front. It and Stealth Ratio always add up to 1. |
Recent Hide Locations | Up to 5 different places it lost you (each more than 2 m from the others) |
Engagement Count | Encounters observed |
Has Enough Data | True once Engagement Count reaches Min Engagements Required (3) |
Always check Has Enough Data before adapting: it stops the AI concluding anything from one encounter.
- It observes while you are Detected or Tracked. An encounter closes, and the ratios update, only when Tracked turns into Lost. One that peaks at Detected and fades rolls into the next; a cautious player who never lets it reach Tracked teaches it nothing.
- So mid-fight you read the previous encounters: established history, which is what you want to act on.
- Reset Player Behavior Model (Target) forgets it all: a story beat, a difficulty reset, an accessibility option. Like memory, it lasts for the session.

Adapt behaviour, not numbers. Secretly sharpening the AI's eyes against a sneaky player feels like cheating, even when players can't name it. Change where it looks instead: patrol routes, facing, search order, how long it lingers. And let the player see it: a line of dialogue ("not this time"), a changed patrol. Adaptation nobody can perceive is just the game getting harder for no reason.
APS and Unreal's AI Perception#
| Unreal AI Perception | APS | |
|---|---|---|
| Losing you | Stops reporting you | Why, what hid you, where you were heading |
| A search radius | None | Grows while you hide |
| Encounters | None | The last 5 per target |
| A memory | None | Tags on actors and places, with count and age |
| How you play | None | Crouch, sprint, break-away and hiding spots, fair by design |