Files
AzerothAI/docs/survival-cooperation.md
T
2026-09-24 05:58:16 +12:00

9.5 KiB
Raw Blame History

Survival and cooperation

Native survival assistance samples registered, living bots every two seconds. Health below 55% in combat or a drop of at least 15 percentage points records ten minutes of recent danger. Party selection gives those residents priority; recent danger bypasses sociability reluctance, but never hostility, faction/level compatibility, proximity or human-control checks. Candidate ranking favors shared active quest IDs and complementary native healer/tank roles. It does not change class, spec, gear or quest state.

Party actions remain receipt-confirmed, one per community tick. Participants wait two minutes after a completed action or one minute after a rejected command before another invitation; pending commands remain excluded. Separated parties now have twenty minutes before automatic departure, giving native regrouping a chance. Declined candidate pairs no longer prevent the same tick from considering a better match.

The native guard requests the existing flee action at most every eight seconds when health falls below 50%, an enemy is at least three levels higher or is elite/rare-elite/world-boss, or at least two members and at least half the party are nearby and below 40%. This is a movement request, not guaranteed escape. After danger, injured bots request normal eating/drinking actions; food, mana and other game requirements still apply. No health, level or resurrection changes occur.

Healthy, noncombat followers 12–200 yards from their bot leader on the same map/phase can request normal follow movement. Human-led, mixed, raid and partly offline parties are excluded. The guard does not teleport or force cross-map travel. A master relationship assigned for following is cleared when that party relationship ends. Slower model commands yield to a recent native survival request rather than immediately replacing it. An accepted request does not establish shared quest completion or successful escape; existing gameplay and cooperation counters remain the outcome evidence.

Grouping assistance uses the existing parties-enabled setting, refreshed by the operations collector with a three-minute expiry. Danger detection and emergency self-preservation remain active for eligible bots. Bot Activity displays recent survival requests explicitly as requests. The ALE bridge supplies native combat role and up to 25 active quest IDs for companion matching.

Install ale/azerothai_survival.lua beside the existing bridge. Its registry refreshes every minute. It uses no model calls and its per-character runtime observations expire after ten minutes offline. Game hooks and policy tests exercise retreat cooldown, follow distance, faction/hostility and human-control exclusions. In-game survival improvement must be evaluated over actual play; this is not a promise that bots cannot die.

Invitation and membership repair

Install ale/azerothai_parties.lua beside the bridge and reload ALE before deploying the matching runtime. Party commands fail closed if this native guard is unavailable.

Party invitations now carry both exact native identities and expire 45 seconds after creation. The native guard retries every two seconds while a participant is busy or out of range, allowing a meeting within 60 yards on the same map/phase. Every attempt rechecks identity, lifecycle, faction, levels, human control and group capacity. There is no teleport or forced combat interruption. A deferred bridge command receives its completion receipt only when membership is confirmed or the invitation expires/fails. Pending participants remain reserved so another invitation cannot race the first. ALE reloads lose in-memory retries; the durable lane eventually replays the expired request as a failure rather than applying an old invitation.

Every ten seconds, the party guard checks incomplete groups against the complete persisted character membership and hardcore registry. It removes only a verified permanently dead member, after validating every identity and protecting human, unknown, active-but-offline, raid and combat parties. One mutation per group avoids touching a Group object after native disbanding. The audit table acore_auth.azerothai_party_audit records actual removals and invitation outcomes; it is covered by the full auth database backup.

Hardcore survival revision

The native guard now samples every two seconds. Retreat is requested below 50% health, against targets at least three levels higher or elite/rare-elite/world-boss targets, or when nearby party health collapses. Emergency casts are stopped before requesting flee; human-controlled, mixed/incomplete parties, taxi and movement restrictions remain protected. Requests are limited to one per eight seconds. Dangerous selected targets must also appear in the native unfriendly list within 40 yards before pre-combat avoidance is requested. These are native movement requests, not guaranteed avoidance or escape.

Healthy followers can regroup over 12–200 yards on the same map/phase. Healthy noncombat leaders pause for at most 20 seconds per minute when a noncombat companion is 25–200 yards behind. Recovery requests now extend to 80% health after recent danger. No teleport, resurrection, population or stat changes are made.

The auth table azerothai_survival_audit records request acceptance and observed outcomes: out of combat, movement while still in combat, no movement after 30 seconds, or death during observation. Movement means at least five yards from the starting position (or a map change); it does not prove successful escape. Audit records expire after seven days in bounded hourly batches. Snapshots continue to expose the latest action and timestamp.

Stall recovery keeps its ten-minute idle clock across casts. Real movement, level/health changes, successful loot or quest completion reset the clock. It can interrupt a noncombat cast only after that threshold; combat, taxi, human control, movement restrictions, fresh intentions and the persistent thirty-minute recovery cooldown remain enforced. Run deploy/pc-lab/limit-model-memory.ps1 -Restart on the Windows model host to cap prompt cache at 512 MiB and checkpoints at four. This trades cache reuse for host memory without changing model or context size.

Recovery briefly disables existing gather/loot strategies for two minutes after releasing loot, so an invalid gathering target cannot immediately cancel the walking request. A durable lease restores only previously enabled strategies, including after a Lua reload. An operator may make one follow-up attempt within the cooldown only when the sole recent attempt has a verified no-progress result; automatic attempts retain their thirty-minute cooldown.

Survival-first readiness (2026-09-23)

The two-second native guard now pauses questing, grinding, gathering and looting when recovery or immediate danger takes priority. Recovery starts below 85% health or 35% mana and finishes at 95% health and 65% mana. A dangerous encounter also requires a 15-second recovery pause. Native eating, drinking and defensive combat remain available. Only originally enabled strategy flags are restored, with persistent 90-second leases so a Lua reload cannot permanently strand a pause.

Retreat starts below 55% health without nearby support (50% with support), against an enemy two or more levels higher or an elite, when attackers outnumber nearby healthy companions plus the bot below 80% health, or after losing 20 percentage points of health in one sample below 80%. Support must be within 35 yards, in the same map and phase, and have at least 70% health. Existing human-party protections continue to apply. These are retreat requests, not guaranteed escapes.

Fresh observed injury also overrides high-level brain goals with permitted rest, before any model call. Model instructions explicitly prioritize survival over quests, loot and social goals. Stuck recovery yields to the native survival hold. Mortality improvement must be measured over subsequent real playtime; these rules do not make bots invulnerable or resurrect dead characters.

Persistent companions and failed-encounter avoidance

New party invitations now require a level gap of at most five. Followers regroup at eight yards; healthy leaders pause when a nearby companion is injured or more than fifteen yards away (the existing bounded wait still prevents permanent idle). A recently observed dead party member in normal resurrection mode does not trigger the runtime's separation-based party departure. Human and unmanaged groups remain protected.

Overpowered enemies, extra attackers, and rapid health loss mark that selected enemy for ten minutes of avoidance. The guard stops renewed attacks and asks the native AI to flee if that hostile target is selected again within range. This memory is local to the running Lua process, expires, and is not a pathfinding barrier or a guarantee that the bot can escape. No automatic gear, talent, or level boosts are applied.

Cohesion holds

Catch-up begins beyond 12 yards and remains active until within 6 yards, with a 200-yard maximum. During catch-up, the existing durable strategy lease pauses independent questing, grinding, gathering and looting; following and defensive combat remain native. Leaders use the same lease during their bounded 20-second wait, rather than only stopping movement while RPG immediately restarts it. A reunion resets the wait timer. Nearby low-mana companions also trigger a wait. Safety/recovery still wins, incomplete or human parties are excluded, and no teleport or forced cross-map reunion is attempted. Regroup requests record the native acceptance result and distance at most once per 30 seconds per bot.