I'm trying to build an A* solver for a 15-square puzzle.
The goal is to re-arrange the tiles so that they appear in their natural positions. You can only slide one tile at a time. Each possible state of the puzzle is a node in the search graph.
For the h(x) function, I am using an aggregate sum, across all tiles, of the tile's dis...
I have a couple of questions about searching in graphs/trees:
Let's assume I have an empty chess board and I want to move a pawn around from point A to B.
A. When using depth first search or breadth first search must we use open and closed lists ? This is, a list that has all the elements to check, and other with all other elements tha...
With so many implementations available, what is the fastest executing (least CPU intensive, smallest binary), cross-platform (Linux, Mac, Windows, iPhone) A* implementation for C++ using a small grid?
Implementations
Google returns:
http://www.heyes-jones.com/astar.html (Most links on that site are dead.)
http://www.grinninglizard.co...
Hi,
I have some time occupying myself with motion planning for robots, and have for some time wanted to explore the possibility of improving the opportunities as "potential field" method offers. My challenge is to avoid that the robot gets trapped in "local minimum" when using the "potential field" method. Instead of using a "random wal...
Hello.
To an intership, I have use the A* algorithm in the following case :
the unit shape is a square of height and width of 1,
we can travel from a zone represented by a rectangle from another, but we can't travel outside these predifined areas,
we can go from a rectangle to another through a door, represented by a segment on corres...
I'm trying to create a method (using the A* algorithm) that solves a puzzle and returns the steps to that solution. The solution it's easy.. but I can't return the path to that.
I used a list of Nodes and then every time a push back a new Node I set the parent pointing to the Node which new came;
list<Node> opened;
list<Node> closed;
...
I traverse a 16x16 maze using my own A* implementation.
All is well. However, after the traversal, I would like to find out what wall would give me the best alternative path. Apart from removing every block and re-running A* on the maze, what's a more clever and elegant solution?
I was thinking give every wall node (ignored by A*), a t...
If a game map is partitioned into subgraphs, how to minimize edges between subgraphs?
I have a problem, Im trying to make A* searches through a grid based game like pacman or sokoban, but i need to find "enclosures". What do i mean by enclosures? subgraphs with as few cut edges as possible given a maximum size and minimum size for numbe...
Hi all,
For the classic water jugs search problem, even for more than three jugs, which are some admissible functions that can be used for the A* search algorithm?
Edit:
I know about http://www.dave-reed.com/csc550.S02/HW/HW4.html , but that function clearly is not consistent.
...
Hello, i want to ask if there is any way to generate the shortest path from node A to node B
without generating the shortest paths to all the other nodes (stop when node B is in the examined set)
with A-star in QuickGraph.
I want to plug QuickGraph into a game and thus generating all the paths is not allowed from the time
limitations th...
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...
I am working on a project with a robot that has to find its way to an object and avoid some obstacles when going to that object it has to pick up.
The problem lies in that the robot and the object the robot needs to pick up are both one pixel wide in the pathfinder. In reality they are a lot bigger. Often the A* pathfinder chooses to pl...
I have the ability to calculate the best route between a start and end point using A*. Right now, I am including waypoints between my start and end points by applying A* to the pairs in all permutations of my points.
Example:
I want to get from point 1 to point 4. Additionally, I want to pass through points 2 and 3.
I calculate the pe...
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,...
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...
I am trying to create a Pacman AI for the iPhone, not the Ghost AI, but Pacman himself. I am using A* for pathfinding and I have a very simple app up and running which calculates the shortest path between 2 tiles on the game board avoiding walls.
So running 1 function to calculate a path between 2 points is easy. Once the function reach...
I have implemented an A* search algorithm for finding a shortest path between two states.
Algorithm uses a hash-map for storing best known distances for visited states. And one hash-map for storing child-parent relationships needed for reconstruction of the shortest path.
Here is the code. Implementation of the algorithm is generic (st...
Hi all,
I seem to be either losing my mind or misimplementing the A* algorithm:
Below is my code, it seems that no matter what values I enter it will always return 360. Am I missing some critical piece of information here? Also before anyone asks yes this is related to a machine learning assignment I received.
public class A_...