Uniform Cost Search implemented using Priority Queue
One of the topics of this course in which artificial intelligence is explained
is Uniform Cost Search. This algorithm, one of the pathfinding algorithms, is
the subject of the first project. This algorithm is written in Python language and
implemented by implementing Priority Queue.
Tests
˙Istanbul to Kayseri = 435 km
Route = [’˙Istanbul’, ’Eski ¸sehir’, ’Konya’, ’Kayseri’]
Trabzon to ˙Izmir = 525 km
Route = [’Trabzon’, ’Samsun’, ’Ankara’, ’Eski ¸sehir’, ’˙Izmir’]
Çanakkale to Konya = 375 km
Route = [’Çanakkale’, ’˙Istanbul’, ’Eski ¸sehir’, ’Konya’]
Balıkesir to Adana = 490 km
Route = [’Balıkesir’, ’˙Izmir’, ’Mugla’, ’Antalya’, ’Adana’] ˘
Istanbul to Paris = The path between (’˙Istanbul’, ’Paris’) does not exist in this universe.
Try at another one.
Image is taken from Akdeniz University Introduction to Artificial Intelligence Course (Prof. Alper Bilge)