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.
Glossary
Multi-Value Decision Diagram (MDD)

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.
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.
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.
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).
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.
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).
- Forward Pass (BFS from Start): Calculates the minimum distance
g(start, v)from the start to every nodev. - Backward Pass (BFS from Goal): Calculates the minimum distance
h(v, goal)from every nodevto the goal. - Node Inclusion Rule: A node
vis included in the MDD at layertif and only ifg(start, v) <= tandg(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.
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 layertin one MDD appears as the reverse edge(v,u)at the same layertin 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.
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.
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), wherebis the average width, which is vastly smaller than theO(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.
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.
| Feature | Multi-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. |
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) tot=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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Multi-Value Decision Diagrams (MDDs) are a foundational data structure in optimal Multi-Agent Path Finding. The following concepts are essential for understanding their role and application within the broader MAPF algorithmic landscape.
Conflict-Based Search (CBS)
Conflict-Based Search is a two-level optimal MAPF algorithm that uses MDDs as a core component. At the high level, it searches a constraint tree, resolving conflicts (e.g., vertex or edge conflicts) between agents. For each node in this tree, the low level uses an MDD to replan an optimal path for a single agent that respects the imposed constraints. The algorithm's efficiency heavily relies on the compact representation of all optimal paths provided by the MDD for fast constraint validation and cost bounding.
Sum of Costs (SOC)
Sum of Costs is the primary optimality criterion for many MAPF problems, defined as the sum of the path lengths (or travel times) for all individual agents from their start to goal locations. An MDD is constructed for a specific cost bound, which is typically the optimal SOC for that agent alone or a value derived from the global solution cost. The MDD explicitly encodes all paths for that agent that meet this exact cost, making it the perfect tool for algorithms like CBS that need to explore alternative optimal paths during conflict resolution.
Conflict Avoidance Table (CAT)
A Conflict Avoidance Table is a complementary data structure to an MDD in many MAPF solvers. While an MDD encodes the possible paths for one agent, a CAT aggregates the planned space-time reservations for all other agents. During path planning or validation for a single agent (e.g., using its MDD), the algorithm queries the CAT to check for conflicts. The combination allows for efficient multi-agent reasoning: the MDD provides the candidate paths, and the CAT provides the environment of moving obstacles to avoid.
Increasing Cost Tree Search (ICTS)
Increasing Cost Tree Search is another optimal MAPF algorithm that leverages the concept behind MDDs. Instead of building explicit MDDs, ICTS searches a tree of possible cost combinations for all agents. For each cost combination, it must verify if a feasible set of paths exists. This verification step often conceptually uses an MDD-like reasoning: for each agent, given its individual cost from the combination, does a path exist? MDDs provide a formal and efficient way to answer this 'path existence' query, which is central to the ICTS paradigm.
Bounded Suboptimal Search
Bounded Suboptimal Search refers to MAPF algorithms that trade optimality for speed, guaranteeing a solution cost no worse than a factor (e.g., 1.2) of the optimal cost. MDDs can be adapted for these algorithms by constructing them for a suboptimal cost bound (optimal cost * suboptimality factor). This expanded MDD contains many more paths, giving the low-level planner more flexibility to avoid conflicts quickly. Techniques like Enhanced CBS use this approach to find faster, near-optimal solutions.
Time-Expanded Graph
A Time-Expanded Graph is a direct alternative modeling approach to using MDDs for temporal planning. It explicitly duplicates the spatial graph for each timestep, turning a dynamic problem into a static one. An MDD can be seen as a highly compressed, lossless representation of the relevant portion of a time-expanded graph for a single agent and a fixed cost. While a full time-expanded graph can be prohibitively large, an MDD extracts only the nodes and edges that lie on some optimal path, offering massive efficiency gains for optimal search algorithms.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us