# Tag Info

3

No. Let us consider an extreme example. Let graph $G$ contain only two nodes, the starting node $s$ and the destination node $t$. The distance of edge $(s,t)$ is 1. We have a heuristic function $h$, $h(s)=2$ and $h(t)=0$. $h$ is not admissible since $h(s)>1$. However, using $A^*$ search algorithm, we will end up with the path $s, t$, the unique and, ...

2

The solution provided by Apass Jack is absolutely correct but beyond simple examples proving that the answer is "definitely no", let me add another consideration (which actually provides a solution to the exercise suggested by Apass Jack): A heuristic which is inadmissible does not necessarily mean that paths found by A$^*$ with that heuristic should be sub-...

2

It depends how you implement Dijkstra. The usual description of Dijkstra adds every vertex of the graph to the queue at the start, which is rather inefficient. A* without a heuristic is often called "uniform cost search" (UCS) and the way it's described, you only add vertices to the queue when you discover them. This means that, especially in sparse ...

2

For A* to be optimal, the heuristic needs to be admissible (and this example shows why). This heuristic is not admissible because the heuristic value at M is 40, while the shortest path from M to R has length 30.

1

For A* to get the optimal path it requires that $f(n) \leq g(goal)$. In other words that the heuristic underestimates the cost from the node to the goal. Multiplying a valid hueristic with $0 \lt\alpha\lt 1$ will not violate this requirement. Multiplying $g(n)$ is not allowed because you can end up with $f(goal) = \alpha g(goal) < f(n)$ which would ...

1

No, Dijkstra will explore all nodes with cost less than the cost of the completed path. While A* will explore all nodes with cost+heuristic less than the cost of the completed path. Thus if the heuristic is always positive then A* will expand less or equal nodes.

1

The best way to answer this is to use a profiler, but since I don't have your test cases I've looked around in the code and I'm fairly confident that it's due to differences in the way they produce the paths. The networkx A* implementation uses the standard technique of building a predecessor map and chaining backwards down it when the destination is ...

1

I would do a unique breadth exploration from the exit to get the shortest distance to exit of any position. Only obstacles (like walls) should be considered, not critters. This exploration should be done again each time an obstacle is added or removed. With some optimization, you may not have to recompute all the positions. Then each time a critter should ...

1

This is greedy best-first search.

Only top voted, non community-wiki answers of a minimum length are eligible