Questions tagged [a-star]
A* is a graph shortest-path algorithm that uses a heuristic function to speed up the search
a-star
1,200
questions
0
votes
0
answers
9
views
FInding a path based on more parameters than just time
I'm trying to create some google maps variant that would give you the least polluted path based on a database storing a bunch of lat-long positions which represent polluted spots, the goal being to ...
0
votes
0
answers
17
views
Unity 2d A* Pathfinding cant get negative x velocity
im making a script about a topdown 2d car Ai Movement to move around the city randomly via waypoint using A* and the part of that script is to change thing like the waypoint scan range(collider offset)...
0
votes
0
answers
36
views
Improving A* path finding efficiency in a 2D Grid based Unity game
public List<Node> FindPath(Vector2Int start, Vector2Int target)
{
List<Node> openSet = new List<Node>();
HashSet<Node> closedSet = new HashSet<Node>();
Node ...
0
votes
0
answers
36
views
how to find a path from source to target with necessary points constraint by A star algorithm
Using A star algorithm, it is easy to calculate the shortest path from the source point to target point. What if we add the constraint of necessary points? How to solve it ?
necessary points is a set ...
0
votes
0
answers
25
views
Ensure basic A star pathfinding is creating a linked path in C#
I have a function for A star pathfinding that does not allow diagonal movement where I have penalties for changing direction (F score increased). However, I have found that the resulting path is not ...
1
vote
0
answers
80
views
A*: Rotating pipes puzzle heuristic
School Project: Create an AI who will use A* search to resolve a rotating pipe puzzle (similar to this game pipes_puzzle_game).
To solve this project I represented every possible board configuration ...
0
votes
1
answer
54
views
Using a* algorithm without having distances [closed]
I have a list of nodes and all of their neighboring nodes. I am trying to get from node X to node Y in the shortest path using A*.
What heuristic should I use?
0
votes
1
answer
94
views
Why this A* implementation works for 8-puzzle entries and not for 15-puzzle entries?
THE FULL CODE IS IN THE ANSWERS BELOW
I'm gonna dissect this problem I'm having completely, contextualizing the full program and what each part of it do, because I don't know which part is not ...
0
votes
0
answers
39
views
Why this variable's value keeps increasing while it should remain a fixed value?
I'm trying to implement A* search algorithm to solve TSP problem.
Here's the code I've written so far:
import heapq
#def kruskal_mst(graph):...
def mst_heuristic(graph, current_city, ...
0
votes
1
answer
33
views
Doesn't an admissible heuristic ensure optimality in the graph-search version of A*?
I'm reading a text book "Artificial Intelligence - A Modern Approach (3rd Edition)".
In page 95, the book mentions that "A* has the following properties: the tree-search version of A* ...
0
votes
0
answers
40
views
A* algorithm is not returning an existent path as expected
The A* algorithm, implemented in Python, is not returning the expected path even when a valid path exists between the start and goal nodes. The algorithm is expected to find the shortest path between ...
0
votes
1
answer
19
views
Is there an algorithm for turning a pixelated path into a set of vectors and curves?
I have made a pathfinding program for my robotics team, and it uses Dijkstra's Algorithm (will change to A* eventually) to get the fastest path between two points. It outputs a list of points in the ...
1
vote
0
answers
106
views
a-star algorithm visualisation
I'm trying to display the path found by the astar algorithm on a map using OSMnx, but I'm having a lot of issues displaying the nodes, edges & path on the graph. I'm pretty new to coding, I took a ...
1
vote
0
answers
43
views
Struggling with A* Pathfinding in C#
So I am trying to program A* pathfinding in a grid based game, and I am following the pseudocode shown on wikipedia's article . However, it never seems to make it to the destination. For my test, I am ...
1
vote
1
answer
75
views
Simplify 2D map to optimize pathfinding
I'm working on a personal project that requires solving the well-known shortest-path problem.
I have 256x256 tiles maps like the following:
Example map
I'm only interested in white (walkable) areas. ...