path-finding

Does anyone know where I can find a simple version of the A* algorithm in php?

Or version in a similar language. One that's for all types of maps not just 2d. ...

Number of simple mutations to change one string to another?

Hi; I'm sure you've all heard of the "Word game", where you try to change one word to another by changing one letter at a time, and only going through valid English words. I'm trying to implement an A* Algorithm to solve it (just to flesh out my understanding of A*) and one of the things that is needed is a minimum-distance heuristic. ...

A* algorithm works OK, but not perfectly. What's wrong?

This is my grid of nodes: I'm moving an object around on it using the A* pathfinding algorithm. It generally works OK, but it sometimes acts wrongly: When moving from 3 to 1, it correctly goes via 2. When going from 1 to 3 however, it goes via 4. When moving between 3 and 5, it goes via 4 in either direction instead of the shorter w...

Need simple advice for graph solving problem

Hi there, a collegue of mine proposed to me an exercise from an online judge website, which is basically a graph solving problem of an evacuation plan on a small town. i dont need the answer (nor do i want it) i just need an advice on which is the best approach to solving it since im kinda new to these kind of problems. the problem co...

Where can I find information on the D* or D* Lite pathfinding algorithm?

There are links to some papers on D* here, but they're a bit too mathematical for me. Is there any information on D*/D* Lite more geared towards beginners? ...

Fast path cache generation for a connected node graph

I'm trying to get a faster pathfinding mechanism in place in a game I'm working on for a connected node graph. The nodes are classed into two types, "Networks" and "Routers." In this picture, the blue circles represent routers and the grey rectangles networks. Each network keeps a list of which routers it is connected to, and vice-ve...

What is a good quick pathfinding algorithm?

What is a good path finding algorithm when you care the amount of time it takes but not how long the path is. Also is there a faster algorithm if you don't care about the path at all but just want to check reachability. (Is Flood Fill a good algorithm for this sort of stuff?) ...

Pathfinding Algorithm For 2 Pacmans

I'm trying to implement Pacman. It works fine, but so far, the ghosts aren't using any pathfinding, but instead just decide randomly on each path junction which path to take. So you can imagine that it isn't really difficult for Pacman to win the game ;) So I read a little bit about path finding algorithms in Pacman and here on SO I fou...

My pathfinder has problems finding the shortest path.

Hi, I'm having problems with a pathfinder (it's my first, so that was to be expected) : it doesn't always take the shortest way. For example, if I want to go one square down, the path will be : one square left, one down, one right. public void getSquares(){ actPath = new String[Map.x][Map.y]; isDone = new boolean[Map.x][...

Pathfinding in 2D Arrays

Let's say I have this 2D Array map { 0,0,0,0,7,1,1,1,1,1,1,1,1 }, { 0,7,7,7,7,1,1,1,24,1,1,1,1 }, { 0,7,24,24,24,24,24,24,24,1,1,3,1 }, { 0,7,23,23,23,23,23,23,24,1,1,3,1 }, { 0,7,24,23,23,23,23,23,23,1,1,1,1 }, { 0,7,24,23,23,23,23,23,23,1,1,1,1 }, { 0,7,23,23,23,23,23,23,24,1,3,1,1 }, { 0,7,24,24,24,24,24,24,24,1,3,1,1 }, { 0,0,0,0,1,...

PacMan character AI suggestions for optimal next direction

Firstly, this is AI for PacMan and not the ghosts. I am writing an Android live wallpaper which plays PacMan around your icons. While it supports user suggestions via screen touches, the majority of the game will be played by an AI. I am 99% done with all of the programming for the game but the AI for PacMan himself is still extremely w...

A* implemented in C

Where can I find an A* implementation in C? I was looking around but it seems my google-fu is not strong enough. I've started writing my own implementation, but then I remembered Stack Overflow and I thought I should ask here first. It seems a bit complicated to write a real A* implementation - I was tempted to just write an implementat...

1D path finding with 'teleporters'

Problem I want ot write a simple 1D RTS game and have the following path finding problem: There are many one-dimensional lines and everywhere are teleporters which can be used to travel between the lines but also to travel inside the current line. The teleporters are the only way to travle between lines. What algorithm or pseudo code ca...

Bezier curves algorithm - maybe Canonical Splines?

I've got a path that is made up of multiple points - i.e. 0,0 0,50 50,50 70,20 If I just draw this line on the screen it looks quite harsh as it puts a sharp angle at the joining of each point. Hence I was wondering what the bezier curves algorithm/method would look like which I could call that automatically change the sharp angles ...

Bot following a grid in reverse order

I am supposed to write a program in C only. It's code for a grid follower. I have defined a co-ordinate system of the grid (0-5,0-5). Also the bot orientations (+y,-y,+x,-x) and positions are defined. (I would welcome tips on how to write good code for this.) Now as my bot moves through the grid and goes to some coordinate (x,y) in the...

Fastest-path algorithm

Hi, I'm currently implementing a navigation system for routing through Europe. So far, I have shortest path implemented (Dijkstra and A*). It was the easy part, now I need some algorithm for fastest path. It has to be fast and reliable. I know it can be done just by assigning values to a road quality (for example 1 highway, 2 main roa...

Finding Paths between a Series of Points

For use in a simple project of mine, I've hit a bit of a blockade. I have a series of points in a grid, "walls" and "open space." Space outside the grid is assumed to be walls. I have an arbitrary number of points in this grid which are open, and I must determine if which ones are connected will change if I make one specific block in ...

Path finding in a multidimensional array

I sort of understand the concept of pathfinding and how a program looks for point B from point A in the most efficient manner and vaguely familiar with the concept of A*. But what if, instead of trying to find a way through the maze, you're trying to find the longest corridor in closed off maze where the corridor can not be on a diagonal...

wcf and pathfinding

Generally I would never expect to see those 2 words together in the same sentenc, however im working on a project that requires me to do simple pathfinding on multiple roads and I'm just trying to work out the best way to do it. I was originally thinking of having a few wcf services that could accept an origin and destinations do the wo...

How to use the A* path finding algorithm on a grid less 2D plane?

How can I implement the A* algorithm on a gridless 2D plane with no nodes or cells? I need the object to maneuver around a relatively high number of static and moving obstacles in the way of the goal. My current implementation is to create eight points around the object and treat them as the centers of imaginary adjacent squares that mig...