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
6
votes
3 answers

A* manhattan distance

I searched for the algorithm/pseudocode of A* I followed it and coded it. I used Manhattan distance for h(n). ( f(n) = g(n) + h(n) ) And this is the result, (source: uploadir.com) This always happen when there are no walls blocking the way, but…
Zik
  • 1,556
  • 7
  • 22
  • 31
5
votes
3 answers

A* PathFinding Poor Performance

After debugging for a few hours, the algorithm seems to be working. Right now to check if it works i'm checking the end node position to the currentNode position when the while loop quits. So far the values look correct. The problem is, the farther…
RedShft
  • 374
  • 2
  • 12
5
votes
2 answers

Some questions with pacman path finding

I have learned about A*, BFS, DFS and can implement them pretty well. However, some problems arise when I try to do that in solving pacman path finding problem. Let's assuming there're only two types of mazes: one has full items, as in no blank…
IcySnow
  • 851
  • 2
  • 14
  • 23
5
votes
2 answers

Heuristic function for finding the path using A star

I am trying to find a optimal solution for the following problem The numbers denoted inside each node are represented as (x,y). The adjacent nodes to a node always have a y value that is (current nodes y value +1). There is a cost of 1 for a…
Vamsi
  • 4,237
  • 7
  • 49
  • 74
5
votes
2 answers

A.I. that can navigate a randomly generated 2D city

I'm writing an iOS game (Using UIView), which has a randomly generated 2D city. I need attacking A.I., that will take an intelligent path to find the player (without colliding with buildings). Can someone point me in the right direction as to what…
Sosumi
  • 759
  • 6
  • 20
5
votes
2 answers

Splitting up A* pathing of many units into seperate game frames

So my issues is that, for large groups of units, attempting to pathfind for all of them in the same frame is causing a pretty noticeable slow down. When pathing for 1 or 2 units the slow down is generally not noticeable but for many more than that,…
5
votes
1 answer

Algorithm(s) for finding moving entities in a maze

A have a maze and character that's controlled by the player and a drone who has to find him (by itself). Does anyone know an (efficient) AI algorithm for doing something like this? P.S. I know there are several path finding algorithms(e.g. A*), but…
conectionist
  • 2,694
  • 6
  • 28
  • 50
5
votes
3 answers

Is there a difference between "Path planning" and "Pathfinding"?

Doing some reseach about ("pathfinding"|"path planning") I've found many algorithm all basicly doing the same thing (finding a way from point A to point B with more or less constraints), and I couln't found any difference between pathfinding and…
Drahakar
  • 5,986
  • 6
  • 43
  • 58
5
votes
0 answers

Unity3D NavMesh: shortest path to an area

Consider the following situation. There is a predefined area inside NavMesh that AI agent must reach. For convenience - it is circular area. To find the closest point of the area is pretty straightforward task. No, I need to find the shortest path…
Xamtos
  • 173
  • 9
5
votes
1 answer

Best algorithm for maze solving?

I recently made a project to solve a given maze using different pathfinding algorithms. I did this by importing a black and white maze image, and making each junction a node. I tried solving this using DFS, BFS, Dijkstra and A*, but noticed that…
Sam
  • 289
  • 3
  • 11
5
votes
2 answers

Approaches to a Dynamic Pathfinding Algorithm

My A* implementation works well for my static environment. If I would now like to work with a dynamic environment, i.e. certain costs between my nodes change while we are traversing from the start to the finish. From my reading so far I have found…
AntonD
  • 51
  • 1
  • 2
5
votes
5 answers

Using A* and still avoiding collisions?

I am designing a tower-defense game, and for that I am using the A* pathfinding algorithm to reach my destination from my spawn-areas. The problem here is that all the units stack, which doesn't look visually good. Is there a way I can make them…
Mathias Lykkegaard Lorenzen
  • 15,031
  • 23
  • 100
  • 187
5
votes
2 answers

Unable to implement A Star in java

I've been trying all day to get this algorithm up and running, but I cant for the life of me. I've read many tutorials on the net, and source code in AS3, javascript, and C++; but I cannot adapt what I am seeing to my own code. I have created an…
abc123
  • 51
  • 1
  • 1
  • 3
5
votes
1 answer

How to implement the shortest path algorithm in this scenario?

In my assignment I have a MxN grid e.g. M = 5, N = 8 KKKK.... .###...X .XX#...X ...#.... ........ K - start point, X - finish point, # - obstacle I need to find the smallest number of moves to carry packages from start points to finish points. We…
MarJan
  • 51
  • 4
5
votes
0 answers

A* search algorithm in PHP

Does anyone have an implementation of the A* algorithm in PHP? I know that wikipedia has a pseudocode and a link to a C++ one, but I can't seem to find one already written in PHP. I am also looking for an efficient written A* algorithm
aherlambang
  • 14,290
  • 50
  • 150
  • 253