Monster AI Rules for Solo DnD Encounters (Updated for 2023)

In this guide, you will learn a set of monster AI rules for solo DnD encounters. The core idea is simple: the monster uses a simple priority system to choose an appropriate action and the right target. Once the enemy ability and target have been selected, combat resolves as per D&D rules. When I designed this system, I looked at three board games for inspiration: Gloomhaven, Middara, and Dungeon of the Mad Mage. I adjusted their AI rules so that you can use them with D&D 5e.

Monster AI action priorities

During the monster’s turn, the monster prioritizes its actions from highest to lowest as follows:

  1. Making saving throws and removing conditions.
  2. Lair actions (if within a lair).
  3. Defensive spells on self (if needed), followed by offensive spells against enemies.
  4. Special abilities such as summonings, eye beams, and other special attacks.
  5. Ranged weapon attacks until the enemy enters melee range.
  6. Melee attacks until the opponent leaves melee range.

When it’s an opponent’s turn, the monster prioritizes:

  • Legendary actions, followed by reactions.

Monster AI rules during combat

  1. When it’s the monster’s turn, it targets the PC party member closest to it. If there are two or more targets within the same distance, choose the one with the highest initiative.
  2. Choose an attack based on the actions available to the monster and which of its actions have the highest priority. If there there are two or more actions with the same priority, choose one at random.
  3. Move the monster towards the target until it’s within the range of the attack.
  4. Roll the appropriate dice for the attack.

Choosing attacks and targets randomly with dice rolls

A player can randomly select a monster attack by assigning a number to each action and rolling the appropriately numbered die. Standard dice are the typical d4, d6, d8, d10, d12, and d20. However, to select a random attack or target, you can use dice that also cover other numbers such as d2, d3, and d5.

These are non-standard dice that use a pre-existing die, but with a simple formula. To roll 1d2, roll a d4, divide the result by 2, and round it up. To roll 1d3 and 1d5 you use the same formula but use a d6 and d10 respectively.

Important Monster AI rules

  • Monsters always target the closest opponent. If a monster has more than one target, it will prioritize the opponent with the highest initiative.
  • Monsters do not attack invisible or stealthed characters if they’re successfully hidden.
  • Monsters stop attacking characters that have been reduced to 0 health points.
  • If a monster needs to make a saving throw, break a spell effect, or remove a condition, it will prioritize it first before everything else.
  • Monsters will always try to establish a line of sight when making a ranged attack against an opponent.
  • Monsters with ranged attacks move until an opponent is within the range of their attack. If the opponent is already within range, discard any movement actions unless the attack requires line of sight.
  • Monsters with ranged attacks will attempt to hide behind the closest terrain feature that provides cover after completing their actions.
  • Monsters always seek to avoid visible traps and dangerous terrain. They will move around such threats during combat.