August 2018
Intermediate to advanced
124 pages
2h 47m
English
In Chapter 2, Understanding the Breadth-First Search Algorithm, we saw the university navigation application, with which we wanted to find our way from the Bus Stop to the AI Lab. In the BFS method, we assume that the distance between connected places is one (that is, the same). However, in reality, that is not the case. Now, let's assume that the university is designed as follows:

The values in green are the actual distances between the connected places. Let's go ahead and create a dictionary, storing the locations of these places:
...#connections between placesconnections = {}connections["Bus ...Read now
Unlock full access