Course Content
Agentic AI Patterns
9 sections · 50 lessons
How can Agentic AI improve the gaming industry (NPCs, procedural generation, QA automation)?
What you need to know
Three uses
| Use | What the agent does | Main constraint |
|---|---|---|
| NPCs | Holds goals and memory, chooses dialogue and actions | Latency, cost per player-hour, brand safety |
| Procedural generation | Creates quests, lore, items, levels from a spec | Consistency and playability |
| QA automation | Plays the build, explores, files bugs | Coverage and reproducibility |
Why QA is the most mature
A crash, a soft-lock (the player cannot progress) or a physics glitch is a clear, checkable failure. The agent gets a hard success signal, which is exactly what makes agents work. It can run thousands of sessions overnight and attach a save state and exact input sequence to each bug.
Constraints for player-facing agents
- Latency. A 3-second pause in a conversation breaks immersion. Precompute where you can, use small on-device or edge models, and stream.
- Cost. Players are an unbounded traffic source. Cap model calls per player-hour and fall back to scripted lines.
- Safety and lore. A character saying something offensive or breaking the story is a public incident. Use constrained output, topic filters, and canned fallbacks.
Procedural generation with a validator
Generate from a spec, then validate: can the quest be completed with items that exist? Does the lore contradict the story bible? Is the difficulty within the target range? Only validated content ships.
A real-life example
A mobile cricket game studio in Bengaluru ships a new tournament mode every month.
- QA agents: before each release, 500 agent sessions play the new mode overnight on emulators. They choose varied strategies, such as always sweeping or declaring early, and check invariants: the score matches ball events, the match always ends, the UI never locks. One release, an agent found that declaring an innings during a rain delay soft-locked the match. The bug report included the save state and the 14 inputs to reproduce it. Human testers had missed it in two weeks of testing.
- Commentary lines: generated offline from a spec (player names, match situation, tone), filtered for safety and repetition, and stored as a large pool. At runtime, the game picks lines by situation; no model call happens during a match, so latency is zero and cost is fixed.
- NPC coach: a small model gives tips between matches, with strict topic limits and a 1-second timeout that falls back to a scripted tip.
Follow-up questions to expect
- "Would you put a large model in every NPC?" — Rarely. Cost and latency scale with players. Use small constrained models, precomputed content, and large models offline.
- "How do you make agent-found bugs reproducible?" — Log seeds, save states and exact input sequences, and replay them in a deterministic build.
- "How do you keep generated lore consistent?" — Retrieve from a story bible and validate new content against it before release.