Virtual Class: Pathfinding
- Introduction
- Trees (14 minute video + 10 minutes discussion)
- Tree Search (12 minute video + 15 minutes discussion)
- Uninformed Search in Graphs (25 minute video + 25 minutes discussion)
- Graphs (13 minute video)
- Heuristic Search (14 minute video + 25 minutes discussion)
- A* (25 minute video + 25 minutes discussion)
- Lab 1: Introduction (11 minute video)
Introduction
Classes 3 and 4, which are about path finding, will be held in virtual form. This page guides you through the lecture, which consists of short videos, and some text containing tasks for you to think about and/or discuss with other students. The idea is that you work through this page during normal class hours, and use the available online-channels, including the video conference call and slack, or any other medium that you find useful (like Skype, or WhatsApp) to communicate with your classmates and the instructor. However, you also have the option to work through the class content at another time, and send questions via email. Please indicate which section your question is about, to make it easier for me to respond effectively. This page contains all materials for classes 3 and 4, because they form one logical unit. For each section, I will also indicate how long it should take you to work through it. The class is designed to be held as two separate 2 hour lectures, as indicated below. The videos will use the slides for lecture 3 and lecture 4 from the website.
Trees (14 minute video + 10 minutes discussion)
First, watch this video:
Think about, or discuss with a partner, how you would perform a search in this game tree, starting with the root node, until you have found a solution. Think about it from an algorithmic perspective, and how you write code to solve the problem.
Tree Search (12 minute video + 15 minutes discussion)
Continue with this video:
Assuming the nodes are ordered from left to right in the tree below, how many nodes would you visit (add to the frontier) and expand (remove from the frontier to add all of its children to the frontier) when you search for a path from the root (1) to the node labeled 7, with Breadth-First Search? How about Depth-First Search? Discuss with a partner, or try to figure it out yourself, before checking your answer below.
Uninformed Search in Graphs (25 minute video + 25 minutes discussion)
Continue with this video:
Look at the map of UCR campus below. Find a path from Chemistry (Quimica) to ECCI Anexo using Breadth-First Search. Which nodes do you visit and expand? How about Depth-First Search? (Assume that the neighbors are ordered starting north, and continuing clockwise. For example, the neighbors of Quimica are, in order, Educacion, Estudios Generales and Biologia (because Biologia is slightly to the left)
Is there a shorter path than the ones found by Breadth-First and Depth-First Search? Which one? Why did we not find it?
Graphs (13 minute video)
Continue with this video:
This concludes the material for lecture 3. Continue below for lecture 4.
Heuristic Search (14 minute video + 25 minutes discussion)
In lecture 4, we are looking at how we can incorporate the distances/edge weights we have, and how we could use extra information we may have about a search problem. Continue with this video:
Look at the map of Austria (and Bavaria) given below. You want to find a path from Graz to Munich. From the map, you have calculated the straight-line distances from each city to Munich as follows:
Bregenz: 101, Bruck: 203, Eisenstadt: 400, Graz: 301, Innsbruck: 100, Klagenfurt: 202, Lienz: 201, Linz: 200, Munich: 0, Salzburg: 100, Vienna: 300
Find a path from Graz to Munich using Greedy Search. Which nodes do you visit? Which ones do you expand? How long is the resulting path?
A* (25 minute video + 25 minutes discussion)
Continue with this video:
Using the same map and heuristic information, find a path from Graz to Munich using A*. Which nodes do you visit? Which ones do you expand? How long is the resulting path?
Bregenz: 101, Bruck: 203, Eisenstadt: 400, Graz: 301, Innsbruck: 100, Klagenfurt: 202, Lienz: 201, Linz: 200, Munich: 0, Salzburg: 100, Vienna: 300
Lab 1: Introduction (11 minute video)
Finally, watch this video:
Next week (Monday, 23/3), you will start with lab 1, in which you will implement Breadth-First Search, Depth-First Search, Greedy Search and A*.