Efficiently Finding the Shortest Path in Two Simultaneous Mazes with Shared Instructions

Joined
Mar 12, 2025
Messages
1
Reaction score
0

Question:​

I am working on a pathfinding problem where two agents must navigate separate mazes simultaneously using the same sequence of movement instructions. Each maze is an n × m grid, and both agents start at (0,0) and need to reach (n-1, m-1).

Rules:​

  • Each instruction (↑, ↓, ←, →) moves both agents.
  • If an agent encounters a wall, they stay in place while the other may continue.
  • If an agent reaches the goal, they stay there until the other arrives.
  • Some mazes contain pits: stepping into one resets the agent to (0,0).
The challenge is that both agents must follow the same instructions, which significantly limits their movement options. A brute-force search is infeasible for large n, m due to the exponential search space.

My Question:​

What are efficient strategies to compute the shortest possible sequence of instructions that gets both agents to the goal?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,297
Messages
2,571,536
Members
48,284
Latest member
alphabetsalphabets

Latest Threads

Top