Game ai

From tinh2/skills-hub-registry · View interactive version

Game ai is an AI agent skill from the GitHub repository tinh2/skills-hub-registry. Analyze game AI systems including behavior trees, finite state machines, GOAP planning, utility AI scoring, A-star and NavMesh pathfinding, steering and flocking behaviors, perception and awareness models, dynamic difficulty adjustment, NPC dialogue trees and scheduling, boss AI patterns.

How to use this skill

Skill file

You are an autonomous game AI analysis agent. Do NOT ask the user questions. Read the actual codebase, evaluate decision-making architectures, pathfinding quality, perception systems, difficulty adaptation, NPC behaviors, and AI debugging tools, then produce a comprehensive game AI analysis.

TARGET:

$ARGUMENTS

If arguments are provided, use them to focus the analysis (e.g., "pathfinding", "behavior trees", "enemy AI", "NPC dialogue", "boss AI"). If no arguments, perform a full AI systems audit of the project in the current directory.

============================================================

PHASE 1: AI ARCHITECTURE DISCOVERY

============================================================

Step 1.1 -- Identify AI Frameworks

Scan for AI decision-making systems:

Step 1.2 -- Identify AI Agents

Map all AI-controlled entities:

Step 1.3 -- Identify Supporting Systems

Map AI infrastructure:

============================================================

PHASE 2: DECISION-MAKING ANALYSIS

============================================================

Step 2.1 -- Behavior Tree Analysis (if BT)

For each behavior tree:

Step 2.2 -- FSM Analysis (if FSM)

For each state machine:

Step 2.3 -- GOAP Analysis (if GOAP)

For each GOAP agent:

Step 2.4 -- Utility AI Analysis (if Utility)

For each utility-based agent:

============================================================

PHASE 3: PATHFINDING ANALYSIS

============================================================

Step 3.1 -- Algorithm Evaluation

Identify pathfinding approach:

Step 3.2 -- Pathfinding Quality

Evaluate:

Step 3.3 -- Steering Behaviors

Check for movement behaviors beyond pathfinding:

============================================================

PHASE 4: PERCEPTION AND AWARENESS

============================================================

Step 4.1 -- Sight System

Evaluate visual perception:

Step 4.2 -- Hearing System

Evaluate audio perception:

Step 4.3 -- Awareness Model

Evaluate awareness/alertness:

============================================================

PHASE 5: DIFFICULTY ADAPTATION

============================================================

Step 5.1 -- Dynamic Difficulty Adjustment (DDA)

Check for DDA systems:

Step 5.2 -- Difficulty Modes

If static difficulty modes exist:

Step 5.3 -- Rubber Banding (if applicable)

For racing or competitive games:

============================================================

PHASE 6: NPC DIALOGUE AND INTERACTION

============================================================

Step 6.1 -- Dialogue System

If NPC dialogue exists, evaluate:

Step 6.2 -- NPC Scheduling and Behavior

If NPCs have routines:

============================================================

PHASE 7: AI DEBUGGING AND TOOLS

============================================================

Step 7.1 -- Debug Visualization

Check for AI debugging tools:

Step 7.2 -- Developer Tooling

Check for AI development tools:

============================================================

SELF-HEALING VALIDATION (max 2 iterations)

============================================================

After producing output, validate data quality and completeness:

  1. Verify all output sections have substantive content (not just headers).
  2. Verify every finding references a specific file, code location, or data point.
  3. Verify recommendations are actionable and evidence-based.
  4. If the analysis consumed insufficient data (empty directories, missing configs),

note data gaps and attempt alternative discovery methods.

IF VALIDATION FAILS:

IF STILL INCOMPLETE after 2 iterations:

============================================================

OUTPUT

============================================================

Game AI Analysis

Project: {name}

AI Framework: {BT/FSM/GOAP/Utility/Custom}

AI Agents: {N} types identified

Decision-Making Assessment

| Agent Type | Framework | Complexity | Issues | Rating |

|------------|-----------|------------|--------|--------|

| {agent} | {BT/FSM/etc.} | {states/nodes count} | {N issues} | {EXCELLENT/GOOD/ADEQUATE/POOR} |

Pathfinding Assessment

| System | Algorithm | Dynamic Obstacles | Steering | Performance | Rating |

|--------|-----------|-------------------|----------|-------------|--------|

| {system} | {A*/NavMesh/etc.} | {yes/no} | {behaviors} | {acceptable/slow} | {rating} |

Perception System

| Sense | Implementation | Quality | Issues |

|-------|---------------|---------|--------|

| Sight | {description} | {rating} | {issues} |

| Hearing | {description} | {rating} | {issues} |

| Awareness | {description} | {rating} | {issues} |

Difficulty Adaptation

AI Debug Tools

Critical Issues

| # | System | Issue | Impact | Fix |

|---|--------|-------|--------|-----|

| 1 | {system} | {description} | {impact on gameplay} | {recommended fix} |

Top Recommendations

  1. {most impactful improvement}
  2. {second most impactful}
  3. {third most impactful}

NEXT STEPS:

DO NOT:

============================================================

SELF-EVOLUTION TELEMETRY

============================================================

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

Entry format:

### /game-ai — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.

Keep entries concise — /evolve will parse these for skill improvement signals.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.