Skip to content

Improve mob combat and movement AI - #58

Merged
xefensor merged 1 commit into
masterfrom
fix/ai-behavior-stability
Aug 30, 2026
Merged

Improve mob combat and movement AI#58
xefensor merged 1 commit into
masterfrom
fix/ai-behavior-stability

Conversation

@xefensor

Copy link
Copy Markdown
Owner

Summary

Improves Retold mob decision-making across targeting, group defense, specialist combat, navigation recovery, and urgent flight. This follows the developer playtest reports that mobs retained low-threat targets, noticed enemies from implausible distances, failed to react before being hit, handled Phantom and armed attacks poorly, and visibly zigzagged while fleeing.

Player or developer impact

  • Uses species-aware acquisition and retention distances and retargets to materially more dangerous recent attackers.
  • Lets appropriate species and factions defend threatened allies and react to visible attack intent before damage.
  • Makes Phantom attacks reliable while keeping spawns rare and limited to one, and improves Skeleton firing-lane behavior around Undead allies.
  • Adds bounded ground-route failure, backoff, stuck recovery, and alternate Panda bamboo selection.
  • Makes flee routes use a straight corridor, retain matching active paths, avoid water, and use deterministic detours only after genuine path rejection.
  • Keeps hot-path scans, path starts, and detours bounded and documented.

Validation

  • ./gradlew build
  • ./gradlew runGameTestServer, when relevant
  • Focused in-game testing, when relevant
  • Dedicated-server or multiplayer testing, when relevant

The full build passed after the final changes. Focused GameTests passed for target-range boundaries, threat retargeting, visible attack intent, faction/species assistance, Phantom behavior, Skeleton tactics, navigation recovery, Panda bamboo replacement, passive and wounded flight, Creeper/Cat reactions, water-safe routing, straight flee corridors, and active-path retention. Exact 50-mob Cow, Wolf, Salmon, and Cat benchmarks sustained 20 TPS across all 20 phases with a 6.472 ms/tick peak. Natural obstacles, crowds, circling attackers, multiplayer, dedicated servers, and existing worlds remain unverified and are documented as such.

AI assistance

  • I reviewed and understand all submitted changes, including AI-assisted output.

Codex materially assisted implementation, test creation, documentation, and repository validation under developer direction. Results were checked with the full Gradle build, focused GameTests, diff checks, and representative TPS selectors; subjective natural-gameplay approval remains with the developer.

Documentation and release notes

  • Updated CHANGELOG.md for player-facing or notable technical changes
  • Updated README or system documentation when behavior or architecture changed
  • Added or updated tests where practical

Updated the AI architecture, implementation status, risks, confirmed issues, testing strategy, compatibility notes, benchmark record, and handoff documentation. README did not require a change.

Visual evidence

Not applicable: this PR contains AI behavior, tests, tags, mixin hooks, and documentation, with no visual or asset changes.

Licensing

  • I have the right to contribute every included file.
  • Code and non-asset contributions are provided under LICENSE-CODE.md.
  • I discussed creative-asset contributions with the developer before including them.

No creative assets are included.

@xefensor
xefensor merged commit 26fbca8 into master Aug 30, 2026
2 checks passed
@xefensor
xefensor deleted the fix/ai-behavior-stability branch August 30, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant