Questions tagged [path-finding]

Pathfinding generally refers to the problem of finding the shortest route between two points, subject to any obstacles. Pathfinding has application in a wide range of areas including robotics and game development. Algorithms for pathfinding tend to be closely related to graph and tree search algorithms.

Pathfinding generally refers to the problem of finding the shortest route between two points, subject to any obstacles. Pathfinding has application in a wide range of areas including robotics and game development. Algorithms for pathfinding tend to be closely related to graph and tree search algorithms.

Significant Literature

External Links

Related Tags

1746 questions
5
votes
3 answers

Optimal algorithm for path-finding in a matrix that does not fit entirely into memory

I'm facing a hard problem: Imagine I have a map of an entire country, represented by a huge matrix of Cells. Each cell represents a 1 square meter of territory. Each Cell is represented as a double value between 0 and 1 that represents the cost of…
CatOsMandros
  • 343
  • 2
  • 12
5
votes
2 answers

java - Algorithm for generating random path in 2d char array

I'm trying to generate a random path from a point to another one in a 2 dimensional char array, but so it'd follow these rules: The only chars allowed are: O = Open path - = Accepts paths from it's left or from it's right | = Accepts paths from…
NonameSL
  • 1,405
  • 14
  • 27
5
votes
2 answers

Algorithm like Bellman-Ford, only for multiple start, single destination?

Algorithms like the Bellman-Ford algorithm and Dijkstra's algorithm exist to find the shortest path from a single starting vertex on a graph to every other vertex. However, in the program I'm writing, the starting vertex changes a lot more often…
flarn2006
  • 1,787
  • 15
  • 37
5
votes
3 answers

Understanding A* heuristics for single goal maze

I have a maze like the following: |||||||||||||||||||||||||||||||||||| | P| | ||||||||||||||||||||||| |||||||| | | || | | ||||||| || | | || | | | | |||| ||||||||| || ||||| | || | | | | || ||…
MrDuk
  • 16,578
  • 18
  • 74
  • 133
5
votes
6 answers

Algorithm for finding the best routes for food distribution in game

I'm designing a city building game and got into a problem. Imagine Sierra's Caesar III game mechanics: you have many city districts with one market each. There are several granaries over the distance connected with a directed weighted graph. The…
5
votes
2 answers

AI for enemy in SpriteKit

I have been making a game in sprite kit for some time now. I have added enemies and am wondering how I can control them around the map using AI(just like in any other game). What I want is for the enemy to wonder around the TMX map, turning corner…
user3038404
  • 331
  • 5
  • 14
5
votes
2 answers

Pathfinding algorithm for trains

I'm trying to find a solution for pathfinding in a trains game where there are different kinds of bifurcations. I want the train to go from one rail to another, everything is implemented except the pathfinding. I need to get a list of rails so the…
marcg11
  • 720
  • 2
  • 10
  • 20
5
votes
2 answers

Level solving and pathfinding

I have played a little flash game recently called Just A Trim Please and really liked the whole concept. The basic objective of the game is to mow the whole lawn by going over each square once. Your lawn mower starts on a tile and from there you can…
pbondoer
  • 538
  • 7
  • 15
5
votes
1 answer

A* Algorithm: closed list contains too many elements / too large

I'm currently implementing the A* algorithm in JavaScript. However, I've ran into a problem: My closedList seems way too large. Here is a screenshot of the output: What could cause this problem? Is my heuristic calculation…
dislick
  • 667
  • 1
  • 7
  • 25
5
votes
1 answer

Pathfinding with teleporters

I'm working on a project with a virtual robot (Turtles in the ComputerCraft mod for Minecraft), where the robot would be in a maze of tunnels and have to navigate around in them. The world is conveniently already divided into tiles (a 2D Cartesian…
Schilcote
  • 2,344
  • 1
  • 17
  • 35
5
votes
1 answer

Best way to create custom building's map for iOS

I see some ways to do it: 1) Draw using OpenGL programmatically. 2) Draw using QuartzCore and CoreAnimation programmatically. 3) Draw map in AutoCad and then somehow connect it to iOS. 4) Draw map using SVG. Requirments are supporting pathfinding…
Aft3rmath
  • 669
  • 2
  • 12
  • 21
5
votes
1 answer

QuickGraph - How can I make A* to skip particular edges?

I conduct a path finding library. QuickGraph, open graph library, fits all my requirements but I have met one problem. I need the shortest path algorithms to skip edges which are impassable by the current moving agent. What I want is something like…
PanCotzky
  • 564
  • 2
  • 5
  • 12
5
votes
2 answers

Efficient algorithm to find all paths between two nodes

I am working on a recursive DFS to retrieve all paths between two nodes in an undirected and unweighted graph for now. It takes the start and end node, and DFS on the node and its adjacent nodes recursively while saving the paths. I was wondering…
Fatima
  • 1,611
  • 6
  • 18
  • 21
5
votes
2 answers

How to handle Obstacles in A* Pathfinding to reach 'next best' goal?

I'm working on A* pathfinding for a grid based top-down game. The issue I've came across is probably easiest to understand in the image below. Asterisks are players/NPCs. The yellow asterisk is the current NPC that wants to path to the X. The red…
Mythics
  • 773
  • 1
  • 10
  • 19
5
votes
1 answer

A* Start path finding in HTML5 Canvas

I'm trying implement A* Start path finding in my games(which are written with JavaScript, HTML5 Canvas). Library for A* Start found this - http://46dogs.blogspot.com/2009/10/star-pathroute-finding-javascript-code.html and now I'm using this library…
gyhgowvi
  • 105
  • 7