← All insights

Game Design

Better Enemy AI Starts with Fair, Readable Decisions

Make enemies convincing through perception, intent, and counterplay—not hidden advantages.

By Vertex Arc3 min read
Better Enemy AI Starts with Fair, Readable Decisions: original conceptual diagram
Original Vertex Arc editorial illustration. Conceptual diagram, not a game screenshot.

An enemy does not need to make perfect decisions to create a good encounter. It needs to behave in ways players can interpret and respond to. An opponent that always knows the player's position may be effective at dealing damage, yet feel less intelligent than one that investigates a sound, searches a plausible area, and visibly commits to an attack.

Fairness comes from the relationship between what the enemy knows, what it communicates, and what the player can do about it. Start with those rules before choosing a behavior tree, state machine, or utility system. Architecture should support the intended behavior rather than dictate it.

Separate perception from decision-making

Give enemies an explicit model of awareness. They might see a player, hear a disturbance, or remember a last-known position. Each signal should have a lifetime and a meaning. Losing sight should not necessarily erase awareness immediately, but it should not grant indefinite tracking through walls either.

Visualize perception during development. Draw sight ranges, last-known positions, and current targets. When an enemy appears unfair, inspect what information reached it. This often exposes a missing occlusion check, stale target data, or an overly generous detection region more quickly than tweaking attack accuracy.

Communicate commitment

An attack should provide enough warning for the intended response. That warning might be a pose, sound, movement pattern, or environmental cue. Its duration depends on the camera, distance, speed, and difficulty. A warning that is visible in a close-up editor view may be unreadable during actual play.

After committing, decide how much the enemy can adjust. An attack that tracks the player perfectly until impact can make dodging feel meaningless. Locking direction earlier creates counterplay, but may make an enemy trivial if recovery is too long. Tune the entire exchange rather than changing only damage values.

Coordinate groups intentionally

Several individually fair enemies can produce an unfair crowd. Consider attack opportunities, positioning roles, and how many threats the player can reasonably read at once. A simple coordination system can reserve attack slots or stagger commitments without making every enemy stand still.

Enemies waiting for an opportunity can reposition, threaten a route, or react to nearby events. These behaviors maintain pressure without stacking unavoidable attacks. Test encounters from poor player positions as well as the ideal entry route; players rarely follow the exact path used during implementation.

Scale difficulty through decisions

Increasing health and damage changes the cost of mistakes, but does not necessarily make behavior more interesting. Other options include shorter recovery, better coordination, new attack combinations, or more persistent searching. Preserve the core rules so players can transfer what they learned.

  • Keep essential tells readable across difficulty settings.
  • Avoid spawning threats where the player cannot reasonably detect them.
  • Record why an enemy changed state when debugging.
  • Test navigation failures and unreachable targets.
  • Provide a fallback when an intended action cannot complete.

Evaluate the player's explanation

After a defeat, ask players what they think happened and what they would try differently. A useful answer indicates that the encounter communicated a learnable rule. “It hit me through the wall” or “there was no warning” points to a problem worth investigating, even if the code technically behaved as designed.

Convincing enemy AI creates understandable pressure. Give opponents limited information, visible intent, and reliable constraints. Players can then attribute success to their decisions and failure to something they can improve, which is a stronger foundation than an opponent that wins by knowing everything.

Share this insight

Your next chapter

BUILD WHAT
YOU IMAGINE.

Have a game idea? Vertex Arc can help turn it into a playable experience.