Inferensys

Glossary

Multi-Value Decision Diagram (MDD)

A Multi-Value Decision Diagram (MDD) is a compact, directed acyclic graph data structure that encodes all possible optimal paths for a single agent from its start to its goal location within a specified cost bound.
Developer reviewing multi-agent chat interface on laptop, agent conversation logs visible, casual coding session at WeWork desk.
MULTI-AGENT PATH PLANNING

What is Multi-Value Decision Diagram (MDD)?

A Multi-Value Decision Diagram (MDD) is a compact, directed acyclic graph data structure used in Multi-Agent Path Finding (MAPF) to encode all possible optimal paths for a single agent from its start to its goal within a specific cost bound.

An MDD is constructed for a single agent by performing a breadth-first search from the start node to the goal node, pruning any branches that exceed the optimal path length (cost). Each layer of the MDD corresponds to a discrete time step, and nodes within a layer represent all possible locations the agent could occupy at that time while staying on an optimal path. This compressed representation is fundamental to algorithms like Conflict-Based Search (CBS) and Increasing Cost Tree Search (ICTS), where it enables efficient conflict detection and pruning of the joint search space.

The primary utility of an MDD lies in its ability to abstract away the multitude of equivalent optimal paths. When coordinating multiple agents, planners can query MDDs to quickly identify space-time conflicts, such as vertex conflicts (two agents occupying the same location simultaneously) or edge conflicts (swapping positions). By comparing the structure of MDDs, algorithms can determine if agents' optimal paths are inherently incompatible, guiding the search for constraints or alternative cost allocations to resolve deadlocks and find a globally optimal, collision-free plan for the entire fleet.

DATA STRUCTURE

Key Properties of an MDD

A Multi-Value Decision Diagram (MDD) is a compact, directed acyclic graph that encodes all possible optimal paths for a single agent within a given cost bound. Its structure is fundamental for efficient multi-agent coordination.

01

Compact Path Encoding

An MDD compresses the exponential number of possible optimal paths into a directed acyclic graph (DAG). Each node represents a specific location at a specific time step (depth). Edges represent valid moves between locations in consecutive time steps.

  • Eliminates Redundancy: Identical path segments from different full paths are merged into a single subgraph.
  • Guarantees Optimality: By construction, every root-to-leaf path in the MDD corresponds to a distinct path for the agent that meets the exact cost bound (e.g., shortest path length).
02

Layered Temporal Structure

The MDD is organized into layers, where each layer corresponds to a discrete time step from the start (t=0) to the goal at the maximum cost bound (t=C).

  • Layer 0: Contains only the start node.
  • Layer C: Contains only the goal node.
  • Intermediate Layers (1 to C-1): Contain all locations the agent can occupy at that exact time while still reaching the goal on time.

This structure allows algorithms to reason about space-time conflicts efficiently by checking for node collisions within the same layer.

03

Core Construction via BFS

An MDD for cost C is built using a two-pass breadth-first search (BFS) process on the agent's graph (e.g., a 4-connected grid).

  1. Forward Pass (BFS from Start): Calculates the minimum distance g(start, v) from the start to every node v.
  2. Backward Pass (BFS from Goal): Calculates the minimum distance h(v, goal) from every node v to the goal.
  3. Node Inclusion Rule: A node v is included in the MDD at layer t if and only if g(start, v) <= t and g(start, v) + h(v, goal) == C. This ensures every included node lies on some optimal path.

Edges are added between nodes in consecutive layers if they are connected in the underlying graph.

04

Conflict Detection Primitive

The primary use of MDDs in algorithms like Conflict-Based Search (CBS) is for fast, pairwise conflict detection. Given MDDs for two agents, a conflict exists if:

  • Vertex Conflict: The same node appears in both MDDs at the same layer (time step).
  • Edge Conflict: An edge (u,v) at layer t in one MDD appears as the reverse edge (v,u) at the same layer t in the other MDD.

Checking for conflicts becomes a linear-time merge operation over the layered structures, far more efficient than comparing lists of individual paths.

05

Constraint Propagation

When a conflict is found, CBS imposes a constraint (e.g., "Agent 1 cannot be at node X at time t") and the affected agent's MDD must be rebuilt. The MDD structure allows for efficient filtering.

  • The constrained node is removed from the corresponding layer.
  • A pruning pass then removes any nodes (and connected edges) that no longer have a valid connection from the start layer to the goal layer through the remaining graph.
  • If pruning removes all nodes from a layer, the MDD becomes empty, proving no solution exists for the agent under the current constraints.
06

Dimensionality & Scalability

The size and complexity of an MDD are determined by the cost bound C and the branching factor of the environment.

  • Width: The maximum number of nodes in any single layer. In open spaces, this can be large.
  • Depth: Equal to the cost bound C + 1.
  • Memory Footprint: Typically O(b * C), where b is the average width, which is vastly smaller than the O(b^C) number of full paths it represents.

For very large C or dense graphs, pruned MDDs or partial MDDs that only compute layers up to a planning horizon are used to maintain tractability.

COMPARATIVE ANALYSIS

MDD vs. Related Data Structures

This table compares the Multi-Value Decision Diagram (MDD) to other key data structures used in Multi-Agent Path Finding (MAPF) and motion planning, highlighting their distinct purposes, encodings, and computational trade-offs.

FeatureMulti-Value Decision Diagram (MDD)Conflict Avoidance Table (CAT)Time-Expanded Graph (TEG)State Lattice

Primary Purpose

Encodes all optimal paths for a single agent within a cost bound.

Stores space-time reservations for all agents to detect conflicts.

Models dynamic environments as a static graph for temporal planning.

Models feasible kinematic states and motion primitives for a physical agent.

Dimensionality Encoded

Space and time (implicitly via depth).

Space, time, and agent ID.

Space and time (explicit).

State space (pose, velocity) and control inputs.

Information Represented

Set of possible agent positions per timestep.

Which agent occupies which (location, time) cell.

Connectivity of locations across discrete time steps.

Reachable kinematic states and transitions between them.

Construction Complexity

O(b^d) for branching factor b and depth d (optimal cost).

O(n * L) for n agents with max path length L.

O(|V| * T) for |V| vertices over T timesteps.

Defined by discretization of state and action spaces.

Query Efficiency

Fast validation of a position at a timestep (O(d)).

Fast conflict detection for a candidate move (O(1)).

Path search via standard graph algorithms (e.g., A*).

Path search via graph algorithms, respecting dynamics.

Used in MAPF Algorithms

CBS, ICTS for individual agent planning.

CBS, WHCA* for constraint/conflict management.

Centralized optimal solvers (e.g., M* in TEG).

Kinodynamic planners for individual robots.

Handles Kinematic Constraints

Optimizes for Agent Cost

Scalability for Many Agents

Per-agent structure; scales well.

Global structure; can become large.

Graph size grows linearly with agents & time.

Per-agent structure; complex for high-D state spaces.

MULTI-VALUE DECISION DIAGRAM

Frequently Asked Questions

A Multi-Value Decision Diagram (MDD) is a foundational data structure in optimal Multi-Agent Path Finding (MAPF). It compactly encodes all possible shortest paths for a single agent, enabling efficient conflict detection and resolution in fleet coordination.

A Multi-Value Decision Diagram (MDD) is a directed, acyclic graph that compactly represents all possible paths a single agent can take from its start location to its goal location within a specific, optimal cost bound (e.g., the shortest path length).

How it works:

  • Each layer of the MDD corresponds to a time step from t=0 (start) to t=C (goal cost).
  • Each node within a layer represents a location the agent can occupy at that specific time while still reaching the goal on time.
  • Edges connect nodes between consecutive layers, representing a feasible move (wait or traverse) that keeps the agent on a shortest path.

For example, if an agent's shortest path length is 5, its MDD will have 6 layers (0 to 5) and will contain every location sequence the agent could follow to reach its goal in exactly 5 steps. This structure eliminates all longer, suboptimal paths, focusing the search for multi-agent coordination on the space of optimal individual plans.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.