Perception and bounded search¶
An enemy acts on what it saw or heard, and on guesses derived from that evidence. It cannot follow your live position through a wall. For example, if you run right before disappearing behind cover, it may inspect the right-hand pocket; doubling back unseen can make that guess wrong.
Implemented, opt-in shooter: personal sight/memory, connected weapon-shot hearing, bounded local investigation, safe positioning and validated direct fire. M5/M5B have scoped human acceptance; the later committed firing checkpoint 80f7fa8 has separate partial evidence and pending acceptance. Normal production enemies remain passive. Squad report intake exists, but its coordinator/transport is planned C2. This page supplies no new gameplay evidence.
What an enemy knows¶
Evidence has a source, target lifetime, position and original observation time. For example, receiving an ally's old sighting would not make it fresh or turn it into the receiver's personal sight.
| Evidence | Current connection and use |
|---|---|
| Personal sight | Server sensing checks range, full 3D FOV and actual geometry against eligible living players. Records aim observation, accepted feet and observing eye. New acquisition pays visual reaction delay. |
| Remembered personal sight | Last genuine observation remains usable until retention expires. Search uses frozen last-seen feet/view, not a hidden target transform. Brief occlusion does not repay reaction delay while readiness/memory remain fresh. |
| Squad visual report | Validated ImportReportServer intake preserves observer identity/spawn, target lifetime and original time. No live squad/cooperation producer is connected. Future reports can guide awareness/repositioning, not direct fire or personal-memory bombardment. |
| Hearing | Accepted host weapon discharges emit coarse 12 m cell regions (bounding radius about 10.39 m). Range measures distance to region centre; walls do not block this check. No general footstep/all-audio producer is connected. |
| Broad assignment | Future C1 guidance supplies a pressure region, not unseen exact aim. Current graph assignment wait is a finite fixture stub, not coordination. |
Preference is visible personal > remembered personal > squad report > heard region. Target hold stabilizes equal-quality choices; better evidence/invalid targets can override immediately. Report/hearing freshness uses retention from each original event; forwarding must not refresh it. This M5B investigation requires personal sight and motion samples; report/hearing alone does not seed it.
Implemented personal-search schematic. Report/hearing information remains separate; report transport is planned. New personal sight ends the old episode and can establish new evidence.
Predictions and viewpoints¶
A prediction is a possible hiding place. A viewpoint is a place to inspect predictions from. For example, one corner viewpoint can expose three possible hiding spots without walking onto any marker.
The planner captures last-seen feet as the anchor, observing eye and any valid horizontal velocity. It proposes the anchor, clipped motion extrapolation when available, wall-derived locations and independent radial samples. Predictions need supported projected ground within radius/vertical bounds and a complete native path from the anchor. Close duplicates merge; all sources share the maximum prediction count.
Motion estimation needs consecutive successful sight samples, acceptable gap, sufficient displacement and inferred speed below its ceiling. Sight loss breaks continuity. The estimate stays frozen while hidden; geometry queries never read unseen player movement. Without velocity, the sampling axis falls back to the captured viewing direction toward the anchor, then enemy forward if needed.
Wall crossing and radial sampling¶
A wall suggests a plausible pocket only if safe far-side ground exists. For example, a ray exiting a wall over a pit produces no valid prediction.
Cover rays form a deterministic 3D cone from the captured eye toward the frozen predicted torso centre. Half-angle 15° means a 30° opening, independently of sight FOV. Admission requires a real wall hit, bounded exit scanning (32 quarter-metre steps), downward floor hit, expected-height projection, clearance, local reach/search-radius bounds and a complete native route. Wall entry can precede the local probe region; accepted ground must remain inside it. Open space, missing floor and saturated/unknown queries do not become valid wall guesses.
Wall-derived locations consume at most half the total prediction capacity. Ray count is attempted directions, not guaranteed markers. Non-cover radial attempts independently sample half/full-radius directions then diagonals, filling remaining slots after rejected cover probes. They share merging, time, geometry and total limits. Captured cover reach is clamped to Search Radius.
Diagram 1 — wall-hit predictions. Cyan marks captured sight and ray probes; white crosses mark first wall hits. Amber shows the estimated centre and far-side tests; diamonds represent guesses that passed admission checks. The inset explains grounding in side view; the main map projects a 3D cone into top-down view. No world scale; illustrative samples, not exact preset output, gameplay capture or simulation proof.
For example, several rays can strike the same wall and suggest different far-side pockets. A ray that misses creates no wall-derived guess. A hit alone is insufficient: far-side support, clearance and a complete route must pass. Dashed lines do not permit walking or shooting through walls. C is a frozen aim centre, not a known hidden player.
Movement and radial predictions¶
Two recent sightings can suggest where the player was heading. For example, moving 0.75 m in 0.15 s gives an observed 5 m/s; extrapolating another 0.75 s suggests a point 3.75 m ahead. This estimate freezes when sight is lost, so an unseen turn can defeat it.
Diagram 2 — movement and independent radial sampling. Cyan dots are actual observations; the amber diamond is extrapolation; hollow circles are attempted radial locations. Rings show 3 m and 6 m bounds. This local map uses the same colour/shape meanings as Diagram 1, with a separate illustrative coordinate layout. No unseen player is drawn.
The example uses Ordinary's current 6 m radius and shared 0.75 s extrapolation, but its two sightings and resulting positions are illustrative. Actual motion needs consecutive successful sightings, gap ≤ 0.5 s, displacement ≥ 0.2 m and inferred speed ≤ 12 m/s; personal-memory continuity additionally limits the gap to 2.1 × perception interval (0.315 s at the current 0.15 s). The 0.15 s example passes both gap bounds.
motion prediction = last-seen feet + clampMagnitude(observed velocity × prediction seconds, search radius)
The raw sampler first attempts the last-seen anchor, then the motion prediction when valid. Radial attempts independently use half/full radius along/across the frozen axis, then the 45° diagonals. Sixteen attempts do not mean sixteen kept predictions: projection, support, clearance, complete native paths, duplicate merging, shared capacity, query budgets and the original deadline can reduce the result. Without a valid velocity, there is no motion extrapolation; radial sampling uses the captured eye-to-anchor axis, falling back to enemy forward if needed. None of these paths reads unseen live movement.
Information gain and safe navigation¶
Useful viewpoints rule out possibilities for reasonable travel. For example, nearby coverage worth 30% may beat a long route worth 35%.
Predictions start at weight 1, with near-anchor occluded-cover and observed-direction bonuses. Viewpoints include the current position and projected alternatives out to radius + stand-off. Planned coverage tests use actual eye/FOV/range and world geometry. Full support/collision/navigation, action-owned destination claims and remaining time/travel must also pass.
gain = newly visible unchecked prediction weight / ORIGINAL total prediction weight
score = gain − travelCostWeight × full route length / maximumSearchTravelDistance
Minimum gain is an eligibility gate before travel penalty. A negative score alone does not stop search. Strengthening some weights can shrink other guesses' fractions; it does not increase their count. Prediction generation, viewpoint scoring and final route acceptance are separate checks.
For example, one reachable viewpoint may expose several predictions, while a second would reveal too little new information for its travel cost. The planner estimates coverage to select a useful view; planned visibility is not checked history. Only oriented dwell, a fresh perception pass and completed actual visibility probes check visible points. Different weights mean three of four points need not equal 75% information gain.
Inspection checks evidence, not proximity¶
Reaching a viewpoint earns no checked history while the enemy looks away. It must face its look target, dwell if configured, then get a fresh actual perception sample and finish coverage probes.
Schematic animation: one inspection — ordering only, illustrative duration. Not gameplay capture or simulation proof.
- Travel safely
- Face look target
- Dwell + fresh sight pass
- Check visible predictions
Static fallback: travel → face → dwell and fresh perception → check visible predictions. Hidden guesses stay unchecked; all steps consume the original deadline.
Yaw must stay within Facing Tolerance; root, stun or turning away resets progress. The fresh sample must follow last sight and meet oriented dwell. Unknown coverage waits rather than checking space; geometry changes invalidate the snapshot. Only visible guesses enter checked history; one inspection can check several. Zero dwell still requires fresh perception and visibility.
Shared FIFO budgets reserve service for waiting requests before repeats spend spare capacity. Sandbox defaults are 8 path queries/frame and 16 search visibility probes/frame, editable 1–32, captured on reset. They are separate shared services, not per-enemy budgets or caps on every Physics call. A request may spend multiple available queries per frame. Deferral spends no admitted viewpoint attempt, proves no route failure and never authorizes retirement; evidence time still passes.
Search clocks and stopping¶
Search time starts at last sight, not at investigation admission. For example, 9 s retention and 20 s maximum search leave at most 7 s if planning starts 2 s after sight loss. Travel, turning, planning and inspection all share that remainder.
Illustrative values, not a preset. Units: seconds since last genuine sight. Inspections never restart either clock.
deadline = last genuine sight time + min(retention, maximum search seconds)
remaining travel = maximum search travel distance − cumulative actual voluntary travel
| Stop / interruption | Meaning |
|---|---|
| EvidenceExpired / TimeLimit | Original retention/search deadline reached. Graph reentry and movement/inspection cannot renew it. |
| TravelLimit | Cumulative voluntary distance across routes/interruptions spent. Routes must fit remaining distance/time; slow/stun never extend clocks. |
| AttemptLimit / InspectionLimit | Admitted destinations (including failed travel) or completed inspections spent. Deferred queries spend no attempt. |
| NoEligibleGround | No eligible projected/path-connected prediction survived generation. |
| NoUsefulViewpoint | No sufficiently informative safe route/view remains within limits; not proof all predictions were checked. |
| InvalidTarget / lifecycle | Target/actor/run/stage lifetime invalid; owned work cancelled. Target switching can suspend work without renewing its episode. |
| Reacquired | Real personal visibility or newer genuine personal sight ends the old episode; attack readiness/release checks still apply. |
Failed viewpoints need retry delay and changed world-geometry signature in an active episode. Terminal searches cannot restart for the same sighting. Guesses can remain unchecked because of time/travel/attempt limits, gain threshold, occlusion, unsafe ground, unreachable routes or claims. There is no “check every prediction” switch. Illustrative example: a final 6%-weight guess cannot alone meet a 10% gain threshold even if near the actual hidden player.
Weak, Ordinary and Persistent¶
Strength means effort, not certainty. Persistent can inspect longer than Weak and still choose the wrong pocket. Ordinary currently searches a wider radius than Persistent.
Current authored values at inspection, not the sandbox's older comparison-label text:
| Captured setting (unit) | Weak | Ordinary | Persistent |
|---|---|---|---|
| Personal retention / maximum search (s) | 3 / 3 | 6 / 6 | 20 / 20 |
| Radius / cumulative travel (m) | 3 / 9 | 6 / 18 | 5 / 45 |
| Maximum attempts / inspections | 2 / 1 | 4 / 3 | 12 / 9 |
| Inspection dwell (s) | 0.45 | 0.45 | 0 |
| Maximum predictions / viewpoint candidates | 8 / 12 | 8 / 16 | 14 / 20 |
| Non-cover radial attempts | 16* | 16* | 5 |
| Cover rays / authored reach (m) / half-angle (°) | 4 / 1.5 / 15 | 4 / 3 / 15 | 16 / 7 / 20 |
| Effective cover reach (m) | 1.5 | 3 | 5 (clamped) |
| Merge spacing (m) | 0.75 | 0.25 | 0.75 |
| Near-cover weight / minimum gain | 2 / 0.1 | 2 / 0.1 | 3 / 0.05 |
* Weak/Ordinary omit radialSampleCount in YAML; the current definition initializer supplies 16 (static source interpretation, not an Editor capture). Persistent now authors 16 cone rays; older text preserving disabled probes describes an earlier checkpoint.
All share perception interval 0.15 s, reaction 0.25 s, target hold 1.5 s, sight 40 m, full FOV 210° (±105°) and hearing 35 m. Investigation shares yaw tolerance 10°, vertical allowance 2 m relative to last-seen feet, stand-off 1.5 m, motion max gap 0.5 s/min displacement 0.2 m, extrapolation 0.75 s/max inferred speed 12 m/s, direction weight 1, travel weight 0.25 and blocked retry 1 s. Consecutive sight continuity also has the memory layer's bound of 2.1 × perception interval.
Where to edit and practical tuning¶
Definitions capture at actor initialization: reset/respawn to apply edits. Choosing Persistent for the next reset does not upgrade the Ordinary shooter already searching. Reset replaces/repositions actors rather than continuing the episode.
Use assigned perception/investigation assets under Assets/_Project/Debug/EnemyBehavior/ for this manual fixture; other enemies use their own component references. Search-strength Inspector controls prediction/radial/cover counts and advanced sampling/scoring. Metres, seconds, degrees and fractional gain are separate units. Internal investigationSeconds is perception evidence retention.
- Weak's one inspection/three-second clock makes a quick check. Removing dwell cannot extend retention.
- Ordinary's 6 m radius proposes farther guesses than Persistent's current 5 m; Persistent has more effort, not automatically more area.
- For thoroughness, consider retention and maximum time, travel, attempts/inspections, candidate count and minimum gain together. More rays alone cannot create floor, a safe view or exhaustive coverage.
- If a reached view checks nothing, inspect facing, sample time, FOV/geometry and Unknown deferral before increasing density.
The settings reference explains individual controls; use this current asset table over its checkpoint-specific old values. No tuning changed for this wiki.
Related firing-position work¶
Seeing part of a player does not guarantee the chosen muzzle path is clear. For example, the later exposed-platform fix tries bounded body heights to find the same point clear from both actual eye and muzzle, then holds a currently useful firing position instead of oscillating between moves. Verification leaves sampled memory/reaction clocks unchanged, and a prepared bolt's committed point remains immutable.
The focused firing checkpoint records 11/11 rules, a qualified platform case, a 38/40 native union and a later cover diagnostic; the original cover-timing miss, broader integration and human acceptance remain open. These partial results do not replace the earlier search gate or establish present-tree production acceptance.
Source and provenance¶
See inspection identity, ownership/controls and parent implementation/evidence.
- Evidence: perception, memory, selection, noise.
- Search: definition, episode, planner, positioning/inspection, budgets, navigation safety.
- Presets: Weak perception / investigation; Ordinary perception / investigation; Persistent perception / investigation.