I am working on an online MOOC on AI and I am now working to understand A* better.
Basically, right now I am working on a problem where: we live on a tropical island and we're trying to navigate between areas, starting from d
and heading towards q
.
I am trying to find the cost used between d
and q
using A*
search; and also how many 'nodes' that we're opened during the search.
Below is the costs (when travelling to nodes)
Below is the distance to the target
Attempt at Solving
The optimal path from d
to q
is d->e->f->g->l->n->q with which would give me a cost of 50+70+20+60+45+20 = 265. This looks like it is the optimal path to get from d to q as well.
Also, we should be expanding 1+2+2+3+1+1=10 nodes to find this path with A*.
Can any of you AI gurus help me confirm whether I am understanding this properly?
Thanks a ton in advance!
Yes, you are correct. In this special case of A*, you're dealing with a uniform-cost search, since the heuristic is a constant function.
I got 265 as the distance. Are you counting the root among the expanded nodes? Because I got 10 nodes if I include the root.