跳到正文
Skillpedia
网站与界面(前端)7.2k · #13369

tune-enemy-ai

它能做什么

这个技能指导 AI 智能体设计 3D 或网页动作游戏中敌人的思考和行动方式。适合希望敌人感觉公平、并且易于测试的开发者。

适用场景

  • ✓敌人追击太久、攻击不公平或卡住的时候。
  • ✓你要为一个有多个阶段和行为的 Boss 添加 AI 的时候。
  • ✓你想要可重复的 AI 测试来检查敌人的选择的时候。

技能链接

https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/tune-enemy-ai/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/tune-enemy-ai/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的敌人总是卡在墙后面。请帮我修复它们的追击和攻击行为。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会把敌人行为描述为有名称的状态,例如追击、重新定位和攻击。它会为状态切换设定清晰的规则,在攻击前添加预警,并为每个决策编写测试。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Tune Enemy AI

Make enemy choices legible, bounded, and reproducible.

Model decisions explicitly

Use a small state machine or utility layer with named states such as idle, investigate, pursue, reposition, windup, attack, recover, stagger, retreat, and defeated. State transitions must state their prerequisites, exit conditions, minimum dwell time, and cooldown effects.

Separate perception, intent, and motion

  1. Gather observable inputs: distance, line of sight, target state, occupancy, threat, health, and timers.
  2. Select one intention from constrained legal actions.
  3. Move and animate toward that intent without rewriting the decision mid-action.

Use authoritative collision and navigation results for movement success. Do not derive them from rendered pose or assumed path completion.

Preserve fair combat

Telegraph attacks before their active window. Prevent instant turn-and-hit behavior, perpetual chase, clipped attacks through blockers, and repeated recovery spam. Add spacing and commitment so the player can read and answer each enemy archetype.

Test the decision surface

Create deterministic fixtures for target acquisition, target loss, obstruction, path failure, close-range pressure, multiple enemies, retaliation, interrupt, stagger, boss phase, and reset. Assert transitions and outcomes, not only final positions. Run a real browser encounter after automated tests.

常见问题

什么是行为状态机?

它是一份简单的有名称状态列表,例如待机、追击或撤退,并带有状态之间切换的明确规则。

技能只测试位置吗?

不是。它检查的是决策和结果,而不只是敌人最终所在的位置。

敌人对玩家仍然公平吗?

技能说明,攻击应在落下前就显示出来,敌人不应瞬间转身并命中。

详情

作者的原始描述

Build, debug, balance, or test combat enemy AI for playable action games. Use for aggro, target selection, navigation, spacing, attack choices, telegraphs, retreats, boss behavior, behavior-state machines, and deterministic AI regression tests.

repo: MengTo/Skills

热度

GitHub 星标
7.2k
排名
#13369
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能