Uniform Cost Search

preview_player
Показать описание
Uniform Cost Search Algorithm A.I
Рекомендации по теме
Комментарии
Автор

There is quite a bit wrong with this video - you should stick to the algorithm. The path you described, S->N->P->Q->G is not possible with UCS because Q is not connected to G and you cannot back up and do S->N->P->Q->P->G because the explored set prevents you from duplicating states. You put S in your priority queue with cost 0, you pop from the queue and check if the popped state is the goal state. S is not the goal state so you put it in your explored set, then you check each child. If the child is not in the explore set or the priority queue, then add it, otherwise, if the child is in the priority queue, check to see if the path cost is less than the existing path cost. If the new cost is less, then replace the item in the priority queue with the new path. Then you pop the path with the lowest cost from the priority queue, check for the goal state, and go through the loop again until the goal state is found or the queue is empty - in which case a path from the start state to the goal does not exist.

AxGryndr
Автор

This is wrong because UCS uses a priority queue to sort all paths before choosing one. They don't choose it in order but based on the total cost of the path.

selvaa
Автор

thank you very much,
This was the solution I was looking for for a long time.

mehmetdagl
Автор

Hello guys he is right. I researched much many people and websites are providing wrong way..

ijazkhanniazi
Автор

I am not sure does this youtube video have a point. I mean, this is not a way how 'uniform cost search' goes!!! It goes like BFS but you choose a node with minimum cost and go with him!

milosveljkovic
Автор

i've never been confused this much damn!!! that was the worst explanation i've ever seen

chrisngoy
Автор

Thanks sir for providing correct knowledge

ijazkhanniazi