• BACKUP
  • VARIETY
  • DATA
  • HUMAN

How to find alternative movement routes with your AI

Connect your AI to the A* Pathfinder MCP to calculate multiple paths through a grid. It handles the math so you can focus on the simulation logic.

Ask AI about this page

Short answer

How can I get my AI to find more than one path on a grid?

Your AI uses the find_k_shortest_paths tool to identify several distinct routes between two points. This gives you a set of backup options or varied movement patterns instead of just one single line. You'll get a list of coordinates for each viable path.

Pathfinding outcomes

What you get from the AI

The AI processes your grid data and returns specific pathing outcomes.

BACKUP

Redundant routes

The AI identifies secondary paths if the primary route is blocked. This ensures your simulation doesn't stall when obstacles appear.

VARIETY

Diverse movement

Instead of every agent following the exact same line, you get different ways to traverse the same space. This makes crowd or traffic simulations look natural.

DATA

Coordinate lists

The AI returns a collection of specific grid coordinates for every path found. You can feed these directly into your simulation engine.

HUMAN

Manual path tuning

You decide which paths are actually usable based on the AI's output. The AI provides the math, but you choose the final movement logic.

The workflow

What your AI does when the grid data arrives.

The AI takes your grid constraints and calculates the math for multiple routes.

  1. Analyze the grid

    The AI reads your grid layout to understand where obstacles and walkable cells are located.

    find_k_shortest_paths
  2. Calculate paths

    The agent runs the pathfinding algorithm to find the most efficient routes between your start and end points.

    find_k_shortest_paths
  3. Rank alternatives

    The AI sorts the routes so you can see the shortest options first and the less efficient backups later.

    find_k_shortest_paths
  4. Format output

    The agent organizes the resulting coordinates into a clean list you can use in your project.

    find_k_shortest_paths

Try it

Copy these to start.

Use these prompts to kick off the pathfinding process.

Starting points

Swap out the grid descriptions and coordinate pairs with your actual simulation data.

A* Pathfinder Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_AG75gvuUMvODSgOAGPyVSWSujySFpUemL5hIOyAF/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — A* Pathfinder capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "a-pathfinder-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_AG75gvuUMvODSgOAGPyVSWSujySFpUemL5hIOyAF/mcp"
    }
  }
}
Copy into chat04
  • Find 3 different paths on this 10x10 grid from (0,0) to (9,9).

  • Using the current grid map, give me the two shortest routes that avoid the obstacle at (5,5).

  • Generate five alternative movement routes for an agent moving from the bottom-left to the top-right corner.

  • Look at the grid data I just uploaded and find the k-shortest paths between these two points.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect A* Pathfinder once, then ask.

Just click the link to connect the MCP to your client. Your credentials stay encrypted, and you can start asking for paths immediately.

Connect A* Pathfinder to your AI

FAQ

How this task behaves

  • 01

    Can the AI change the grid layout itself?

    No. The AI can only read the grid you provide and calculate paths based on that existing data.

  • 02

    How many paths can it find?

    It finds as many paths as you specifically request in your prompt using the k-shortest paths logic.

  • 03

    Will the AI move my agents for me?

    No. The AI provides the coordinate lists for the paths, but you are responsible for moving the agents in your simulation.

  • 04

    Does it work on non-grid maps?

    No. This specific tool is designed for grid-based movement.

  • 05

    Can it avoid specific cells?

    Yes, if you define those cells as obstacles in the grid data you provide.

  • More questions about A* Pathfinder? The Connector page answers them. See everything the A* Pathfinder Connector can do

Connect A* Pathfinder to Claude, Cursor, ChatGPT & more