Quantcast
Channel: coefficients – 100% Private Proxies – Fast, Anonymous, Quality, Unlimited USA Private Proxy!
Viewing all articles
Browse latest Browse all 10

Coefficients in cost function in A-star

$
0
0

I’d like to expand on this question :

https://stackoverflow.com/questions/52420788/why-does-the-a-star-algorithm-need-gn

Dijkstra’s algorithm uses cost function $ f(n) = g(n)$ whereas A* uses cost function $ f(n) = g(n) + h(n)$ , with $ g(n)$ being the cost of the path from the start node to node $ n$ , and $ h(n)$ is a heuristic function that estimates the cost of the cheapest path from node $ n$ to the goal.

It is clear from the linked question’s answer that A* needs its $ g(n)$ function in the cost function. My question however is the following. Can one use the cost function :

$ f(n) = \alpha g(n) + (1-\alpha)h(n)$

for some alpha $ 0<\alpha<1$ ?

I ask because in some cases I observed it can be much faster to prioritize (through a coefficient) estimated cost over already traversed cost. I am not sure however if this still results in an optimal path?

EDIT : multiplying the heuristic $ h(n)$ by some alpha $ 0<\alpha<1$ is allowed, since this operation still underestimates if $ h(n)$ already did (which is necessary to obtain the resulting optimal path). I am more concerned about the multiplying of $ g(n)$ .

The post Coefficients in cost function in A-star appeared first on 100% Private Proxies - Fast, Anonymous, Quality, Unlimited USA Private Proxy!.


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>